I am currently studying an introductory course to theoretical physics. I stumbled upon something I can't seem to understand, namely:
Suppose that we have a system without any potential energy, and thus only kinetic energy $T$. The Lagrangian $\mathcal{L} = T - V = T $ is then equal to the Hamiltonian $ \mathcal{H} = T + V = T$.
The generalised momenta $p_{q_j}$ can be defined in a Lagrangian or Hamiltonian formalism:
Lagrangian $$ p_{q_j} = \frac{\partial \mathcal{L}}{\partial \dot{q}_j} \enspace \to \enspace \dot{p_{q_j}} = \frac{\partial \mathcal{L}}{\partial q_j} $$
Hamiltonian $$ \dot{p_{q_j}} = -\frac{\partial \mathcal{H}}{\partial q_j} $$
Now because of the fact that $\mathcal{L} = \mathcal{H} = T $, we get
$$ \frac{\partial T}{\partial q_j} = - \frac{\partial T}{\partial q_j} $$
This is clearly not correct, but where am I wrong in my reasoning?