Double Pendulum
Double Pendulum
Math24
Menu
Differential Equations
Systems of Equations
Double Pendulum
A double pendulum is undoubtedly an actual miracle of nature. The jump in complexity, which is
observed at the transition from a simple pendulum to a double pendulum is amazing. The
oscillations of a simple pendulum are regular. For small deviations from equilibrium, these
oscillations are harmonic and can be described by sine or cosine function. In the case of nonlinear
oscillations, the period depends on the amplitude, but the regularity of the motion holds. In other
words, in the case of a simple pendulum, the approximation of small oscillations fully reflects the
essential properties of the system.
https://www.math24.net/double-pendulum 1/16
8/23/2021 Double Pendulum
Double pendulum “behaves” quite differently. In the regime of small oscillations, the double
pendulum demonstrates the phenomenon of beats. The character of oscillations of the pendulums
changes radically with increasing energy − the oscillations become chaotic. Despite the fact that the
double pendulum can be described by a system of several ordinary differential equations, that is by
a completely deterministic model, the appearance of chaos looks very unusual. This situation is
reminiscent of the Lorenz system where a deterministic model of three equations also shows chaotic
behavior. Try to experiment with the application below and watch the movement of the double
pendulum at different mass ratios and initial angles.
Next, we will build a mathematical model of the double pendulum in the form of a system of
nonlinear differential equations. Let’s start with the derivation of the Lagrange equations.
Lagrange Equations
In Lagrangian mechanics, evolution of a system is described in terms of the generalized
coordinates and generalized velocities. In our case, the deflection angles of the pendulums α1 , α2
and the angular velocities α̇1 , α̇2 can be taken as the generalized variables. Using these variables,
we construct the Lagrangian for the double pendulum and write the Lagrange differential equations.
Figure 1.
We assume that the rods are massless. Their lengths are l1 and l2 . The point masses (they are
represented by the balls of finite radius) are m1 and m2 . All pivots are assumed to be frictionless.
https://www.math24.net/double-pendulum 2/16
8/23/2021 Double Pendulum
We introduce the xy-coordinate system, the origin O of which coincides with suspension point of
the upper pendulum. The coordinates of the pendulums are defined by the following relationships:
The kinetic and potential energy of the pendulums (respectively, T and V ) are expressed by the
formulas
m1 2 m
L = T − V = T1 + T2 − (V1 + V2 ) = (ẋ1 + ẏ21 ) + 2 (ẋ22 + ẏ22 ) − m1 gy1 − m2 gy2 .
2 2
Consequently,
m1 2 m1 2 2 2 m1 2 2
T1 = (ẋ1 + ẏ21 ) = (l1 α̇1 cos α1 + l21 α̇21 sin2 α1 ) = l α̇ ,
2 2 2 1 1
m2 2 m2 2
T2 = (ẋ2 + ẏ22 ) = [(l1 α̇1 cos α1 + l2 α̇2 cos α2 )
2 2
2 m
+ (l1 α̇1 sin α1 + l2 α̇2 sin α2 ) ] = 2 [l21 α̇21 cos2 α1 + l22 α̇22 cos2 α2
2
+ 2l1 l2 α̇1 α̇2 cos α1 cos α2 + l21 α̇21 sin2 α1 + l22 α̇22 sin2 α2 + 2l1 l2 α̇1 α̇2 sin α1 sin α2 ]
m2 2 2 2 2
= [l α̇ + l α̇ + 2l1 l2 α̇1 α̇2 cos(α1 − α2 )],
2 1 1 2 2
https://www.math24.net/double-pendulum 3/16
8/23/2021 Double Pendulum
m1 m m
L = T − V = T1 + T2 − (V1 + V2 ) = ( + 2 ) l21 α̇21 + 2 l22 α̇22
2 2 2
+ m2 l1 l2 α̇1 α̇2 cos(α1 − α2 ) + (m1 + m2 ) gl1 cos α1 + m2 gl2 cos α2 .
d ∂L ∂L
− = 0, i = 1, 2.
dt ∂ α̇i ∂αi
The partial derivatives in these equations are expressed by the following formulas:
∂L
= (m1 + m2 ) l21 α̇1 + m2 l1 l2 α̇2 cos(α1 − α2 ),
∂ α̇1
∂L
= −m2 l1 l2 α̇1 α̇2 sin(α1 − α2 ) − (m1 + m2 ) gl1 sin α1 ,
∂α1
∂L
= m2 l22 α̇2 + m2 l1 l2 α̇2 cos(α1 − α2 ),
∂ α̇2
∂L
= m2 l1 l2 α̇1 α̇2 sin(α1 − α2 ) − m2 gl2 sin α2
∂α2
d
[(m1 + m2 ) l21 α̇1 + m2 l1 l2 α̇2 cos(α1 − α2 )] + m2 l1 l2 α̇1 α̇2 sin(α1 − α2 )
dt
+ (m1 + m2 ) gl1 sin α1 = 0,
d
[m2 l22 α̇2 + m2 l1 l2 α̇1 cos(α1 − α2 )] − m2 l1 l2 α̇1 α̇2 sin(α1 − α2 ) + m2 gl2 sin α2 = 0,
dt
https://www.math24.net/double-pendulum 4/16
8/23/2021 Double Pendulum
Thus, the nonlinear system of two Lagrange differential equations can be written as
m1 m m
L=T −V =( + 2 ) l21 α̇21 + 2 l22 α̇22 + m2 l1 l2 α̇1 α̇2 cos(α1 − α2 )
2 2 2
+ (m1 + m2 ) gl1 cos α1 + m2 gl2 cos α2 .
We write this Lagrangian in a simpler form, expanding it in a Maclaurin series and retaining the
linear and quadratic terms. The trigonometric functions can be replaced by the following
approximate expressions:
2
α21 α22 (α1 − α2 )
cos α1 ≈ 1 − , cos α2 ≈ 1 − , cos(α1 − α2 ) ≈ 1 − ≈ 1.
2 2 2
Here we have taken into account that the term with cos(α1 − α2 ) contains the product of small
quantities α̇1 α̇2 and has the second order of smallness. Therefore, we can leave only the linear term
in the cosine expansion.
Substituting this in the original Lagrangian and considering that the potential energy is defined up
to a constant, we obtain the quadratic Lagrangian for the double pendulum in the form:
m1 m2 2 2 m2 2 2 m1 m2
L=T −V =( + ) l1 α̇1 + l2 α̇2 + m2 l1 l2 α̇1 α̇2 − ( + ) gl1 α21
2 2 2 2 2
m2
+ gl2 α22 .
2
We derive the Lagrange differential equations for the given Lagrangian. They are written as
https://www.math24.net/double-pendulum 5/16
8/23/2021 Double Pendulum
d ∂L ∂L d ∂L ∂L
− = 0, − = 0.
dt ∂ α̇1 ∂α1 dt ∂ α̇2 ∂α2
∂L
= (m1 + m2 ) l21 α̇1 + m2 l1 l2 α̇2 ,
∂ α̇1
∂L
= − (m1 + m2 ) gl1 α1 ,
∂α1
∂L
= m2 l22 α̇2 + m2 l1 l2 α̇1 ,
∂ α̇2
∂L
= −m2 gl2 α2 .
∂α2
d
[(m1 + m2 ) l21 α̇1 + m2 l1 l2 α̇2 ] + (m1 + m2 ) gl1 α1 = 0,
dt
d
[m2 l22 α̇2 + m2 l1 l2 α̇1 ] + m2 gl2 α2 = 0.
dt
or
This system of equations can be written in a compact matrix form. We introduce the matrices
M α̈ + Kα = 0.
https://www.math24.net/double-pendulum 6/16
8/23/2021 Double Pendulum
In the case of one body, this equation describes the free undamped oscillations with a certain
frequency. In the case of the double pendulum, the solution (as you will see below) will contain
oscillations with two characteristic frequencies, which are called normal modes. The normal modes
are the real part of the complex-valued vector function
α1 (t) H
α (t) = [ ] = Re ([ 1 ] eiωt ) ,
α2 (t) H2
where H1 , H2 are the eigenvectors, ω is the real frequency. The values of the normal frequencies
ω1,2 are determined by solving the auxiliary equation
det (K − ω2 M) = 0.
In the case of arbitrary masses m1 , m2 and lengths l1 , l2 , the auxiliary equation takes the form
Thus, we have a biquadratic equation for the frequencies ω. The general solution for this equation is
somewhat cumbersome. Therefore we consider the case when the lengths of the rods of both
pendulums are equal: l1 = l2 = l. Then the normal frequencies will be determined by a compact
formula
g m
ω21,2 = = [1 + μ ± √(1 + μ) μ] , where μ = 2 .
l m1
m2
As it can be seen, the eigenfrequencies ω1,2 depend only on the mass ratio μ = m1 . The
g
dependencies of the frequencies ω1 , ω2 on the parameter μ (provided = 1) are shown
l
in Figure 2.
Figure 2.
https://www.math24.net/double-pendulum 7/16
8/23/2021 Double Pendulum
For equal masses m1 = m2 = m, that is when μ = 1, the frequencies are given by
g
ω1,2 = √ √2 ± √2.
l
Now, after the eigenfrequencies ω1,2 are known, we still have to determine the eigenvectors H1,2 to
describe the normal modes. They can be found by solving the vector-matrix equation
(K − ω2 M) H = 0.
T
Let the eigenvector H1 = (H11 , H21 ) (the superscript T denotes transposition) be corresponded to
the normal frequency ω1 . Then we have the following equation for H1 :
g
(K − ω21 M) H1 = 0, where ω21 = [1 + μ + √(1 + μ) μ], ⇒
l
(1+μ) (g − ω21 l) −ω21 μl H11
m1 l⋅[ ]⋅ [ ] = 0.
−ω21 μl μ (g − ω21 l) H21
(1 + μ) [μ + √(1 + μ) μ] 1+μ
H
⇒ 21 = − = −√ .
H11 μ
μ [1 + μ + √(1 + μ) μ]
1
H11
H1 = [ ]=[ 1+μ ] .
H21 −√ μ
T
Similarly, we find the coordinates of the second eigenvector H2 = (H12 , H22 ) :
H12 1
H2 = [ ] = [ 1+μ ] .
H22 √ μ
https://www.math24.net/double-pendulum 8/16
8/23/2021 Double Pendulum
α1 (t) H 1
α (t) = [ ] = Re ([ 1 ] eiωt ) = C1 [ 1+μ ] cos(ω1 t + φ1 )
α2 (t) H2 −√ μ
1
+ C2 [ 1+μ ] cos(ω2 t + φ2 ),
√ μ
where the constants C1 , C2 , φ1 , φ2 depend on the initial positions and velocities of the pendulums.
Consider the character of small oscillations for a specific set of initial data. Suppose, for example,
that the initial positions and velocities of the pendulums have the following values:
π
α1 (t = 0) = 0, α2 (t = 0) = , α̇1 (t = 0) = 0, α̇2 (t = 0) = 0.
6
In this case, the initial phases are zero: φ1 = φ2 = 0. Determine the constants C1 and C2 :
⎧ α1 (0) = C1 + C2 = 0 1+μ π
⎨ , ⇒ C1 = −C2 , ⇒ 2C2 √ = ,
⎩ α2 (0) = −C1 √ 1+μ + C2 √ 1+μ = π
μ 6
μ μ 6
π μ π μ
⇒ C2 = √ , ⇒ C1 = − √ .
12 1 + μ 12 1 + μ
π μ π μ
α1 (t) = − √ cos(ω1 t) + √ cos(ω2 t),
12 1 + μ 12 1 + μ
π π
α2 (t) = cos(ω1 t) + cos(ω2 t),
12 12
g
ω1,2 = √ ⋅√1 + μ ± √(1 + μ) μ.
l
Here the angles α1 (t) , α2 (t) are expressed in radians, and the time t in seconds. Figures 3 − 5
show plots of small oscillations for three values of μ : μ1 = 0.2, μ2 = 1, μ3 = 5,provided
m
l = l1 = l2 = 0.25 m, g = 9.8 2 . For convenience, the deflection angles of the pendulums are
s
given in degrees.
https://www.math24.net/double-pendulum 9/16
8/23/2021 Double Pendulum
Figure 3.
Figure 4.
Figure 5.
As can be seen from the graphs, the energy is cyclically transferred between the two bobs. When
one of the pendulums almost stops, the other swings with maximum amplitude. After some time,
the bobs “switch roles” and so on.
ω1 +ω2
The resulting oscillations are represented as oscillations at the higher frequency ω̄ = with a
2
ω1 −ω2
periodic amplitude modulation with frequency Δω = 2 , which is also known as the beat
frequency.
https://www.math24.net/double-pendulum 10/16
8/23/2021 Double Pendulum
Thus, the small oscillations of the double pendulum look as periodic changes and are described by
the sum of two harmonics with frequencies ω1 , ω2 depending on the system parameters.
Strictly speaking, the small oscillations of the double pendulum will be periodic if only the ratio of
the eigenfrequencies ω1 , ω2 is equal to a rational number. If the ratio of the frequencies is an
irrational number, the small oscillations cannot possibly be periodic. For more details see the
topic Sum of two periodic functions is periodic?
The Lagrange equations given above are second order differential equations. It is more
conveniently to convert them into the form of Hamilton’s canonical equations. As a result, instead
of the two second-order equations, we obtain a system of four differential equations of the first
order.
∂L ∂L
p1 = , p2 =
∂ α̇1 ∂ α̇2
∂L
pi = , i = 1, 2.
∂ α̇i
The transition from the Lagrangian to the Hamiltonian form of the equations is performed using
the Legendre transformation, which is defined as follows.
https://www.math24.net/double-pendulum 11/16
8/23/2021 Double Pendulum
Figure 6.
Consider the line y = px passing through the origin. The distance between the line y = pxand the
function y = f (x) along the y-axis depends on the coordinate x. This distance will be maximal at a
certain value of x. Clearly, it depends on the slope of the line, that is on the parameter p. Thus, we
introduce a new function g (p) :
Such transformation of the function f (x) into the conjugate function g (p) is called the Legendre
transformation. Note that the function g (p) reaches a maximum value with respect to the variable x
df
when p = . Indeed,
dx
d df (x) df (x)
(px − f (x)) = p − = 0, ⇒ p = = p (x) .
dx dx dx
Knowing the dependence p (x) , we can find the inverse function x (p) . Then the Legendre
transform is expressed by the relationship
df
g (p) = px (p) − f (x (p)) , where p = .
dx
The Legendre transformation is easily generalized to the case of functions of several variables. In
the model of the double pendulum, the transition from the Lagrangian to the Hamiltonian is
described by the Legendre transformation of the form:
https://www.math24.net/double-pendulum 12/16
8/23/2021 Double Pendulum
2
H (α1 , α2 , p1 , p2 ) = ∑ α̇i pi − L (α1 , α2 , α̇1 , α̇2 ) = α̇1 p1 + α̇2 p2
i=1
∂L ∂L
− L (α1 , α2 , α̇1 , α̇2 ) , where p1 = , p2 = .
∂ α̇1 ∂ α̇2
In this expression, L is the Lagrangian, and the function H is the Hamiltonian of the system, which
depends on the generalized coordinates α1 , α2 and the generalized momenta p1 , p2 .
As a result of this transformation, each Lagrange equation becomes a system of two Hamilton’s
canonical equations of the form:
d ∂L ∂L ⎧ ṗi = − ∂H
∂αi
= , ⇒⎨ .
dt ∂ α̇i ∂αi ⎩ α̇i = ∂H
∂p i
Omitting the formal (and cumbersome) algebraic transformations, we write the Hamilton’s
canonical equations for the double pendulum in the final form:
⎪
l1 l2 [m1 +m2 sin2 (α1 −α2 )]
⎪
⎪
ṗ1 = − (m1 + m2 ) gl1 sin α1 − A1 + A2
⎪
⎩
⎪
ṗ2 = −m2 gl2 sin α2 + A1 − A2
where
p1 p2 sin(α1 − α2 )
A1 = ,
l1 l2 [m1 + m2 sin2 (α1 − α2 )]
1
A2 = 2
⋅[p21 m2 l22 − 2p1 p2 m2 l1 l2 cos(α1 − α2 )
2
2l21 l22 [m1 + m2 sin (α1 − α2 )]
To model the motion of the double pendulum, we also use the classical 4th order Runge-Kutta
method (RK4) . We somewhat simplify the differential equations assuming that the lengths of the
pendulums are the same: l1 = l2 = l. By introducing the parameter μ equal to the mass ratio:
m
μ = m2 , we can write the system in the following form:
1
⎪
m1 l2 [1+μ sin2 (α1 −α2 )]
⎪
⎪
ṗ1 = −m1 (1 + μ) gl sin α1 − A1 + A2
⎪
⎩
⎪
ṗ2 = −m1 μgl sin α2 + A1 − A2
where
p1 p2 sin(α1 − α2 )
A1 = ,
2
l2
m1 [1 + μ sin (α1 − α2 )]
1
A2 = ⋅[p21 μ − 2p1 p2 μ cos(α1 − α2 ) + p22 (1 + μ)]⋅
2
2m1 l2 [1 + μ sin2 (α1 − α2 )]
sin[2 (α1 − α2 )]
T T
Z′ = f (Z) , where Z = (α1 , α2 , p1 , p2 ) , f = (f1 , f2 , f3 , f4 ) .
The vector Z is composed of 4 canonical variables of the system, and components of the vector f
correspond to the right hand sides of the differential equations.
The Runge-Kutta (RK4) method requires at each step sequential evaluation of the four intermediate
vectors:
1 1
Y1 = τf (Zn ) , Y2 = τf (Zn + Y1 ) , Y3 = τf (Zn + Y2 ) , Y4 = τf (Zn + Y3 ) .
2 2
1
Zn+1 = Zn + (Y1 + 2Y2 + 2Y3 + Y4 ) .
6
The total error of the algorithm on a finite interval has the order O (τ 4 ) , i.e. the computational
accuracy increases by 16 times while reducing the time step τ twice.
https://www.math24.net/double-pendulum 14/16
8/23/2021 Double Pendulum
The described model is implemented in the animation shown at the beginning of the web page. For
simplicity, we assume that the initial deflection angles of the pendulums are equal: α1 = α2 = α.
This application demonstrates the chaotic dynamics of the double pendulum for different values of
μ and α. Interestingly, in some regimes, compact regions of attraction such as in Figure 7 appear in
the system. It seems that the nonlinear dynamics of double pendulum is not yet fully studied by
physicists and mathematicians and carries a lot of surprises.
Recommended Pages
Double Pendulum
Mass-Spring System
Properties of Matrices
https://www.math24.net/double-pendulum 15/16
8/23/2021 Double Pendulum
Legal
Copyright © 2021 math24.net
Alex Svirin, PhD
Privacy Policy
Contact
info@math24.net
Tools
https://www.math24.net/double-pendulum 16/16