# Lagrangian Mechanics

## Conservative vs. Non-conservative

### The Lagrangian

$$L = T - U$$

$$\frac{\partial L}{\partial x} - \frac{d}{dt} \frac{\partial L}{\partial \dot{x}} = 0$$ leads to: $$\frac{\partial L}{\partial x} = - \frac{\partial U}{\partial x} = F_x$$ and $$\frac{d}{dt}\frac{\partial L}{\partial \dot{x}} = \frac{d}{dt}m \dot{x} = m\ddot{x}$$ so: $$F_x = m\ddot{x}$$

Do it for all three dimensions and you have $$-\nabla U = m \mathbf{a} \Rightarrow \mathbf{F} = m \mathbf{a}$$

## Hamilton's Principle / Principle of Least Action

$$S[q_k(t)] = \int_{t_1}^{t_b} dt L(t,q_1,q_2,\ldots,\dot{q}_1,\dot{q}_2,\ldots) = \int_{t_a}^{t_b} L(t,q_k,\dot{q}_k)$$ When $S$ is stationary, i.e. $$\delta S = \delta \int_{t_a}^{t_b} L(t,q_k,\dot{q}_k) = 0$$ then the $q_k(t)$s will satisfy the equations of motions for the system between the boundary conditions.

### Generalized Coordinates

#### Polar Coordinates →

Find the Lagrange Equations for a particle moving in two dimensions under the influence of a conservative force using polar coordinates

### Force of Constraint

By reducing the number of coordinates, we can imply a 'force of constraint'

#### Examples of Constraints

In this classic case, a naive application of Newton's Laws would suggest two coordinates. However, since the block is constrained to the surface of the ramp, there really is only one independent variable.

Likewise, with the Atwood Machine, there really is only one coordinate.

Pendulums are also great examples of systems with a constrain: the length of the string doesn't change.