I have 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 found that it has an analytical solution of the form $\sqrt{\coth^2(\sqrt{a} x )-1 } $. My main goal is to get this solution numerically. The exact solution 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 do 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 of my the discrete domain I choose but I am not aware of any numerical for solving this nonlinear odes of this form. .Also it would be great if someone could recommend a book that covers odes of this form.