Monday, June 26, 2017

(B10) - Dynamics Part 2






$
\let\ss\scriptstyle
\let\sss\scriptscriptstyle
\let\ds\displaystyle
\newcommand{\vshift}[2]{\raise#1ex\hbox{${#2}$}}
\newcommand{\bs}[1]{\boldsymbol{#1}}
\newcommand{\+}{\hspace{1mu}}
\newcommand{\dt}[1]{\overset{\sss \bullet}{#1}}
\newcommand{\ddt}[1]{\overset{\sss \bullet \bullet}{#1}}
\newcommand{\pt}[1]{\overset{\vshift{-.5}{\ss \circ}}{#1}}
\newcommand{\ppt}[1]{\overset{\vshift{-.5}{\ss \circ \circ}}{#1}}
\newcommand{\pow}[1]{\raise{.8ex}{\ss{#1}}}
\newcommand{\uminus}{\vshift{.17}{\bs{\ss{-}}}}

\renewcommand{\i}{\+\pow{(i)}}
\renewcommand{\j}{\+\pow{(j)}}
\renewcommand{\ii}{^{(i)}}
\renewcommand{\jj}{^{(j)}}
\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}}
$

Assumptions

In this blurb we take Newton's law and from it derive Lagrange's and Hamilton's equations of motion. In a recent post [dynamics 1] 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 [dynamics 3] we will expand the equations of motion using tensor notation. In the following [dynamics 4] we will look at a few illuminating examples. In the subsequent [dynamics 5,6,7,...] we will discuss many more topics: least action principles; symmetries and conservation laws; the emergence from quantum mechanics; qualitative analysis of long term dynamics and chaos; non-holonomic constraints; rigid bodies, and collisions; spacetime, black holes, and relativistic mechanics; finally numerical methods and an actual implementation of a physics engine...

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(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. This notation will be the most convenient to use with tensors. Note that the explicit time dependence in $\R$, for example, could come from the particle being constrained to slide on a moving surface. In the next post we will see that everything follows through nicely if we pretend $t$ is another coordinate $q^0$, which allows us to do away with the unconventional $\circ$ notation. For now, however, we will keep $t$ explicit. The velocities of the particles are thus
$$
        \V\i \; = \; \dt{q} \pow{\alpha} \+ \dRdq\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 (pun intended):
$$
\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$ where we don't include the term $\d t$ because we are performing a virtual spatial displacement. 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. We can actually 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 expression.


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 constraint forces such that they net zero virtual work -- in the previous post we took the constraint force of a sliding bead to be perpendicular to the surface. Note that so long as the net virtual work is zero, there is nothing preventing the forces from doing work individually, ie $\bs{C}\i \cdot \d \R\i \neq 0$. A simple example is the double pendulum, where the tension force of the second rod does equal and opposite work on each mass. In an intuitive sense, a set of forces is virtually workless if it is not an energy source or an energy drain on the system -- if (in a sense) it does the minimal amount of work to enforce the constraint.


Suppose that we can find some scalar potential function $U(\R^{(i)}, t)$ such that $\F\i = \uminus \nabla_{\!(i)} \+ U + \ldots$ Then the generalized force $\F_\a = \uminus \dXdq{\a}{U} + \ldots $ which can be combined with $T$ on 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
$$I often see the claim that Lagrange's or Hamilton's equations are inapplicable when there are forces present that cannot be written as a potential (eg. non-conservative forces). But there is nothing stopping us from keeping the corresponding generalized forces on the RHS. Consider the force of viscous friction $\F = \uminus \lambda \V$ that acts on a sliding bead. This force is non-conservative because it is a statistical approximation of the molecular interactions that actually occur (which are themselves conservative). In reality, some energy is irreversibly transferred into random molecular motion (heat), which is ignored by the macroscopic expression for $\F$. If we wanted to turn friction into a potential function we would need to account for the millions of particles moving about, which is impractical. For an example of a conservative system, consider the gravitational n-body problem where $G=1$ and $m\ii = 1$. It is not hard to verify the force-potential correspondence
$$
\begin{array}{rcl}
\F\i &=& \ds \sum_{j \; : \; j \neq i} \; \tfrac{\R\jj - \R\ii }{ \left| \R\ii - \R\jj \right|^3 } \\[1ex]
U &=& \ds \sum_{i,j \; : \;  i < j} \; \tfrac{-1}{ \left| \R\ii - \R\jj \right| }
\end{array}
$$Whether or not we use $\F$ or $U$ makes no difference. In fact, even when $U$ is a simpler expression, it is often computationally cheaper to just leave $\F$ on the RHS. The potential is useful because it allows you to carry around the EOMs in the neat little package $L$ -- it is quite remarkable that the dynamics of a system can be completely specified by a single scalar function. The potential $U$ can also be useful for getting a qualitative picture of the long term behavior of the system. Finally, it is 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 and if we so choose, 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 compact 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. Between conservation laws, the principle of least action, the macroscopic limit of quantum mechanics, and even numerical advantages (symplectic methods), there is a lot to discuss. Perhaps a philosophical discussion of the Hamiltonian will be the topic of a future post. In any case, Hamilton's equations are derived as follows. We introduce a new set of coordinates: the momenta conjugate to $q$
$$
p_\a \; = \; \dLdqt \tag{8}
$$ Note that substituting $p$ into Lagrange's equations yields $\dt{p}_\a \, - \, \dLdq \; = \; F_\a$. We now define the Hamiltonian as the Legendre transform of the Lagrangian.
$$
H \; = \; \dt{q}\pow{\+\a} \, p_\a \, - \, L \tag{9}
$$ Keep in mind that these are definitions and note the Einstein summation. Consider the differential $d H$. Comparing the differentials of each side of (9) leads us to Hamilton's equations. On the LHS, we treat the Hamiltonian as a function $H:(q,p,t)$ and expand $d H$ into
$$
dH \;\; = \;\; (\dHdq) \, dq^\a \;+ \; (\dHdp) \, dp_\a \; + \; \pt{H} \, dt
$$ where $\dXdp{\a}{}$ corresponds to the partial derivative with respect to $p_\a$. In contrast to the virtual displacement $\d \R$, the differential $d H$ does not require $d t=0$. Similarly, on the RHS we treat the Lagrangian as a function $L:(q,\dt{q},t)$ and expand $d H$ into
$$
dH \;\; = \;\; \cancel{p_\a \, d\dt{q}\pow{\+\a}} \; + \; \dt{q}\pow{\+\a} \, dp_\a \; - \; (\dLdq) \, dq^\a \; - \; \cancel{(\dLdqt) \, d\dt{q}\pow{\+\a}} \; - \; \pt{L} \, dt
$$ 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 the differentials
$$
\begin{array}{rcl}
    \dHdq &=& \uminus \dLdq \\
    \dHdp &=& \dt{q}\pow{\+\a} \\
    \pt{H} &=& \uminus \pt{L}
\end{array} \tag{10}
$$Hamilton's equations are then a direct consequence of combining Lagrange's equations with (10). 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{11}
$$


No comments:

Post a Comment