I always found Legendre transformation kind of mysterious. Given a Lagrangian $L(q,\dot{q},t)$, we can define a new function, the Hamiltonian, $$H(q,p,t)=p\dot{q}(p)-L(q,\dot{q}(q,p,t),t)$$ where $p=\frac{\partial L}{\partial \dot{q}}$. Here, we are also expressing $\dot{q}$ as a function of $(q,p,t)$ by inverting $p=\frac{\partial L}{\partial \dot{q}}$. This way of defining the new function of $(q,p,t)$ from a function of $(q,\dot{q},t)$ is called the Legendre transformation; $H$ is called the Legendre transdform of $L$.
But I might have defined a function of $(q,p,t)$ by a simpler route. Take $L(q,\dot{q},t)$ and simply re-express it as a function of $\tilde{L}(q,p,t)$ without doing any Legendre transformation. If we are interested in changing variables from $\dot{q}\to p$, this is as good.
- My question is, why not work with the function $\tilde{L}(q,p,t)$? An inelegant thing about $\tilde{L}(q,p,t)$ (as opposed to $H(q,p,t)$ obtained by making a Legendre transformation) is that we cannot find an equation of motion for $\tilde{L}(q,p,t)$. Also, it has no energy interpretation. Is there something more to it (mathematically and physically)? Why is the Legendre transformation always the correct way to go from $(q,\dot{q},t)\to (q,p,t)$?