# Getting a Conserved Quantity from a Lagrangian [duplicate]

So I've been messing around with the implications of Noether's theorem, and though I conceptually get what it's saying, I'm having a hard time actually using it to retrieve a conserved quantity from a given Lagrangian. Procedurally if someone could show how to go about finding energy conservation from a generalized Lagrangian, and then using that procedure explain how I might derive the conservation of parity or charge from it, it'd do me a lot of help.

Let's assume that our Lagrangian depends on quantities $$t, q$$ and $$\dot{q}$$. We start by finding the change in Lagrangian $$\frac{d}{dt}L = \frac{\partial L}{\partial t} \frac{dt}{dt}+ \frac{\partial L}{\partial q} \frac{dq}{dt} + \frac{\partial L}{\partial \dot{q}} \frac{d \dot{q}}{dt}$$ By adding and subtracting $$\frac{d}{dt}\bigg( \frac{\partial L}{\partial \dot{q}}\bigg) \frac{dq}{dt}$$ Now the change in Lagrangian can be written as $$\frac{d}{dt}L = \frac{d}{dt}\bigg( \frac{\partial L}{\partial q}\frac{d q}{dt} \bigg)$$ Hence we define $$H =\frac{\partial L}{\partial q}\frac{d q}{dt} -L$$ as the Hamiltonian which is conserved. Noether's Theorem has a similar approach.