Re: New to mathematica: Question about solving differential eqs
- To: mathgroup at smc.vnet.net
- Subject: [mg74689] Re: New to mathematica: Question about solving differential eqs
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Sat, 31 Mar 2007 01:34:33 -0500 (EST)
- References: <euig8p$otm$1@smc.vnet.net>
traz schrieb: > Whenever I try to solve differential equations in mathematica, I get a solution with an imaginary part different from the solution in a text book. For example: > > DSolve[{y'[x] == y[x] + y[x]^3}, y, x] > > will give me a solution that has an imaginary part and not the one I expect here from the text book: > > {+(Ce^(-2x)-1)^(-1/2), -(Ce^(-2x)-1)^(-1/2)} > > Can anyone give me a tip on how to do this? Also does anyone know of an online tuttorial that goes into details a little bit? > If you enter In[1]:=sol=DSolve[y'[x]==y[x]+y[x]^3, y[x],x] Out[1]={{y[x]->(I E^(x+C[1])/Sqrt[-1+E^(2x+2C[1])] you can get rid of the "I" by choosing another integration constant, eg k like this: sol/.C[1]->Log[I k Pi]//ExpandAll Gruss Peter -- ==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-== Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de