# Lagrangian and Hamiltonian dynamics, momentum and canonical transformations

I am relatively new to Lagrangian and Hamiltonian dynamics. I am aware of how to form the equations of motion using the Legendre Transformation. I, however, have one fundamental question and I was hoping if someone could help me with this.

On performing the Legendre transformation $$H = p^T\dot{q} - L \tag{1}$$ where $p$ is the conjugate momenta, I was under the impression that $p$ and $q$ would be independent variables. However, using $$p = \frac{\partial L}{\partial \dot{q}}\tag{2}$$ gives $p=p(q,\dot{q})$, which implies that $p$ and $q$ are not independent. Is this a non-canonical transformation? Or am I doing something wrong? How do I work around this?

• Thank you. I understand now that this is not a canonical transformation. My main concern was on whether we must require that $p$ and $q$ be independent variables. Which leads me to think that a phase-space analysis in the $p-q$ space may not be as useful in understanding the dynamics of the system in finding out certain properties as much as the $q-\dot{q}$ space. – Roshan Thomas Eapen Jun 18 '18 at 14:26