MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: New to mathematica: Question about solving

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74692] Re: [mg74664] New to mathematica: Question about solving
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 31 Mar 2007 01:38:17 -0500 (EST)
  • Reply-to: hanlonr at cox.net

soln=DSolve[{y'[x] == y[x] + y[x]^3}, y[x], x]

{{y[x] -> -((I*E^(x + C[1]))/
      Sqrt[-1 + E^(2*x + 2*C[1])])}, 
  {y[x] -> (I*E^(x + C[1]))/Sqrt[-1 + E^(2*x + 2*C[1])]}}

soln=soln/.{
        expr1_*(expr2_)^(-1/2):>(expr2/(expr1^2))^(-1/2),
        C[1]:>-Log[C]/2}//ExpandAll

{{y[x] -> 1/Sqrt[C/E^(2*x) - 1]}, 
  {y[x] -> 1/Sqrt[C/E^(2*x) - 1]}}


Bob Hanlon

---- traz <t_raz at yahoo.com> wrote: 
> 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?
> 



  • Prev by Date: Re: Netlink Net Framework
  • Next by Date: Re: ReadList
  • Previous by thread: message question
  • Next by thread: Re: New to mathematica: Question about solving