home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math.symbolic
- Path: sparky!uunet!mcsun!Germany.EU.net!ira.uka.de!chx400!bernina!neptune!bronstei
- From: bronstei@inf.ethz.ch ()
- Subject: Re: ode solver, different results from different packages
- Message-ID: <1992Sep3.155128.1990@neptune.inf.ethz.ch>
- Originator: bronstei@ru3.inf.ethz.ch
- Sender: news@neptune.inf.ethz.ch (Mr News)
- Nntp-Posting-Host: ru3.inf.ethz.ch
- Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH)
- Date: Thu, 3 Sep 1992 15:51:28 GMT
- Lines: 63
-
-
- In reply to:
- >> Article: 4600 of sci.math.symbolic
- >> From: qhuang@wiliki.eng.hawaii.edu (Qiming Huang)
- >> Date: Thu, 3 Sep 1992 10:20:37 GMT
-
- the d.e. in question:
- >> x*dy/dx +a*x*y^2+2*y+b*x=0
-
- >> the solution given by macsyma is
- >>
- >> (2 a sqrt(b) x)/sqrt(-a)
- >> y=((2 %c a b x - 2 %c sqrt(-a) sqrt(b)) %e
- >>
- >> (2 a sqrt(b) x)/sqrt(-a)
- + sqrt(-a) a sqrt(b) x -a)/(2 %c sqrt(-a) a sqrt(b) x %e
- >>
- >> 2
- + a x)
- >> where %c is the integration constant.
-
- This solution is correct with some assumptions on a and b (it wouln't be in
- the macsyma manual otherwise).
-
- >> the solution given by mathematica is
- >> In:=DSolve[x*y'[x]+a*x*y^2+2*y+b*x==0, y[x],x]
- >> Out={{y[x]--> -(bx) -axy^2 +C[1] - 2y log[x]}}
- >> What went wrong?
-
- Don't blame mathematica too quickly on that one: I think your input line
- was wrong. Try the correct input:
-
- Dsolve[x y'[x] + a x y[x]^2 + 2 y[x] + b x == 0, y[x], x]
-
- and please do post it if you get a correct answer!
- I thing the most likely answer to "What went wrong?" with the correct input,
- is that this type of d.e. is not supported by mathematica.
-
-
- For your information, AXIOM returns the following solution, which is correct
- with somewhat weaker assumptions on a and b than macsyma's:
-
- +-----+
- +-----+ 2x\|- a b +-----+
- (- 2%c\|- a b - 2%c a b x)%e + a x\|- a b + a
- ---------------------------------------------------------
- +-----+
- +-----+ 2x\|- a b 2
- 2%c a x\|- a b %e - a x
-
-
- where %c is the integration constant (AXIOM actually returns a first
- integral, which you equate to any constant you want, e.g. %c, and then
- solve for y(x)).
-
- -----------------------------------------------------------------------------
- ____________
- / / / / Manuel Bronstein
- /--- / /___/ bronstein@inf.ethz.ch
- / / / / Informatik, ETH Zuerich, Switzerland
- ---- / / / Tel: [41] (1) 254-7474
- Fax: [41] (1) 262-3973
- -----------------------------------------------------------------------------
-