# Appell's equation of motion

In classical mechanics, Appell's equation of motion (aka the Gibbs–Appell equation of motion) is an alternative general formulation of classical mechanics described by Josiah Willard Gibbs in 1879 and Paul Émile Appell in 1900.

## Statement

The Gibbs-Appell equation reads
    $Q_{r}={\frac {\partial S}{\partial \alpha _{r}}},$
where $\alpha _{r}={\ddot {q}}_{r}$ is an arbitrary generalized acceleration, or the second time derivative of the generalized coordinates $q_{r}$, and $Q_{r}$ is its corresponding generalized force. The generalized force gives the work done
    $dW=\sum _{r=1}^{D}Q_{r}dq_{r},$
where the index $r$ runs over the $D$ generalized coordinates $q_{r}$, which usually correspond to the degrees of freedom of the system. The function $S$ is defined as the mass-weighted sum of the particle accelerations squared,
    $S={\frac {1}{2}}\sum _{k=1}^{N}m_{k}\mathbf {a} _{k}^{2}\,,$
where the index $k$ runs over the $K$ particles, and
    $\mathbf {a} _{k}={\ddot {\mathbf {r} }}_{k}={\frac {d^{2}\mathbf {r} _{k}}{dt^{2}}}$
is the acceleration of the $k$-th particle, the second time derivative of its position vector $\mathbf {r} _{k}$. Each $\mathbf {r} _{k}$ is expressed in terms of generalized coordinates, and $\mathbf {a} _{k}$ is expressed in terms of the generalized accelerations.

## Relations to other formulations of classical mechanics

Appell's formulation does not introduce any new physics to classical mechanics and as such is equivalent to other reformulations of classical mechanics, such as Lagrangian mechanics, and Hamiltonian mechanics. All classical mechanics is contained within Newton's laws of motion. In some cases, Appell's equation of motion may be more convenient than the commonly used Lagrangian mechanics, particularly when nonholonomic constraints are involved. In fact, Appell's equation leads directly to Lagrange's equations of motion. Moreover, it can be used to derive Kane's equations, which are particularly suited for describing the motion of complex spacecraft. Appell's formulation is an application of Gauss' principle of least constraint.

## Derivation

The change in the particle positions r$_k$ for an infinitesimal change in the D generalized coordinates is
    $d\mathbf {r} _{k}=\sum _{r=1}^{D}dq_{r}{\frac {\partial \mathbf {r} _{k}}{\partial q_{r}}}$
Taking two derivatives with respect to time yields an equivalent equation for the accelerations
    ${\frac {\partial \mathbf {a} _{k}}{\partial \alpha _{r}}}={\frac {\partial \mathbf {r} _{k}}{\partial q_{r}}}$
The work done by an infinitesimal change dq$_r$ in the generalized coordinates is
    $dW=\sum _{r=1}^{D}Q_{r}dq_{r}=\sum _{k=1}^{N}\mathbf {F} _{k}\cdot d\mathbf {r} _{k}=\sum _{k=1}^{N}m_{k}\mathbf {a} _{k}\cdot d\mathbf {r} _{k}$
where Newton's second law for the kth particle
    $\mathbf {F} _{k}=m_{k}\mathbf {a} _{k}$
has been used. Substituting the formula for dr$_k$ and swapping the order of the two summations yields the formulae
    $dW=\sum _{r=1}^{D}Q_{r}dq_{r}=\sum _{k=1}^{N}m_{k}\mathbf {a} _{k}\cdot \sum _{r=1}^{D}dq_{r}\left({\frac {\partial \mathbf {r} _{k}}{\partial q_{r}}}\right)=\sum _{r=1}^{D}dq_{r}\sum _{k=1}^{N}m_{k}\mathbf {a} _{k}\cdot \left({\frac {\partial \mathbf {r} _{k}}{\partial q_{r}}}\right)$
Therefore, the generalized forces are
    $Q_{r}=\sum _{k=1}^{N}m_{k}\mathbf {a} _{k}\cdot \left({\frac {\partial \mathbf {r} _{k}}{\partial q_{r}}}\right)=\sum _{k=1}^{N}m_{k}\mathbf {a} _{k}\cdot \left({\frac {\partial \mathbf {a} _{k}}{\partial \alpha _{r}}}\right)$
This equals the derivative of S with respect to the generalized accelerations
    ${\frac {\partial S}{\partial \alpha _{r}}}={\frac {\partial }{\partial \alpha _{r}}}{\frac {1}{2}}\sum _{k=1}^{N}m_{k}\left|\mathbf {a} _{k}\right|^{2}=\sum _{k=1}^{N}m_{k}\mathbf {a} _{k}\cdot \left({\frac {\partial \mathbf {a} _{k}}{\partial \alpha _{r}}}\right)$
yielding Appell's equation of motion
    ${\frac {\partial S}{\partial \alpha _{r}}}=Q_{r}.$

## Examples
### Euler's equations of rigid body dynamics

Euler's equations provide an excellent illustration of Appell's formulation.
Consider a rigid body of N particles joined by rigid rods. The rotation of the body may be described by an angular velocity vector ${\boldsymbol {\omega }}$, and the corresponding angular acceleration vector
    ${\boldsymbol {\alpha }}={\frac {d{\boldsymbol {\omega }}}{dt}}$
The generalized force for a rotation is the torque ${\textbf {N}}$, since the work done for an infinitesimal rotation $\delta {\boldsymbol {\phi }}$ is $dW=\mathbf {N} \cdot \delta {\boldsymbol {\phi }}$. The velocity of the $k$-th particle is given by
    $\mathbf {v} _{k}={\boldsymbol {\omega }}\times \mathbf {r} _{k}$
where $\mathbf {r} _{k}$ is the particle's position in Cartesian coordinates; its corresponding acceleration is
    $\mathbf {a} _{k}={\frac {d\mathbf {v} _{k}}{dt}}={\boldsymbol {\alpha }}\times \mathbf {r} _{k}+{\boldsymbol {\omega }}\times \mathbf {v} _{k}$
Therefore, the function $S$ may be written as
    $S={\frac {1}{2}}\sum _{k=1}^{N}m_{k}\left(\mathbf {a} _{k}\cdot \mathbf {a} _{k}\right)={\frac {1}{2}}\sum _{k=1}^{N}m_{k}\left\{\left({\boldsymbol {\alpha }}\times \mathbf {r} _{k}\right)^{2}+\left({\boldsymbol {\omega }}\times \mathbf {v} _{k}\right)^{2}+2\left({\boldsymbol {\alpha }}\times \mathbf {r} _{k}\right)\cdot \left({\boldsymbol {\omega }}\times \mathbf {v} _{k}\right)\right\}$
Setting the derivative of S with respect to ${\boldsymbol {\alpha }}$ equal to the torque yields Euler's equations
    $I_{xx}\alpha _{x}-\left(I_{yy}-I_{zz}\right)\omega _{y}\omega _{z}=N_{x}$
    $I_{yy}\alpha _{y}-\left(I_{zz}-I_{xx}\right)\omega _{z}\omega _{x}=N_{y}$
    $I_{zz}\alpha _{z}-\left(I_{xx}-I_{yy}\right)\omega _{x}\omega _{y}=N_{z}$