Finding the equation of motion of anharmonic potential If I have a potential given by:
$$U=U_0\left[2\left(\frac xa\right)^2-\left(\frac xa\right)^4\right]$$
It says that at $t=0$, the particle is at the origin ($x=0$) and the velocity is positive and equal to the escape velocity, which I found to be $\sqrt {2U_0/m}$
I have the differential equation:
$$m\ddot x=-\nabla U=-U_0\left[\frac {4x}{a^2}-\frac {4x^3}{a^4}\right]$$
EDIT::
So I have the initial $(x,\dot x)$.  Now to find $x(t)$, I use conservation of energy.
$$E=K+U=\frac 12mv^2+U_0\left[2\left(\frac xa\right)^2-\left(\frac xa\right)^4\right]$$
The energy of the system is $U_0$, so I can change the above equation to:
$$U_0=\frac 12 m \left (\frac {dx}{dt}\right)^2+U_0\left[2\left(\frac xa\right)^2-\left(\frac xa\right)^4\right]$$
$$\left(\frac{dx}{dt}\right)^2=\frac 2m U_0\left[1-2\left( \frac xa \right)^2+\left( \frac xa\right)^4 \right]$$
I found that the value in brackets reduces to $\frac{1}{a^2} (x^2-a^2)^2$
So:
$$\frac {dx}{dt}=\sqrt{\frac{2U_0}{m}} \frac {x^2-a^2}{a^2}$$
So I want 
$$\int^{x}_{x_0} \frac{dx}{x^2-a^2}=\int^t_0 \sqrt{\frac {2U_0}{m}}\frac{dt}{a^2}$$
This ends up being a hyperbolic arctan function, which could potentially make sense, but am I going in the right direction?
 A: I have two suggestions:


*

*You can solve it numerically using MATLAB using commands of "ode" family.

*Have a look at a book called "Handbook of exact solutions for ordinary differential equations" if you have access to it. I think you will find some help there to obtain analytical solution for your problem.
A: Here is how to solve a system whereas the acceleraton $a(x)$ is some function of position.
$$ a(x) = \frac{{\rm d}v}{{\rm d}t} = \frac{{\rm d}v}{{\rm d}x} \frac{{\rm d}x}{{\rm d}t} = \frac{{\rm d}v}{{\rm d}x} v $$
$$ \int a(x)\,{\rm d} x = \int u\,{\rm d}u + K $$
Given the initial condition $(x_0, v_0)$ the above is
$$ \int_{x_0}^x a(x)\,{\rm d} x = \frac{1}{2} \left( v^2 - v_0^2 \right) $$
which is solved for $v(x)$ if possible. 
Then to get the time you can use $t=\int \frac{1}{v(x)}\,{\rm d}x$ or $t=\int \frac{1}{a(x(v))}\,{\rm d}v$
In your case the first integral is
$$\frac{1}{2} v^2 - \frac{1}{2} v_0^2 = \frac{U_0}{m} \, \frac{(a^2-x^2)^2 - (a^2-x_0^2)^2}{a^4} $$
A: Yes, you are on the right way, the solution is : 
$$x = a ~ th(\sqrt{\frac{2U_0}{m}}\frac{t}{a})\tag{1}$$
The speed is : 
$$ \dot x = \sqrt{\frac{2U_0}{m}} (1 -  th^2(\sqrt{\frac{2U_0}{m}}\frac{t}{a}))\tag{2}$$
At $t$ = 0, you have $x(0) = 0$ and $\dot x(0) =\sqrt{\frac{2U_0}{m}}$, as wished.
