# Lagrangian Mechanics

Suppose we have a system with $$N$$ particles. Then we need $$n = ND$$, where $$D=3$$ for 3D systems, parameters at most to describe the positions of the system.

The system may be constrained, i.e. $$f_\ell(\vec{r}_1,\vec{r}_2,\cdots\vec{r}_n,t) = 0$$ with $$\ell = 1, 2, \cdots k$$. These functions are called holonomic constraint functions.

Denoting the position of the $i-$th particle: $$\vec{r}_i$$. We must choose a set of coordinates: we denote the set of generalized coordinates as $$q_j$$, which may not have units of length. So, $$\{q\} = \{q_i:1\leq i \leq N\cdot D\}$$. So now we can describe $$\vec{r}_i = \vec{r}_i(q_i,\cdots,q_n,t)$$.

One can show that, if $$\vec{r}_i = \vec{r}_i(q_i,\cdots,q_n,t)$$:

1. $$\frac{\partial\vec{V}_i}{\partial\dot{q}_\alpha} = \frac{\partial\vec{r}_i}{dq_\alpha}$$ where $$\vec{V}_i = \frac{d}{dt}\vec{r}_i$$.
2. $$\frac{d}{dt}\left(\frac{\partial\vec{r}_i}{\partial q_\alpha}\right) = \frac{\partial}{\partial q_\alpha}\left(\frac{d\vec{r}_i}{dt}\right)$$.

Proof of 1: $$\vec{V}_i = \frac{d\vec{r}_i}{dt} = \sum_\lambda \frac{\partial \vec{r}_i}{\partial q_\lambda}\dot{q}_\lambda + \frac{\partial \vec{r}_i}{\partial t}$$. So, $$\frac{\partial}{\partial \dot{q}_\alpha} = \frac{\partial \vec{r}_i}{\partial q_\alpha}$$.

Proof of 2: $$\frac{d}{dt}\left(\frac{\partial \vec{r}_i}{\partial q_\alpha}\right) = \frac{d}{dt}\left(\frac{\partial \vec{V}_i}{\partial \dot{q}_\alpha}\right) = \frac{d}{dt}\left(\frac{\partial}{\partial \dot{q}_\alpha}\frac{d}{dt}\vec{r}_i\right)$$…

Real displacement: $$d\vec{r}_i = \sum_\lambda\frac{\partial \vec{r}_i}{\partial q_\lambda}dq_\lambda + \frac{\partial\vec{r}_i}{\partial t}dt$$.

Virtual displacement is a displacement without involving time. $$\delta\vec{r}_i = \sum_\lambda \frac{\partial \vec{r}_i}{\partial q_\lambda}\delta q_\lambda$$.

## D’Alembert’s Principle

For a system of $$N$$ particles, the reaction forces do NO work during Virtual Displacement.

Consider the $i-$th particle, $$\vec{F}_i^{(e)} + \vec{R}_i = \dot{\vec{P}}_i$$. So, $$-\vec{R}_i = \vec{F}_i^{(e)} - \dot{\vec{P}}_i$$. Hence, by the principle: $$-\sum\vec{R}_i\cdot\delta\vec{r}_i = 0$$. So, $$\sum(\vec{F}_i^{(e)} - \dot{\vec{P}}_i)\cdot\delta\vec{r}_i = 0 \Rightarrow \sum_i \vec{F}_i^{(e)}\cdot\delta\vec{r}_i = \sum \dot{\vec{P}}_i\cdot\delta\vec{r}_i$$.

Every constraint has a constraint force. E.g. for a particle confined to a surface due to gravity the constraint force is the normal force. This constraint force, the reaction force, does no work. Any virtual displacement is normal to the normal force is zero.

