# What is a constant of motion, given $\ddot x=\frac12 \sin (2x)$?

I usually deal with 2 variables, when the constant of motion is a function $\Phi$ such that $\frac {\partial\Phi }{\partial x}\cdot\dot x+\frac {\partial\Phi }{\partial y} \cdot\dot y=0$. Usually it works to take $\frac {\partial\Phi }{\partial x}= \dot y, \frac {\partial\Phi }{\partial y}=-\dot x$ (ah by the way, can it not work?) and then proceed from there.

Or if we are given the potential energy, then the sum of potential energy and kinetic energy will be $\Phi$.

But having never seen an exercise with only a variable, I'm a bit confused here.

Multiply by $2\dot{x}$ and integrate: $$\dot{x}^2=\frac{1}{2}\cos{2x} + A,$$ where $A$ is a constant. So the derivative of $$\dot{x}^2-\frac{1}{2}\cos{2x}$$ with respect to $t$ is zero, and it must therefore be a constant of motion. (It is in fact related to the total energy, the first term being the kinetic bit, the second potential. It's close to a simple pendulum with the true gravitational potential energy included, rather than the small-angle approximation used in the simple harmonic motion solution.
• I think what you're talking about in your first paragraph is based on the Hamiltonian formalism (the equations you quote look like Hamilton's equations, for example), whereas the equation you ask about is most easily treated using the Lagrangian formalism. The most powerful way to get constants of motion is Noether's Theorem, but to use that, you need a Lagrangian. Inverting the Euler–Lagrange procedure to find $L$ is not easy. – Chappers Apr 27 '17 at 0:55
$$2x''=\sin(2x)$$ The corresponding Lagrangian is $$\mathcal{L}(x', x)=(x')^{2}-\frac{1}{2}\cos(2x)$$ Hence, the first integral of the Euler-Lagrange equation is $$\frac{\partial\mathcal{L}}{\partial{x'}}x'-\mathcal{L}=(x')^{2}+\frac{1}{2}\cos(2x)=const$$ Which is the correct one!