# A non linear ode with boundary conditions at infinity

I want to solve the non-linear ODE

$$\frac{d^2}{dx^2}y=a(y+y^3)$$

With the boundary conditions that $$\lim_{x\to \pm \infty} y(x) =0$$

I am not aware of any analytical method for solving this kind of problem. So, I want to solve it numerically. Which method would be suitable for this ODE? I am aware of different methods for finite boundary conditions.

Also, does anybody know if it has an analytical solution to which I could compare my numerical solution?

• To me this looks more like a 2nd order (partial) differential equation in one spatial variable. – Jan Jul 24 at 11:44
• The book, "Exact Solutions for Ordinary Differential Equations" by Chapman & Hall/CRC does not seem to have a solution for this problem. Have you tried using the Runge-Kutta method. Not sure it will work for this problem, but what I remember from college, it seems like it should work for a numerical solution. – Jesse Jul 25 at 1:22
• On further searching I found that it has an analytical solution of the form $\sqrt{\coth^2(\sqrt{a} x )-1 }$ which has singularity at the origin so no numerical method will work for it but the singularity is of the order $1/x$ so I made the substitution $u=x^2 y$ which eliminates the singularity at the origin.In the new equation numerical methods apply. But now I am stuck I don't know which method is used for odes with infinite boundary conditions. The only idea that I have is that I make the solution close to 0 at the end points but I am not aware of any numerical for solving this nonl. – ben tenyson Jul 25 at 1:40
• Wouldn't $y(x)=0$ satisfy this? – fibonatic Jul 25 at 6:03
• I need a non trivial solution – ben tenyson Jul 25 at 9:53