Lagrangian Mechanics
Table of Contents
1. Lagrange’s Prescription of Constraint Forces
Consider a system of \(n\) particles. Then, we can express the constraint applied to the system as:
\begin{align} \mathbf{f}_1 \cdot \mathbf{v}_1 + \mathbf{f}_2 \cdot \mathbf{v}_2 + \cdots + \mathbf{f}_n \cdot \mathbf{v}_n = 0 \end{align}where \(\mathbf{v}_k\) are velocity vectors and \(\mathbf{f}_k\) are “direction” vectors.
Then, the corresponding constraint forces on the system is:
\begin{align} \boxed{\mathbf{F}_k = \mu \mathbf{f}_k} \end{align}2. Generalized Coordinates
Consider a system of \(n\) particles subject to \(m\) holonomic constraints. The generalized coordinates of the system is:
\begin{align} q = \begin{bmatrix} q_1 & q_2 & \cdots & q_{3n} \end{bmatrix} \end{align}Let the last \(m\) generalized coordinates be equal to the \(m\) holonomic constraints acting on the system. Then, the number of degrees of freedom will be \(3n-m\).
We can also find the generalized velocities from the derivatives of the generalized coordinates. These are expressed as:
\begin{align} u = \begin{bmatrix} u_1 & u_2 &\cdots & u_{3n} \end{bmatrix} \end{align}3. Lagrange’s Equations of Motion
Lagrange’s equations of motion can be expressed as:
\begin{align} \boxed{\frac{\text{d}}{\text{d}t}\left(\frac{\partial T}{\partial u_i}\right) - \frac{\partial T}{\partial q_i} = \sum_{k=1}^n \mathbf{F}_k \cdot \frac{\partial \mathbf{r}_k}{\partial q_i}} \end{align}where \(T\) is kinetic energy. The first \(3n-m\) equations give you the equations of motion, and the last \(m\) give the constraints.
We can also write this in terms of the Lagrangian, which is defined as:
\begin{align} L = T - U \end{align}Then, (5) becomes:
\begin{align} \boxed{\frac{\text{d}}{\text{d}t}\left(\frac{\partial L}{\partial u_i}\right) - \frac{\partial L}{\partial q_i} = \sum_{k=1}^n \mathbf{F}_{\text{NC}_k} \cdot \frac{\partial \mathbf{r}_k}{\partial q_i}} \end{align}Example: Simple harmonic oscillator
For a simple harmonic oscillator, our generalized coordinates are:
\begin{align} q &= \begin{bmatrix} x & y & z \end{bmatrix} \notag \\ u &= \begin{bmatrix} v_x & v_y & v_z \end{bmatrix} \notag \end{align}The kinetic energy is
\begin{align} T = \frac{1}{2}m\mathbf{v}\cdot\mathbf{v} = \frac{1}{2}(v_x^2 + v_y^2 + v_z^2) \notag \end{align}Our constraints can be represented as
\begin{align} y &= 0 \Rightarrow \mathbf{v}\cdot\mathfb{E}_y = 0 \notag \\ z &= 0 \Rightarrow \mathbf{v}\cdot\mathbf{E}_z = 0 \notag \end{align}Then, our constraint forces are
\begin{align} \mathbf{F}_C = \mu_1 \mathbf{E}_y + \mu_2 \mathbf{E}_z \notag \end{align}We can now write, where \(\mathbf{F} = \mathbf{F}_C - mg\mathbf{E}_y - kx\mathbf{E}_x\) and \(\mathbf{r}=x\mathbf{E}_x + y\mathbf{E}_y + z\mathbf{E}_z\):
\begin{align} \frac{\text{d}}{\text{d}t}\left(\frac{\partial T}{\partial v_x}\right) - \frac{\partial T}{\partial x} &= \mathbf{F} \cdot \frac{\partial \mathbf{r}}{\partial x} \Rightarrow ma_x = -kx \notag \\ \frac{\text{d}}{\text{d}t}\left(\frac{\partial T}{\partial v_y}\right) - \frac{\partial T}{\partial y} &= \mathbf{F} \cdot \frac{\partial \mathbf{r}}{\partial y} \Rightarrow \mu_1=mg \notag \\ \frac{\text{d}}{\text{d}t}\left(\frac{\partial T}{\partial v_z}\right) - \frac{\partial T}{\partial z} &= \mathbf{F} \cdot \frac{\partial \mathbf{r}}{\partial z} \Rightarrow \mu_2 = 0 \notag \end{align}