       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:=sol=DSolve[y'[x]==y[x]+y[x]^3, y[x],x]
Out={{y[x]->(I E^(x+C)/Sqrt[-1+E^(2x+2C)]

you can get rid of the "I" by choosing another integration constant,
eg k like this:

sol/.C->Log[I k Pi]//ExpandAll

Gruss Peter
--
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

```

• Prev by Date: Re: Re: Re: Multi-core Support in Mathematica 5.2
• Next by Date: Re: Closing All Input Cells at Once- KB shortcuts
• Previous by thread: Re: New to mathematica: Question about solving differential eqs
• Next by thread: Netlink Net Framework