Sunday, July 9, 2017

none

$ \let\ss\scriptstyle \let\sss\scriptscriptstyle \newcommand{\bs}[1]{\boldsymbol{#1}} \newcommand{\+}{\hspace{1mu}} \newcommand{\dt}[1]{\overset{\sss \bullet}{#1}} \newcommand{\ddt}[1]{\overset{\sss \bullet \bullet}{#1}} \newcommand{\ppt}[1]{\overset{\circ \circ}{#1}} \newcommand{\pow}[1]{\raise{.8ex}{\ss{#1}}} \newcommand{\vshift}[2]{\raise#1ex\hbox{${#2}$}} \newcommand{\uminus}{\vshift{.17}{\bs{\ss{-}}}} \newcommand{\pt}[1]{\underset{\vshift{1}{\ss \circ}}{#1}} \renewcommand{\i}{\+\pow{(i)}} \renewcommand{\ii}{^{(i)}} \renewcommand{\p}{\partial} \renewcommand{\d}{\delta} \renewcommand{\a}{\alpha} \renewcommand{\b}{{\vshift{-.4}{\ss\beta}}} \renewcommand{\g}{\gamma} \renewcommand{\R}{\bs{R}} \renewcommand{\V}{\bs{V}} \renewcommand{\A}{\bs{A}} \renewcommand{\P}{\bs{P}} \renewcommand{\F}{\bs{F}} \renewcommand{\Q}{Q_{\a\b}} \renewcommand{\L}{\mathcal{L}} \renewcommand{\H}{\mathcal{H}} \renewcommand{\dR}{\dt{\R}} \renewcommand{\ddR}{\ddt{\R}} \newcommand{\sdt}[1]{\lower{.5ex}{\ss \dt{#1}}} \newcommand{\dXdq}[2]{\p_{#1} {#2}} \newcommand{\dXdp}[2]{\p^{#1} {#2}} \newcommand{\dXdqt}[2]{\p \sdt{#1} {#2}} \newcommand{\dRdq}{\dXdq{\a}{\R}} \newcommand{\dVdq}{\dXdq{\a}{\V}} \newcommand{\dLdq}{\dXdq{\a}{L}} \newcommand{\dLdqt}{\dXdqt{\a\+}{L}} \newcommand{\dHdq}{\dXdq{\a}{H}} \newcommand{\dHdp}{\dXdp{\a}{H}} \newcommand{\qdot}[1]{\dt{q} \pow{#1}} $ In this blurb we take d'Alembert's principle and from it derive Lagrange's and Hamilton's equations of motion. Both sets of equations are then expanded using tensor notation. In a recent post we derived the equations of motion of a single particle constrained to a rigid surface. Here we generalize the result to systems of particles and time-dependent constraints. In the next blurb we will look at a few illuminating examples. Assumptions Suppose we have $n$ particles with respective masses, positions, velocities, accelerations, and exerted forces $m\i, \R\i, \V\i, \A\i, \F\i$. We assume that the masses are fixed and that the system has $\eta$ degrees of freedom characterized by the independent generalized coordinates $q^\alpha$. We also assume that all constraints are implicitly contained in the transformation relations between the positions and coordinates. In other words, the constraints are holonomic and they are implicit in $$ \R\i \; = \; \R\i (q^1, q^2, ... , q^\eta, t) \tag{1} $$ This can be more succinctly written $\R\i = \R\i(q,t)$. We will use a mix of notation; an overset $\bullet$ to denote full-time derivatives, an overset $\circ$ to denote partial time derivatives, $\p_\alpha$ to denote partial $q$ derivatives, $\dXdqt{\a}{}$ to denote partial $\dt{q}$ derivatives, and Einstein's summation convention for matching lower and upper (Greek) indices.. Trust me, there is a reason for this funky notation. The velocities of the particles are thus $$ \V\i \; = \; \dt{q} \pow{\alpha} \+ \dXdq{\a}{\R\i} \; + \; \pt{\R}\i \tag{2} $$ Newton to Lagrange We start with Newton's law and from there derive Lagrange's equations and then Hamilton's. Before we start, consider the arbitrary functions $X(q, \dt{q}, t)$ and $Y(q,t)$. Using the chain rule and the commutivity of partial derivatives, is is easy to show that $$ \begin{array}{rcl} \dt{ \left[ \+ \dXdq{\a}{X} \+ \right] } &=& \dXdq{\a}{\dt{X}} \\ \dt{ \left[ \+ \dXdqt{\a}{X} \+ \right] } &=& \dXdqt{\a}{\dt{X}} - \dXdq{\a}{X} \\ \dXdq{\a}{Y} &=& \dXdqt{\a}{\dt{Y}} \tag{3} \end{array} $$ Note the third identity is a direct consequence of the second. We will use these identities throughout. Let us start by defining the momentum of each particle $\P\i = m\i \V \i$. Newton's second law equates force to a change in momentum. $$ \F\i \;\; = \;\; \dt{P}\i \tag{4} $$ If we change our philosophy and introduce the concept of virtual work we arrive at the statement of equilibrium known as d'Alembert's principle. D'Alembert's principle is a more workable expression of Newton's law: $$ \sum_i \+ \left( \F\i \+ - \+ \dt{\P}\i \right) \cdot \d \R\i \; = \; 0 \tag{5} $$ We can now drop the superscripts $\i$ without ambiguity. Our virtual displacement can be expanded $\d \bs{R} = \dRdq \, \d q^\alpha$. Since the $q$'s are assumed to be independent, the vanishing of the LHS requires the vanishing of every individual term. This leads us to a system of $\eta$ independent equations $$ \sum \left( \F \+ - \+ m \A \right) \cdot \dRdq \; = \; 0 $$ where we note that by assumption $\dt{m} = 0$. Let us ignore the force for the moment and consider only the acceleration term. Identifying $\A = \ddt{\R}$, a simple application of the product rule equates $$ \ddR \cdot \dRdq \; = \; \dt{\left[ \+ \dR \cdot \dRdq \+ \right] } \, - \, \dt{\bs{R}} \cdot \dt{[\+ \dRdq \+ ]} $$ From (3) we know that $\dRdq \; = \; \dXdqt{\a}{\V}$ and also that $\dt{ [\+ \dRdq \+] }\; = \; \dVdq $. These two relations allow us to replace all the $\bs{R}$'s with $\bs{V}$'s in the previous expression. $$ \dt{ \left[ \+ \V \cdot \dXdqt{\a}{\V} \+ \right] } \, - \, \V \cdot \dVdq $$ Substituting in the product rule identity $\V \cdot \p \V = \frac{1}{2} \p (\bs{V} \cdot \V)\,$ yields $$ \dt{ \left[ \+ \tfrac{1}{2} \+ \dXdqt{\a}{\+(\V \cdot \V)} \+ \right] } \, - \, \tfrac{1}{2} \+ \dXdq{\a}{(\V \cdot \V)} $$ Finally, introducing the kinetic energy $T = \sum \frac{1}{2} m \V \cdot \V$ and the generalized force $F_\a = \sum \F \cdot \dRdq,\;$ d'Alembert's principle takes the form $$ \dt{ \left[ \+ \dXdqt{\a\+}{T} \+ \right]} \, - \, \dXdq{\a}{T} \; = \; F_\a \tag{6} $$ These are Lagrange's equations of motion. Note that we can rewrite this in another nice form by applying (3) to the first term $$ \dXdqt{\a\+}{\dt{T}} \, - \, 2 \+ \dXdq{\a}{T} \; = \; F_\a $$ However, it is typically more convenient to take the partial $\dXdqt{\a}{}$ first, so we will let (6) be the final form. The Lagrangian Suppose the forces can be decomposed $\F\i = \bs{C}\i + \ldots $ where the net virtual work that $\bs{C}\i$ does on the system vanishes, ie. $\sum \bs{C} \cdot \d \R = 0$. Then $\bs{C}\i$ disappears from the equations of motion and we can remove it from our consideration. The choice of letter $C$ was no accident. Due to macroscopic idealizations, we can often fashion the constraint forces such that they net zero virtual work. Such was the case of a sliding bead, where we took the constraint force to be perpendicular to the surface. Now also suppose that we can find some scalar potential function $V(\R^{(1)}, \R^{(2)}, \ldots, \R^{(n)}, t)$ such that $\F\i = \nabla_{\!(i)}\+ U + \ldots$ (eg. gravitational forces). Then the generalized force $\F_\a = -\dXdq{\a}{U} + \ldots $ which can be moved to the LHS. Even more generally, if we can find a scalar function $U(q,\dt{q},t)$ such that $$ F_\a \; = \; \dt{ \left[ \dXdqt{\a}{U} \right] } \, - \, \dXdq{\a}{U} \;\; + \;\; \ldots $$ then by defining the Lagrangian $L = T - U$ we can rewrite Lagrange's equations as $$ \dt{ \left[ \+ \dXdqt{\a\+}{L} \+ \right]} \, - \, \p_{\a} L \;\; = \;\; \ldots $$ It is also worth noting that there is no unique Lagrangian for a particular set of equations of motion. If we change the Lagrangian to $$ \bar{L}(q, \dt{q}, t) \; = \; L(q, \dt{q}, t) \, - \, \dt{X}(q,t) $$ where $X$ is any differentiable function of the coordinates and time, then we will arrive at the same equations of motion. So our sequence of simplifications goes as follows. Remove any forces that net zero virtual work on the system. Then if possible, decompose the generalized forces into a potential function $U$ and move $U$ into the Lagrangian on the LHS. Finally, try to simplify the Lagrangian by subtracting away the time derivative of any scalar function of $q$ and $t$. What we are left with are simplified versions of the Lagrangian, generalized forces, and equations of motion. $$ \dt{ \left[ \+ \dLdqt \+ \right]} \, - \, \dLdq \; = \; F_\a \tag{7} $$ Lagrange to Hamilton The Hamiltonian formulation of mechanics is in many ways the most natural -- this leads to a very interesting philosophical discussion -- conservation laws and (numerical) symplectic methods, least-action principles and the macroscopic limit of quantum mechanics (where the Hamiltonian plays a central role) -- perhaps the topic of a post down the road. In any case, Hamilton's equations can be derived as follows. We introduce the momenta conjugate to $q$, which we treat as the new set of coordinates $$ p_\a \; = \; \dLdqt \tag{8} $$ Note that substituting $p$ into Lagrange's equations yields $\dt{p}_\a \, - \, \dLdq \; = \; F_\a$. We also define the Hamiltonian as the Legendre transform of the Lagrangian. $$ H \; = \; \dt{q}\pow{\+\a} \, p_\a \, - \, L \tag{10} $$ Keep in mind that these are definitions and note the Einstein summation. Consider the infinitesimal change $\d H$. Comparing the $\d$ of each side of (9) will lead us to Hamilton's equations. On the LHS, we treat the Hamiltonian as a function $H(q,p,t)$ and expand $\d H$ into $$ \d H \;\; = \;\; (\dHdq) \, \d q^\a \;+ \; (\dHdp) \, \d p_\a \; + \; \pt{H} \, \d t $$ On the other hand, on the RHS we treat the Lagrangian as a function $L(q,\dt{q},t)$ and expand $\d H$ into $$ \d H \;\; = \;\; \cancel{p_\a \, \d \dt{q}\pow{\+\a}} \; + \; \dt{q}\pow{\+\a} \, \d p_\a \; - \; (\dLdq) \, dq^\a \; - \; \cancel{(\dLdqt) \, \d \dt{q}\pow{\+\a}} \; - \; \pt{L} \, \d t $$ where the crossed out terms cancel eachother by definition of $p$. Since the $q$ and $p$ are taken to be independent (in phase space), we can equate the coefficients of $\d$ $$ \begin{array}{rcl} \dHdq &=& \uminus \dLdq \\ \dHdp &=& \dt{q}\pow{\+\a} \\ \pt{H} &=& \uminus \pt{L} \end{array} \tag{11} $$ Hamilton's equations are then a direct consequence of (11) and Lagrange's equations. While Lagrange gives us a system of $\eta$ second order equations, Hamilton gives us the following system of $2 \eta\,$ first order equations $$ \begin{array}{rcl} \dt{q}\pow{\+\a} &=& \dHdp \\ \dt{p}_\a &=& F_\a \, - \, \dHdq \end{array} \tag{12} $$ Tensor Equations Here is where the notation really shines. We can think of (1) as a statement that each particle lives in the $\eta$-dimensional space of $q$'s. We can define the typical tensor quantities for each particle by using $\R\i$ as the vector field of position. The covariant basis for each particle is then $$ \bs{q}\ii_{\+\a} \; = \; \dRdq\ii $$ The covariant metric tensor of each particle is thus $$ q\ii_{\+\a\b} \; = \; \bs{q}\ii_{\+\a} \cdot \bs{q}\ii_{\+\b} $$ As in the previous section, I will often drop the (i) indices. Just keep in mind that any particle quantity has an implicit $\i$ attached. We define the covariant metric tensor of the system as the mass-weighted sum of the particle metric tensors $$ Q_{\a\b} = \sum m \, q_{\a\b} $$ We will start with Lagrange's equations in their full generality. Then we visit Hamilton's equations under a slight restriction on $U$. We finish with a Newtonian approach, which requires special care, but can also be the most rewarding. Let us define the Lagrangian operator $\L$ that acts on a function $$ \L_\a[X] \;\; = \;\; \dt{ [ \+ \dXdqt{\a}{X} \+ ] } \, - \, \dXdq{\a}{X} $$ Note that the operator is obviously linear. Because I like the way it sounds, I will use the term "Lagrangify" to represent an application of $\L$. Indeed, Lagrangifying the Lagrangian yields Lagrange's equations. Try saying that five times fast. $$ \L_\a[L] \; = \; \L_\a[T-U] \; = \; \L_\a[T] \, - \, \L_\a[U] \; = \; F_\a $$ This will be useful for carrying the potential $U$ around. While we treat $U$ as somewhat arbitrary, the kinetic energy $T$ has a concrete form in terms of the particle velocities $\V = \qdot{\a} \+ \bs{q}_{\+\a} + \pt{\R}$. $$ \begin{array}{rcl} T &=& \sum \tfrac{1}{2} m \V \cdot \V \\[1ex] &=& \qdot{\a} \+ \qdot{\b} \+ \left( \tfrac{1}{2} \+ \Q \right) \; + \; \qdot{\a} \+ S_\a \; + \; \tfrac{1}{2} S \end{array} $$ where we've used the letter $S$ to define the rheonomous (explicit time) contributions. You can think of $S$ as a "speed" or just remember that it vanishes whenever the system is schleronomous. In the same vein we will overload the letter $A$ to define the rheonomous "acceleration" which I promise will not cause any ambiguities (I really can't think of a better letter to use). $$ \begin{array}{rcl} S &=& \sum \, m \, \pt{R} \cdot \pt{\R} \\ S_\a &=& \sum \, m \, \bs{q}_\a \cdot \pt{\R} \\ A_\a &=& \sum \, m \, \bs{q}_\a \cdot \ppt{\R} \\ \pt{Q}_{\a\b} &=& \sum \, 2 \+ m \, \bs{q}_\a \cdot \pt{\bs{q}}_\b \end{array} $$ Lagrangifying $T$ is fairly straightforward application of the chain rule, but the expression becomes quite messy so we break it up into parts. First we find the coordinate derivatives $$ \begin{array}{rcl} \dXdq{\g\+}{T} &=& \qdot{\a} \+ \qdot{\b} \+ \left( \tfrac{1}{2} \+ \dXdq{\g}{\Q} \right) \; + \; \qdot{\a} \+ \left( \dXdq{\g}{S_\a} \right) \; + \; \tfrac{1}{2} \dXdq{\g}{S} \\ \dXdqt{\g\+}{T} &=& \qdot{\a} \, Q_{\a\g} \; + \; S_\g \\ \end{array} $$ Taking the time derivative of the second term $$ \begin{array}{rcl} \dt{ \left[ \+ \dXdqt{\g\+}{T} \+ \right] } &=& \ddt{q} \pow{\a} \, Q_{\a\g} \; + \; \qdot{\a} \, \dt{Q}_{\a\g} \; + \; \dt{S}_\g \\ & = & \ddt{q} \pow{\a} \, Q_{\a\g} \; + \; \qdot{\a} \+ \qdot{\+\b} \+ \left( \dXdq{\b}{Q_{\a\g}} \right) \; + \; \qdot{\a} \, ( \pt{Q}_{\a\g} \+ + \+ \dXdq{\a}{S_\g} ) \; + \; \pt{S}_\g \end{array} $$ Note the two identities $$ \begin{array}{rclcl} \dXdq{\a}{S_\g} - \dXdq{\g}{S_\a} &=& \frac{1}{2} {\large(} \pt{Q}_{\g\a} - \pt{Q}_{\a\g} {\large)} &=& 0 \\ \pt{S}_\g \+ - \+ \frac{1}{2} \dXdq{\g}{S} &=& A_\g\\ \end{array} $$ where the first follows from symmetry. Putting the pieces together yields $$ \L_\g[T] \;\; = \;\; \ddt{q} \pow{\a} \, Q_{\a\g} \; + \; \qdot{\a} \+ \qdot{\+\b} \+ \left( \dXdq{\a}{Q_{\b\g}} - \tfrac{1}{2} \dXdq{\g}{\Q} \right) \; + \; \qdot{\a} \, \pt{Q}_{\a\g} \; + \; \pt{A}_\g $$ Since the potential is just an arbitrary function $U(q, \dt{q}, t)$, we can Lagrangify it in one shot $$ \L_\g[U] \;\; = \;\; \ddt{q} \, \p \sdt{\a} \sdt{\g} \+ U \; + \; \qdot{\a} \, \p_\a \sdt{\g} U \; + \; {\large(} \dXdqt{\g\+}{\pt{U}} - \dXdq{\g\+}{U} {\large)} $$ Adding the two together gives us the left hand side of Lagrange's equations $$ \begin{array}{rclcl} \L_\gamma[L] &=& \ddt{q} \pow{\a} \+ A_{\a\g} \; + \; \qdot{\a} \+ \qdot{b} \+ B_{\a\b\g} \; + \; \qdot{\a} \+ C_{\a\g} \; + \; D_\g &=& F_\g \\ \\ A_{\a\g} &=& Q_{\a\g} \+ + \+ \p \sdt{\a} \sdt{\g} \+ U \\ B_{\a\b\g} &=& \dXdq{\a}{Q_{\b\g}} \+ - \+ \tfrac{1}{2} \dXdq{\g}{\Q} \\ C_{\a\g} &=& \pt{Q}_{\a\g} \+ + \+ \p_\a \sdt{\g} U \\ D_\g &=& A_\g \+ + \+ \dXdqt{\g\+}{\pt{U}} - \dXdq{\g\+}{U} \end{array} $$ To decouple the coordinate accelerations we need to invert $A_{\a\g}$, which is typically only feasible numerically. Let's consider the special case of a schleronomous system where $U=0$. Since we can always move $U$ to the RHS by adding $-\bs{\nabla} U$ to $\F$, Note that since $\R\i$ might not depend on all the coordinates, some of the basis vectors might vanish $\bs{q}\ii_{\+\a} = \bs{0}$. In such a case $q\ii_{\+\a\b}$ becomes singular and any particle-contravariant quantities are ill-defined. It is sometimes useful to define the restricted indices $\bar{\a}$ that run over only the dependent coordinates for each $(i)$, giving us the subset of basis vectors $\bs{q}\ii_{\+\bar{\a}}$ and the restricted metric tensor $q\ii_{\+\a\b}$. We can still run into trouble because there might be specific values of $q$ where the set $\bs{q}^{(.)}_{\+\bar{\a}}$ are dependent (eg. this happens when the double pendulum straightens out), We will see how to deal with by example in the next blurb. Typically we don't even care because the $\Q$ will always be invertible, so we can just forget about the individual particle tensors. However, there are certain situations where it is easier to deal with the individual particle quantities, even with the singular points. Consider the gravitational $n$-body problem where the particles are constrained to slide on a sphere. Then we can choose our coordinates as the individual spherical coordinates of each particle $\theta\i, \varphi\i$. Explicitly, $\{q^1, q^2, q^3, q^4, \ldots\} = \{\theta^{(1)}, \varphi^{(1)}, \theta^{(2)}, \varphi^{(2)}, \ldots \}$. The position of each particle only depends on its respective spherical coordinates $\R\i(\theta\i, \varphi\i)$. The resulting particle metric tensors $q\ii_{\+\a\b}$ are incredibly sparse, having only two nonzero elements out of $4 n^2$ total. The system metric tensor is simply the block-diagonal system $$ Q_{\a\b} \;\; = \;\; \left[ \begin{array}{cccccccc} q^{(1)}_{\bar{\a}\bar{\b}} \\ & q^{(2)}_{\bar{\a}\bar{\b}} \\ && q^{(3)}_{\bar{\a}\bar{\b}} \\ &&& \ldots \end{array} \right] $$ For systems of similar sparcit it is often easier to work with the individual $q\ii_{\bar{\a}\bar{\b}}$ rather than $Q_{\a\b}$.

No comments:

Post a Comment