The total force on the $i-$th particle is: $$\vec{F}_i = \vec{F}_i^{(a)} + \vec{R}_i = \dot{\vec{P}}_i$$. So, $$\sum(\vec{F}_i^{(a)} - \dot{\vec{P}}_i)\cdot\delta\vec{r}_i = 0 \Rightarrow \sum_i \vec{F}_i^{(a)}\cdot\delta\vec{r}_i = \sum \dot{\vec{P}}_i\cdot\delta\vec{r}_i$$. Note, $$\vec{F}_i^{(a)}$$ is not the total external force on particle $$i$$ hence the sum is required for the equality. RHS is then $$\sum_i m_i\ddot{\vec{r}}_i\cdot\sum_j \frac{\partial \vec{r}_i}{\partial q_j}\delta q_j = \sum_{ij}\ddot{\vec{r}}_i\cdot\frac{\partial \vec{r}_i}{\partial q_j}\delta q_j = \sum_{ij}\left[\frac{d}{dt}\left(m_i\dot{\vec{r}}_i\cdot\frac{\partial\vec{r}_i}{q_j}\right) - m_i\dot{\vec{r}}_i\cdot \frac{d}{dt}\left(\frac{\partial \vec{r}_i}{\partial q_j}\right)\right]\delta q_j = \sum_{ij} \left[\frac{d}{dt}\frac{\partial}{\partial \dot{q}_j}\left(\frac{1}{2}m_i\dot{\vec{r}}^2\right) - \frac{\partial}{\partial q_j}\left(\frac{1}{2}m_i\dot{\vec{r}}_i^2\right)\right]\delta q_j = \sum_j\left(\frac{d}{dt}\frac{\partial}{\partial \dot{q}_j}\left(\sum_i\frac{1}{2}m_i\dot{\vec{r}}_i^2\right) - \frac{\partial}{\partial q_j}\left(\sum_i\frac{1}{2}m_i\dot{\vec{r}}_i\right)\right)\delta q_j = \sum_j\left[\frac{d}{dt}\frac{\partial}{\partial\dot{q}_j}T-\frac{\partial}{\partial q_j}T\right]\delta q_j$$. The LHS is then, $$\sum_j\left(\sum_i\vec{F}_i^{(a)}\cdot\frac{\partial\vec{r}}{\partial q_j}\right)\delta q_j = \sum_j Q_j\cdot \delta q_j$$.

We now limit the generalized forces to one where they are derived from a scalar potential. hence, $$\vec{F}_i^{(a)} = -\nabla_i V(\{\vec{r}_j\},t)$$. So, $$Q_j = -\nabla_i V(\{\vec{r}_j\},t)\cdot\frac{\partial \vec{r}}{\partial q_j} = \cdots = -\frac{\partial V}{\partial q_j}$$.

Therefore, $$-\sum_j\frac{\partial V}{\partial q_j}\delta q_j = \sum_j\left[\frac{d}{dt}\frac{\partial}{\partial\dot{q}_j}T-\frac{\partial}{\partial q_j}T\right]\delta q_j$$. Hence, $$\sum_j\left[\frac{d}{dt}\frac{\partial T}{\partial\dot{q}_j}-\frac{\partial T}{\partial q_j} + \frac{\partial V}{\partial q_j}\right]\delta q_j = 0$$. Therefore, $$V = V(q,t)$$. So, $$\frac{\partial V}{\partial\dot{q}_j} = 0$$. Thus, $$\sum_j\left[\frac{d}{dt}\frac{\partial (T-V)}{\partial\dot{q}_j}-\frac{\partial (T-V)}{\partial q_j}\right]\delta q_j = \sum_j\left[\frac{d}{dt}\frac{\partial}{\partial\dot{q}_j}-\frac{\partial}{\partial q_j}\right](T-V)\delta q_j = 0$$. Let $$\mathcal{L} = T - V$$ we get, $$\sum_j \left[\frac{d}{dt}\frac{\partial}{\partial\dot{q}_j} - \frac{\partial}{\partial q_j}\right]\mathcal{L}\delta q_j$$ Since we don’t know if the $$q_i$$ can vary independently, we must leave this in the summation. If they vary independently, the argument of the sum is enough.

