# Solving second order nonlinear ODE given boundary condition at infinity

I am trying to solve the following differential equation $$\frac{d^2 u}{dx^2} = - \frac{d V}{du} \; \; , \;\; where \;\; \; V = \frac{1}{2}u^2 - \frac{1}{4}u^4$$ And the given boundary conditions are $u(-\infty)=1$ and $u(\infty)=-1$. The solution that I should get it $$u(x) = \mp \tanh \left( \frac{x}{\sqrt{2}} \right) ,$$ but how do I get there?

$$u'' = u'\dfrac{d}{du}u'$$ Change of variables $u'\to p$ we get $$\dfrac{d}{du}p^2 = -2\dfrac{dV}{du}$$ You have now reduced the order to proceed.
• The first step that you made I can understand in this was $\frac{d^2 u}{dx^2}= \frac{d}{dx}\frac{du}{du} \frac{du}{dx}=\frac{du}{dx} \frac{d}{du} \frac{du}{dx}$. – Ohm Jan 29 '15 at 9:47
• I guess that I can now use the boundary condition $u(-\infty)=1$ and $u'{-\infty}=0$ and find $C=\frac{1}{2}$. Therefore I have $$\left( \frac{du}{dx} \right)^2 = -2 V + \frac{1}{2} = \frac{1}{2} \left( u^2 - 1 \right)^2 \Rightarrow \left( \frac{x}{\sqrt{2}} \right) = \int \frac{du}{(u^2 - 1)}= \int \frac{du}{\sqrt{(u^2 - 1)^2}}$$. But the answer for the rhs integral (using Maxima) is $-\frac{\log(u+1)-\log(u-1)}{2}$, instead of $arctan$.. – Ohm Jan 29 '15 at 12:03