Motion Captured – Basic String Theory

September 1, 2014

For the last 400 years (since Galileo) the pendulum has been a source of intrigue and insight for physicists. We’ll look at the pendulum in this article and the next, in ever more complicated variations. This becomes fairly mathematical at points, the thing is, when you can read them the equations are very illuminating and when you can’t they tend to make the rest of the text unreadable. If you can’t follow the equations skip them and appreciate them as pieces of abstract art that break up the paragraphs, the text is enough. If you don’t even read the text here are the instructions: click the mouse in the box and drag the red bob to its start position, click again and drag the blue bob then release.

 Let’s start with the basics: Newton’s second law is a differential equation, $m \frac{d^2 x}{dt^2} = F,$ summarizing the fact that you need to push heavy things harder than light things. For our purposes we write this one equation as two even simpler ones. One equation is the definition of velocity $v = \frac{dx}{dt}$, (speed is rate of change of position). Newton’s equation becomes: $m \frac{dv}{dt} = F.$ We then combine these two equations back again (maths can be tricky like this) using one symbol for two objects $\vec{y} = (x, v)$ and $\vec{f} = (v, \frac{F}{m})$ both the simple equations can be written as: $\frac{d\vec{y}(t)}{dt} = \vec{f}(t, \vec{y}(t)).$ In this form we can make a very simple numerical solution, the idea is that if you zoom in far enough any curve looks like a line. The quantity $\frac{d\vec{y}(t)}{dt}$ means the slope of the curve $\vec{y}(t)$ at $t$. So we approximate the curve by a line and glue a bunch of these lines together. Mathematically, let $h$ be a very small number then Newton’s equation becomes, $\vec{y}(t+h) = \vec{y}(t) + h \vec{f}(t, \vec{y}(t))$ so given $\vec{y}$ at time $t$ we can calculate it a short time later at $t + h$ from the “force” $\vec{f}$. Let’s try it on the standard example in physics, the pendulum. Doing a little vector analysis, the pendulum moves on a circle of length $l$. The pendulum bob has traveled a distance $l \theta$ along the circle when the force on it is $-mg \sin\theta$, tangent to the circle. Newton’s equations give, $\begin{array}{c} m l \frac{d^2 \theta}{dt^2} = -m g \sin\theta\\ \frac{d^2 \theta}{dt^2} + \frac{g}{l} \sin\theta = 0 \end{array}$ If you’ve solved this in a physics class you made an approximation here that the pendulum moves horizontally, otherwise the integrals are too difficult. But, because we’re solving this numerically, we don’t have to make that approximation so our pendulum does indeed move on a circle. Click the animation below and drag the bob to somewhere in the box and let go. The red pendulum is the result of the method above, known as the Euler method. The Euler method is a bad method, errors accumulate quite quickly, its advantage is how easy it is to program. The standard compromise between improvement and complexity is the 4${}^{th}$ order Runge-Kutta method. Runge from the Runge-Lenz vector and Kutta from the Kutta-Joukowski airfoil. This method is basically equivalent to Simpson’s Rule. Explicitly, $\begin{array}{c} y(t+h) = y(t) + \frac{h}{6} \left( k_1 + 2k_2 + 2k_3 + k_4\right)\\ k_1 = f(t, y(t))\\ k_2 = f(t + h/2, y(t) + k_1h/2)\\ k_3 = f(t + h/2, y(t) + k_2h/2)\\ k_4 = f(t + h, y(t) + k_3h)\\ \end{array}$ This approximates the slope using the values at the beginning, the end and two in the middle, giving greater weight to the values in the middle. The blue bob in the previous animation (behind the red one) evolves according to the Runge-Kutta algorithm. Visually there doesn’t seem to be much difference. If you just wanted something that looked okay the Euler method would be enough, however physicists need to do better than look okay, so we will be using the more complicated equations behind the scenes. Given a decent algorithm for solving differential equations we use it for something more interesting above, the double pendulum. The double pendulum is one of the quintessential chaotic systems, displaying extreme sensitivity to initial conditions. You can start the pendulum watch it for a while, then try to restart it in the same position. Unless you click on the exact same pixels the motion will be completely different after a few moments of swinging. Take that as a challenge if you like! Rudy Arthur