# channelflow.org

### Site Tools

gibson:teaching:fall-2014:math445:lab7

# Math 445 lab 7: the pendulum (numerical integration of differential eqns)

Problem 1: In class we developed a linear system of differential equations of the form for the plane pendulum, where

We used the approximation for small , i.e. small amplitude oscillations. A chief result of this derivation was that the frequency of oscillation of the pendulum is given by , where is the acceleration due to gravity and is the length of the pendulum.

However if gets large the approximation is no longer valid. This lab problem is an investigation of how the frequency of oscillation of the pendulum changes when the amplitude of the oscillation is large.

(a) Revise the derivation from class to develop a nonlinear system of differential equations that is valid for large .

(b) Set up Matlab code to integrate this system of equations numerically, using Matlab's ode45 function.

(c) Determine the frequency of oscillation of the nonlinear pendulum for for the constants and and a variety of oscillation amplitudes. The oscillation amplitude is given by the angle at which the pendulum is released at time , with no initial velocity. Determine the frequency for and plot versus .

(d) For moderate amplitudes, the frequency of the nonlinear pendulum should vary with as

for some value of . Determine what the value of is from your graph in (c).

Problem 2: For the linear pendulum, we produced in lecture time series plots of position and (angular) velocity as a function of time, and a phase portrait of versus .

With no damping from air resistance, the equations of motion of the linear pendulum are

where ). The time series and phase portrait (for and ) look like

Note that the temporal oscillations look like perfect sines and cosines, and the phase portrait shows that trajectories circle around the origin indefinitely.

However, if we include the damping of air resistance, the equations of motion of the linear pendulum are

and the time series and phase portrait for (for , , and ) look like

Now the temporal oscillations get smaller and smaller as time goes on. The phase portrait shows that all initial conditions eventually spiral into the origin, i.e. the pendulum hangs straight down () and doesn't move ).

For this lab problem, you are to recreate the previous four plots for the nonlinear pendulum, whose equations of motion are

Use parameter values and or for no damping or damping, respectively. For the time series plots, initiate the pendulum with and . For the phase portraits, show the range on the horizontal axis and on the vertical. On top of the quiver plots, show trajectories with initial conditions and a variety of ranging from -10 to 10 in steps of 1.