====== The plane pendulum ====== ==== Mathematical models==== In class we derived four different mathematical models of the plane pendulum, listed here in order of decreasing mathematical complexity. ** Nonlinear damped pendulum.** This is the most physically realistic model. It includes a linear model of air resistance the $\alpha/m \; d\theta/dt$ term and is accurate for large displacement angles $\theta$. \begin{eqnarray*} \frac{d^2\theta}{dt^2} + \frac{\alpha}{m} \frac{d\theta}{dt} + \frac{g}{\ell} \sin \theta = 0 \end{eqnarray*} ** Nonlinear undamped pendulum.** This model neglects air resistance. It is derived from the previous model by setting the air resistance constant $\alpha$ to zero. \begin{eqnarray*} \frac{d^2\theta}{dt^2} + \frac{g}{\ell} \sin \theta = 0 \end{eqnarray*} ** Linear damped pendulum.** This is valid only for small oscillations. You can derive it from the nonlinear damped pendulum model by substituting the //small angle approximation// $\sin \theta \approx \theta$ for small $\theta$. \begin{eqnarray*} \frac{d^2\theta}{dt^2} + \frac{\alpha}{m} \frac{d\theta}{dt} + \frac{g}{\ell} \theta = 0 \end{eqnarray*} ** Linear undamped pendulum.** The simplest pendulum model. It neglects air resistance and employs the small-angle approximation. \begin{eqnarray*} \frac{d^2\theta}{dt^2} + \frac{g}{\ell} \theta = 0 \end{eqnarray*} In each of these, the variables are * $\theta(t)$: the unknown function that describes the angle of the pendulum away from vertical as a function of time. * $m$: the mass of the pendulum bob. * $\ell$: the length of the pendulum string * $g$: the acceleration of gravity * $\alpha$: an air resistance constant In class we showed that the linear undamped pendulum has a solution of the form $\theta(t) = \theta_0 \cos \omega t$ where $\omega = \sqrt{g/\ell}$ and $\theta_0$ is an arbitrary initial angular displacement. (Note that $\theta_0$ must be small for the small-angle approximation to be valid!) ---- ==== Changing a second-order ODE into a system of first-order ODEs ==== A 2nd-order ordinary differential equation in the scalar variable $\theta(t)$ can be transformed into a 1st order equation in the vector variable $\vec{x}(t)$, using the substitution \begin{eqnarray*} \vec{x} = \left(\begin{array}{l} x_1\\ x_2 \end{array} \right) = \left(\begin{array}{l} \theta \\ d\theta/dt \end{array} \right) \end{eqnarray*} For example, to transform the linear undamped pendulum equation $d^2\theta/dt^2 + (g/\ell) \theta = 0$, let $x_1 = \theta$ and $x_2 = d\theta/dt$. Differentiate those two equations to get $d x_1/dt = d\theta/dt = x_2$ and $d x_2/dt = d^2\theta/dt^2$. Now note that, according to the linear undamped pendulum equation, $d^2\theta/dt^2 = -(g/\ell) \theta = -(g/\ell) x_1$. Putting all this together, we can write \begin{eqnarray*} \frac{d\vec{x}}{dt} = \left(\begin{array}{l} dx_1/dt\\ dx_2/dt \end{array} \right) = \left(\begin{array}{cc} 0 & 1 \\ -g/\ell & 0 \end{array} \right) \left(\begin{array}{c} x_1 \\ x_2 \end{array} \right) \end{eqnarray*} This equation is now of the form $d\vec{x}/dt = \vec{f}(\vec{x})$, so it can be solved numerically with Matlab's ''ode45'' function.