A particle of mass $m$ moves on the $x$-axis under a force $$F(x)=-2x+2\epsilon x^2$$ Use newton's second law, $F=m\ddot x$ to derive the energy equation $$\frac{1}{2}m\dot x^2+V(x)=E_0$$ where $V(x)=x^2-\frac{2}{3}\epsilon x^3$, and $E_0$ is a constant.
I have been able to derive $V(x)$ through $V(x)=-\int F(x)$. However,I'm finding it hard to follow how $\frac{1}{2}m\dot x^2$ is derived from $F=m\ddot x$. In my attempts I have multiplied by $\dot x$ and integrated with respect to time leaving me with $\int m \ddot x \dot x$ $dt$, how do I perform this?
If you have gotten that far, you are almost there! To evaluate $\int m\dot{x}\ddot{x}dt$, use $u$-substitution.
Let $u = \dot x$, then $du = \ddot x dt$.
This gives the integral $\int mu \,du$. Carrying out the integration and substituting $\dot x$ back in gives the result. Don't forget any necessary constant of integration.