Case 1: There does not exist a constraint function. Then, $$\left[\frac{d}{dt}\frac{\partial}{\partial\dot{q}_j} - \frac{\partial}{\partial q_j}\right]\mathcal{L} = 0$$, the Euler-Lagrange Equation of the Second Kind. This also requires by assumption that the forces are conservative.

Case 2: Suppose there exists holonomic constraint functions, say $$k$$ holonomic constraint functions, $$f_\ell(\{q\},t) = 0$$. Then for those dependent generalized coordinates, $$\sum_j\left[\frac{d}{dt}\frac{\partial}{\partial\dot{q}_j} - \frac{\partial}{\partial q_j}\right]\mathcal{L}\delta q_j = 0$$ for the dependent $$\{q_j\}$$. Consider, $$\delta f_\ell(\{q\},t) = \sum_j\frac{\partial f_\ell}{\partial q_j}\delta q_j = 0$$. So, $$\lambda_\ell\sum_j\frac{\partial f_\ell}{\partial q_j}\delta q_j = 0$$. Then, $$\sum_j\left[\frac{d}{dt}\left(\frac{\partial \mathcal{L}}{\partial\dot{q}_j}\right) - \frac{\partial\mathcal{L}}{\partial q_j}\right]\delta q_j - \sum_j\left[\sum_{\ell=1}^k\lambda_\ell\frac{\partial f_\ell}{\partial q_j}\right]\delta q_j = 0$$. Hence, $$\sum_{j=1}^k\left[\frac{d}{dt}\left(\frac{\partial\mathcal{L}}{\partial\dot{q}_j}\right) - \frac{\partial\mathcal{L}}{\partial q_j} - \sum_{\ell=1}^k\lambda_\ell \frac{\partial f_\ell}{\partial q_j}\right]\delta q_j + \sum_{j=k+1}^n\left(\frac{d}{dt}\left(\frac{\partial\mathcal{L}}{\partial\dot{q}_j}\right) - \frac{\partial\mathcal{L}}{\partial q_j}- \sum_{\ell=1}^k\lambda_\ell \frac{\partial f_\ell}{\partial q_j}\right)\delta q_j = 0$$.

Claim: $$\lambda_\ell$$ can be chosen such that each term in the first sum is identically zero. (And the last sum is filled with identically zero terms as in case 1). Then, we are left with $$n-k$$ independent coordinates left. $$k$$ equations and $$k$$ parameters. Hence, $$\left(\frac{d}{dt}\left(\frac{\partial\mathcal{L}}{\partial\dot{q}_j}\right) - \frac{\partial\mathcal{L}}{\partial q_j}- \sum_{\ell=1}^k\lambda_\ell \frac{\partial f_\ell}{\partial q_j}\right) = 0$$, the Euler-Lagrange Equation of the First Kind.

## Example: Central Force

Let $$V = -\frac{k}{r}, k > 0$$. Choose polar coordinates. The mass, $$m$$, is then expressed as $$(r,\theta,z)$$.

We transform the coordinate system so that $$z=0$$ is a constraint.

Our Lagrangian is: $$\mathcal{L} = T - V = \frac{1}{2}m\dot{r}^2 + \frac{1}{2}mr^2\dot{\theta}^2 + \frac{k}{r} = \mathcal{L}(r,\dot{r},\dot{\theta})$$. For $$r$$: $$m\ddot{r} - mr\dot{\theta}^2 + \frac{k}{r^2} = 0$$, the same as you would get Newton’s Second Equation. For $$\theta$$: $$\frac{d}{dt}(mr^2\dot{\theta}) = 0$$. So, $$mr^2\dot{\theta} = \mathbb{C}$$, hence the Angular Momentum is conserved.

So, $$m^2r^3\ddot{r} - \mathbb{C}^2 + mkr = 0$$.

## Example: Cylinder on Incline

Cylinder on Incline under the influence of gravity with no slippage. $$\alpha$$ is the angle of the incline. The radius of the cylinder is $$r$$ and the length of the incline is $$\ell$$.

Align the coordinates with the incline, the origin at the starting point. Our generalized coordinates are then $$(x,\theta)$$. $$x = r\theta$$.

