# Explicit solution of a Hamiltonian system

It is well-known that the following Hamiltonian system $$\begin{eqnarray} \left\{\begin{array}{rcl} \frac{dx}{dt}&=&y,\\ \frac{dy}{dt}&=&x(-1+x^2), \end{array}\right. \end{eqnarray}$$ with $$H(x,y)=\frac{x^2}2+\frac{y^2}{2}-\frac{x^4}{4}$$ has the solution $$x=\tanh\left(\frac{t}{\sqrt2}\right),\qquad y=\frac1{\sqrt2}\text{sech}^2\left(\frac{t}{\sqrt2}\right)$$ such that $$H(x,y)=\frac14$$.

Now consider the following Hamiltonian system $$\begin{eqnarray} \left\{\begin{array}{rcl} \frac{dx}{dt}&=&y,\\ \frac{dy}{dt}&=&x(-1+x^4), \end{array}\right.\tag{1} \end{eqnarray}$$ with $$H(x,y)=\frac{x^2}2+\frac{y^2}{2}-\frac{x^6}{6}$$ and I want to find the explicit solution such that $$H(x,y)=\frac{1}{3}$$. I tried many ways to get the solution but failed. Any help is appreciated.

Edited.

Surprisingly, there is an elementary solution, if I made no mistake in the following computation.

Your equation is equivalent to $$\left(\frac{dx}{dt}\right)^2=\frac{1}{3}(x^6-3x^2+2),$$ (I just plugged $$y=dx/dt$$ to your Hamiltonian, and used its value $$H=1/3$$.) This equation is separable, $$\frac{t}{\sqrt{3}}=\int\frac{dx}{\sqrt{x^6-3x^2+2}}=:I$$ and requires inversion of the integral.

To reduce it to a standard integral, change $$x^2=1/(u+1), \; dx=-(1/2)(u+1)^{-3/2}du,$$ and the integral becomes $$I=-\frac{1}{2}\int\frac{du}{u\sqrt{2u+3}}.$$ The inverse function to this integral is elementary. Integrating and returning to the original variables, I obtained the general solution $$x(t)=\frac{2\sinh(t+c)}{\sqrt{6+4\sinh^2(t+c)}}.$$ Can you check this computation?

Of course, your value $$1/3$$ for the Hamiltonian is crucial here. With some other value you obtain a much more complicated integral which cannot be expressed in elementary functions. Where did this $$1/3$$ come from?

• Thanks a lot. This is what I wanted. Mar 28, 2019 at 21:29
• Note it is much clearer than before. I really appreciate your help. Mar 29, 2019 at 16:02
• @xpaul: tell me where your $1/3$ comes from. Mar 29, 2019 at 16:11
• 1/3 is from fact that when $H(x,y)=\alpha$ passes through the separatrices $(\pm1,0)$, $\alpha=1/3$. Mar 29, 2019 at 16:16
• If I plug in your $x(t)$, I get $y=x'(t)=\frac{\sinh (c+2 t)}{\sqrt{\frac{\cosh (c+2 t)+1}{\cosh (c+2 t)+2}} (\cosh (c+2 t)+2)^2}$ but I find $\frac{x^2}2+\frac{y^2}{2}-\frac{x^6}6\neq\frac13$. Mar 29, 2019 at 16:25