# myphysicslab – double pendulum

this is a simulation of a double pendulum. for large motions it is a chaotic system, but for small motions it is a simple linear system.
you can change parameters in the simulation such as mass, gravity, and length of rods (enable the "show controls" checkbox). you can drag the pendulum with your mouse to change the starting position. if you don't see the simulation try instructions for enabling java. scroll down to see the math!

instructions: click near circles and drag with your mouse

to purchase a professionally
engineered chaotic pendulum,
for small angles, a pendulum behaves like a linear system (see simple pendulum). when the angles are small in the double pendulum, the system behaves like the linear double spring. in the graph, you can see similar lissajous curves being generated. this is because the motion is determined by simple sine and cosine functions.

for large angles, the pendulum is non-linear and the phase graph becomes much more complex. you can see this by dragging one of the masses to a larger angle and letting go.

we regard the pendulum rods as being massless and rigid. we regard the pendulum masses as being point masses. the derivation of the equations of motion is shown below, using the direct newtonian method.

## kinematics of the double pendulum

kinematics means the relations of the parts of the device, without regard to forces. in kinematics we are only trying to find expressions for the position, velocity, & acceleration in terms of the variables that specify the state of the device.
• x = horizontal position of pendulum mass
• y = vertical position of pendulum mass
• θ = angle of pendulum (0 = vertical downwards, counter-clockwise is positive)
• l = length of rod (constant)
we place the origin at the pivot point of the upper pendulum. we regard y as increasing upwards. we indicate the upper pendulum by subscript 1, and the lower by subscript 2. begin by using simple trigonometry to write expressions for the positions x1, y1, x2, y2 in terms of the angles θ1, θ2. x1 = l1 sin θ1 y1 = −l1 cos θ1 x2 = x1 + l2 sin θ2 y2 = y1l2 cos θ2 the velocity is the derivative with respect to time of the position. x1' = θ1' l1 cos θ1 y1' = θ1' l1 sin θ1 x2' = x1' + θ2' l2 cos θ2 y2' = y1' + θ2' l2 sin θ2 the acceleration is the second derivative.
 x1'' = −θ1'2 l1 sin θ1 + θ1'' l1 cos θ1 (1)
 y1'' = θ1'2 l1 cos θ1 + θ1'' l1 sin θ1 (2)
 x2'' = x1'' − θ2'2 l2 sin θ2 + θ2'' l2 cos θ2 (3)
 y2'' = y1'' + θ2'2 l2 cos θ2 + θ2'' l2 sin θ2 (4)

## forces in the double pendulum

upper mass

lower mass
we treat the two pendulum masses as point particles. begin by drawing the free body diagram for the upper mass and writing an expression for the net force acting on it. define these variables:
• t = tension in the rod
• m = mass of pendulum
• g = gravitational constant
the forces on the upper pendulum mass are the tension in the upper rod t1, the tension in the lower rod t2, and gravity m1 g. we write separate equations for the horizontal and vertical forces, since they can be treated independently. the net force on the mass is the sum of these. here we show the net force and use newton's law f = m a.
 m1 x1'' = −t1 sin θ1 + t2 sin θ2 (5)
 m1 y1'' = t1 cos θ1 − t2 cos θ2 − m1 g (6)
for the lower pendulum, the forces are the tension in the lower rod t2, and gravity m2 g.
 m2 x2'' = −t2 sin θ2 (7)
 m2 y2'' = t2 cos θ2 − m2 g (8)
in relating these equations to the diagrams, keep in mind that in the example diagram θ1 is positive and θ2 is negative, because of the convention that a counter-clockwise angle is positive.

## direct method for finding equations of motion

now we do some algebraic manipulations with the goal of finding expressions for θ1'', θ2'' in terms of θ1, θ1', θ2, θ2'. begin by solving equations (7), (8) for t2 sin θ2 and t2 cos θ2 and then substituting into equations (5) and (6).
 m1 x1'' = −t1 sin θ1 − m2 x2'' (9)
 m1 y1'' = t1 cos θ1 − m2 y2'' − m2 g − m1 g (10)
multiply equation (9) by cos θ1 and equation (10) by sin θ1 and rearrange to get
 t1 sin θ1 cos θ1 = −cos θ1 (m1 x1'' + m2 x2'') (11)
 t1 sin θ1 cos θ1 = sin θ1 (m1 y1'' + m2 y2'' + m2 g + m1 g) (12)
 sin θ1 (m1 y1'' + m2 y2'' + m2 g + m1 g) = −cos θ1 (m1 x1'' + m2 x2'') (13)
next, multiply equation (7) by cos θ2 and equation (8) by sin θ2 and rearrange to get
 t2 sin θ2 cos θ2 = −cos θ2 (m2 x2'') (14)
 t2 sin θ2 cos θ2 = sin θ2 (m2 y2'' + m2 g) (15)
 sin θ2 (m2 y2'' + m2 g) = −cos θ2 (m2 x2'') (16)
next we need to use a program such as mathematica to solve equations (13) and (16) for θ1'', θ2'' in terms of θ1, θ1', θ2, θ2'. note that we also include the definitions given by equations (1-4), so that we have 2 equations (13, 16) and 2 unknowns (θ1'', θ2''). the result is somewhat complicated, but is easy enough to program into the computer.
 θ1'' = −g (2 m1 + m2) sin θ1 − m2 g sin(θ1 − 2 θ2) − 2 sin(θ1 − θ2) m2 (θ2'2 l2 + θ1'2 l1 cos(θ1 − θ2)) l1 (2 m1 + m2 − m2 cos(2 θ1 − 2 θ2))
 θ2'' = 2 sin(θ1 − θ2) (θ1'2 l1 (m1 + m2) + g(m1 + m2) cos θ1 + θ2'2 l2 m2 cos(θ1 − θ2)) l2 (2 m1 + m2 − m2 cos(2 θ1 − 2 θ2))
these are the equations of motion for the double pendulum.

## numerical solution

the above equations are now close to the form needed for the runge-kutta method. the final step is convert these two 2nd order equations into four 1st order equations. define the first derivatives as separate variables:
• ω1 = angular velocity of top rod
• ω2 = angular velocity of bottom rod
then we can write the four 1st order equations: θ1' = ω1 θ2' = ω2
 ω1' = −g (2 m1 + m2) sin θ1 − m2 g sin(θ1 − 2 θ2) − 2 sin(θ1 − θ2) m2 (ω22 l2 + ω12 l1 cos(θ1 − θ2)) l1 (2 m1 + m2 − m2 cos(2 θ1 − 2 θ2))
 ω2' = 2 sin(θ1−θ2) (ω12 l1 (m1 + m2) + g(m1 + m2) cos θ1 + ω22 l2 m2 cos(θ1 − θ2)) l2 (2 m1 + m2 − m2 cos(2 θ1 − 2 θ2))
this is now exactly the form needed to plug in to the runge-kutta method for numerical solution of the system.