$$\mathcal{L} = \frac{1}{2}m\dot{x}^2 + \frac{1}{2}I\dot{\theta}^2 - mg(\ell-x)\sin\alpha = \frac{1}{2}m\dot{x}^2 + \frac{1}{4}mr^2\dot{\theta}^2 - mg(\ell-x)\sin\alpha$$.

$$x$$: $$m\ddot{x} - mg\sin\alpha + \lambda = 0 \Rightarrow \ddot{x} = g\sin\alpha - \frac{\lambda}{m}$$. Then, $$x(t) = \left(g\sin\alpha - \frac{\lambda}{m}\right)t^2 + \dot{x}_1 t + x_0 = \left(g\sin\alpha - \frac{\lambda}{m}\right)t^2$$.

$$\theta$$: $$\frac{1}{2}I\ddot{\theta} - \lambda r = 0 \Rightarrow \ddot{\theta} = -\frac{4\lambda}{mr}$$. Then, $$\theta(t) = -\frac{2\lambda}{mr}t^2 + \dot{\theta}_1 t + \theta_0 = -\frac{2\lambda}{mr}t^2$$.

Therefore: $$x(t) = r\theta(t) \Rightarrow \frac{mg}{3}\sin\alpha = \lambda$$. Then, $$x(t) = \frac{2}{3}g\sin\alpha t^2$$.

Alternatively: $$x$$: $$\frac{1}{2}m\dot{x}^2 + \frac{1}{4}m\dot{x}^2 - mg(\ell - x)\sin\alpha$$ $$m\ddot{x} + \frac{1}{2}m\ddot{x} - mg\sin\alpha = 0$$. $$\frac{3}{2}\ddot{x} = g\sin\alpha$$. $$x(t) = \frac{2}{3}g\sin\alpha t^2 + \dot{x}_0 t + x_0$$.

Then, $$t_\ell = \sqrt{\frac{3\ell}{2g\sin\alpha}}$$.

$$\mathcal{L} = \frac{1}{2}m\dot{x}^2 + \frac{1}{2}mr^2\dot{\theta}^2 - mg(\ell-x)\sin\alpha$$, $$f = r\theta - x = 0$$. Then, $$\lambda = mr\ddot{\theta}$$ and $$\lambda = m\ddot{x}$$ So, $$2m\ddot{x} = mg\sin\alpha$$ hence $$\ddot{x} = \frac{1}{2}g\sin\alpha$$. Our constraint force is then $$\frac{mg}{2}\sin\alpha$$.

$$m\ddot{x} - mg\sin\alpha +\lambda = 0$$ gives the Newton’s second law. $$mr^2\ddot{\theta} - \lambda r = 0$$ gives the torque equation.

## Example: Cylinder stacked on a Cylinder

Top smaller cylinder rolls down with no slippage.

Ansatz: It flies off at the 45 degree tangent.

For simplicity, assume the masses are the same. Let the bottom cylinder have radius $$R_1$$ and the top have radius $$R_2$$. Let $$\theta_1$$ be the angle of the smaller one on the larger one. Let $$\theta_2$$ be the angle of the smaller one relative to its own center of mass.

Our coordinates: $$(r, \theta_1, \theta_2)$$ with $$r=R_1 + R_2$$. Another constraint is that $$\theta_1 R_1 = (\theta_2-\theta_1) R_2$$.

$$\mathcal{L} = \frac{1}{2}m\dot{r}^2 + \frac{1}{2}mr^2\dot{\theta}_1^2 + \frac{1}{2}\left(\frac{1}{2}mR_2^2\right)\dot{\theta}_2 - mgr\cos\theta_1$$. $$r-R_1 - R_2 = 0$$ and $$R_1\theta_1 - R_2(\theta_2-\theta_1) = 0$$.

Solve for when $$\lambda_1 = 0$$.

Will find that $$\theta_1 = \arccos(4/7) \approx 55.15^\circ$$.

Created: 2024-05-30 Thu 21:16

Validate