# Lagrangian and conservation of energy

If Lagrangian of the motion is

$$\mathcal{L}=\frac{1}{2}m\left(a^2\dot\phi^2+a^2\dot\theta^2\sin^2\phi\right)+mga\cos\phi,$$

how can I show that total mechanical energy is conserved? I've read this:

If the time $t$, does not appear [explicitly] in Lagrangian $\mathcal{L}$, then the Hamiltonian $\mathcal{H}$ is conserved. This is the energy conservation unless the potential energy depends on velocity.

Potential energy of this motion doesn't depend on velocity. Also, $t$ does not appear explicitly in Lagrangian. Is this enough to say that total mechanical energy is conserved?

• Comment to the question (v2): Please provide reference of quote. The reference is probably talking about the Lagrangian energy function $h(q,\dot{q},t):=\dot{q}^i\frac{\partial L}{\partial \dot{q}^i}-L$ rather than the Hamiltonian $H(q,p,t)$. – Qmechanic Jul 31 '13 at 19:26
• In my case, generalized coordinates are $q_1=\theta$ and $q_2=\phi$. Kinetic energy is $T=\frac{1}{2}m(a^2\dot\phi^2+a^2\dot\theta^2\sin^2\phi)$ Potential energy is $V=-mga\cos\phi=V(q_2)$ Lagrangian is $L=\frac{1}{2}m(a^2\dot\phi^2+a^2\dot\theta^2\sin^2\phi)+mga\cos\phi$ $p_1=\frac{\partial L}{\partial \dot q_1}=\frac{\partial L}{\partial \dot\theta}=ma^2\dot\theta\sin^2\phi$ $p_2=\frac{\partial L}{\partial \dot q_2}=\frac{\partial L}{\partial \dot\phi}=ma^2\dot\phi$ $T=\frac{1}{2}\dot\phi p_2+\frac{1}{2}\dot\theta p_1=T(p_1,p_2)$ That's it? – gov Jul 31 '13 at 19:34
• Seems fine to me! Although, you can always put $\dot{q}_i$ in terms of $p_i$, or viceversa, but also $T$ can explicitly depend on $q_i$, I messed it there. Try to prove explicitly that the hamiltonian is the energy and that it is conserved, so that you get convinced of it. – user24999 Jul 31 '13 at 20:32

If time $t$, does not appear in Lagrangian $\mathcal{L}$, then the Hamiltonian $\mathcal{H}$ is conserved. This is the energy conservation unless the potential energy depends on velocity.
is that, from the definition of the hamiltonian as the Legendre transformation, $$\mathcal{H}\equiv\sum_i\dot{q}_i\frac{\partial\mathcal{L}}{\partial\dot{q}_i}-\mathcal{L}\hspace{1in}(\dagger)$$ and knowing that for any function in phase space, $F=F(q_i,p_i,t)$, $$\frac{dF}{dt}=\frac{\partial{F}}{\partial{q}_1}\frac{d{q_1}}{d{t}}+\ldots+\frac{\partial{F}}{\partial{q}_n}\frac{dq_n}{dt}+\frac{\partial{F}}{\partial{p}_1}\frac{d{p_1}}{d{t}}+\ldots+\frac{\partial{F}}{\partial{p}_n}\frac{dp_n}{dt}+\frac{\partial{F}}{\partial{t}}\\=\sum_{j=1}^n\left(\frac{\partial{F}}{\partial{q}_j}\dot{q}_j+\frac{\partial{F}}{\partial{p}_j}\dot{p}_j\right)+\frac{\partial{F}}{\partial{t}}\\=\left\{F,\mathcal{H}\right\}+\frac{\partial{F}}{\partial{t}}$$ where $\left\{F,\mathcal{H}\right\}$ is the Poisson bracket of $F$ and $\mathcal{H}$, defined as $$\left\{F,\mathcal{H}\right\}\equiv\sum_{j=1}^n\left(\frac{\partial{F}}{\partial{q}_j}\dot{q}_j+\frac{\partial{F}}{\partial{p}_j}\dot{p}_j\right)=\sum_{j=1}^n\left(\frac{\partial{F}}{\partial{q}_j}\frac{\partial{\mathcal{H}}}{\partial{p}_j}-\frac{\partial{F}}{\partial{p}_j}\frac{\partial{\mathcal{H}}}{\partial{q}_j}\right)$$ if $\mathcal{L}=\mathcal{L}(q_i,p_i)$, i.e. the Lagrangian does not depend explicitly on time, which in turn means, from the definition $\mathcal{L}\equiv{T}-V$, that kinetic energy $T$ and potential $V$ does not depend explicitly on time, then $\frac{d\mathcal{H}}{dt}=\left\{\mathcal{H},\mathcal{H}\right\}=0$. Now, a constant of motion is precisely some function $F$ of phase space that is independent of time, i.e. such that $\frac{dF}{dt}=0$, so in this case the hamiltonian would be conserved. Now, from the definition $(\dagger)$, you may verify that the hamiltonian equals the energy, $$\mathcal{H}\equiv{T}+V$$ only if $V=V(q_i)$ alone. So if that is the case, then energy would be conserved.