For most system, the Lagrange function is $L = T – V$, where T is kinetic energy of the system and V is potential energy of the system.

**Euler-Lagrange Equation for $L(t,q_1 , … , q_n , \dot{q_1}, … , \dot{q_n})$ is:**

$$\frac{\partial L}{\partial q_i} = \frac{d}{dt} \left( \frac{\partial L}{\partial \dot{q_i}} \right), \, i = 1, … , n$$

In cases with constraints, let C be constraint. The E-L equation becomes:

$$\frac{\partial L}{\partial q_i} – \lambda \frac{\partial C}{\partial q_i}= \frac{d}{dt} \left( \frac{\partial L}{\partial \dot{q_i}} \right), \, i = 1, … , n$$

____________

**Steps to find Hamilton function:**

- Find $L = T – V$
- Conjugate momentum: $p_i (q_i, \dot{q_i}, t) = \frac{\partial L}{\partial \dot{q_i}}$
- $H = \sum_{i}^{} \dot{q_i} p_i – L$
- Sub. $\dot{q_i}$ into the equation in 3.

**Hamilton’s equation of motion:**

$$\dot{x_k} = \frac{\partial H}{\partial p_k}$$

$$\dot{p_k} = \, – \frac{\partial H}{\partial x_k}$$

$$\dot{H} = \frac{\partial H}{\partial t}$$