Re: using Dsolve for equation: y'' + |y|^2y=ay

*To*: mathgroup at smc.vnet.net*Subject*: [mg84404] Re: using Dsolve for equation: y'' + |y|^2y=ay*From*: daniele <danielelinaro at gmail.com>*Date*: Fri, 21 Dec 2007 20:39:15 -0500 (EST)*References*: <fkeo6j$2il$1@smc.vnet.net>

Hi, I have used the command sol = DSolve[{y''[x] + y[x] Abs[y[x]]^2 - a y[x] == 0}, y, x] and I get a solution that uses implicit functions, i.e. the function Solve. Since the equation is nonlinear, I'd have a go with NDSolve instead of DSolve. You may want to try something like Manipulate[( nsol = NDSolve[{y''[x] + y[x] Abs[y[x]]^2 - a y[x] == 0, y'[0] == 5,y[0] == 1}, y, {x, 0, 10}]; Plot[Evaluate[y[x] /. nsol], {x, 0, 10}] ), {a, 0, 5}] and replace appropriate values for the initial conditions and for the parameter a (I don't know if the ones I've used make much sense, but the integration works fine). Daniele