# Swing

When should you jump from a swing to get the furthest. The sooner you jump, the more speed you have, but the later you jump, the more upward speed you have and therefore, the longer you stay in the air. Let's calculate the angle $\alpha$.

The variables involved are the release angle $\alpha_r$, which is the largest angle at which the swing gets, the length of the swing $l$ and the free height of the swing above the ground $h_f$.

The total distance $d$ is the sum of the distance on the swing $d_s$ and the free distance $d_f$. The first is easily found from the drawing, the second we know from the cannon calculation

\begin{equation} d = d_s + d_f = l\sin(\alpha) + \frac{v^2}{g}\cos(\alpha)\sin(\alpha) \left(1 + \sqrt{1+2gh/\left(v^2\sin^2(\alpha)\right)}\right) \end{equation}The velocity at the moment of jumping can be calculated from conservation of energy:

$$ m g \Delta h = \frac12 m v^2 $$ $$ g l(\cos\alpha-\cos\alpha_r) = \frac12 v^2 $$ \begin{equation} v^2 = 2 g l(\cos\alpha-\cos\alpha_r) \end{equation}The height $h$ at the moment of jumping can be found from the geomety

\begin{equation} h = h_f + h_s = h_f + l(1-\cos\alpha) \end{equation}Combining the three equations above gives us an equation for the distance as a function of swing length $l$, free height $h_f$, release angle $\alpha_r$ and jumping angle $\alpha$: \begin{equation} d(l, h_f, \alpha_r, \alpha) = l\sin(\alpha)\left(1+2(\cos(\alpha)-\cos(\alpha_r))\cos(\alpha) \left(1+\sqrt{1+\frac{h_f/l+1-\cos(\alpha)}{\sin^2(\alpha)(\cos(\alpha)-\cos(\alpha_r))}}\right)\right) \end{equation}

The equation if plotted below for a few values of $\alpha_r$

## Special cases

This last equation is a bit too hard to analyse in the general case, but for a few special cases we can understand it. In case $\alpha=\alpha_r$ it reduces to

\begin{equation} d(l, \alpha) = l\sin(\alpha) \end{equation}Since you drop straight from the highest point of the swing, there is no free distance $d_f$.

In case $\alpha=0$, you only fall the height $h_f$ with a forward speed as given by equation (2): \begin{equation} d(l, h_f, \alpha_r) = 2 \sqrt{lh_f(1-\cos(\alpha_r))}} \end{equation}

In case either $l=0$ or $\alpha_r=0$ there is no velocity so $v=0$.

In case $h_f=0$ the equation loses little of its complexity. Only one term is gone