The Double Pendulum
In this Math App we explore the motion of the double pendulum in a constant gravitational field. It is a rather simple physical model, but nevertheless has a rich dynamics as it undergoes chaotic motion.
Fig. 1 Setup of the double pendulum
The double pendulum consists of two single pendula, with one being attached at the end of the other. We consider idealized simple pendula, i.e. all their mass is concentrated at the end point of each cord and they move without any friction. The lengths of the pendula are denoted by l__1 and l__2, their masses by m__1 and m__2, respectively. Furthermore, we measure the displacement of each mass via the two angles ϑ__1 and ϑ__2 as indicated in the plot.
The dynamics of the double pendulum can be studied via the Euler-Lagrange equations. We implement and solve these in the next section using Maple procedures. In the subsequent section we discuss some properties of this solution.
Implementation in Maple
Below, we implement the problem of the double pendulum into Maple and solve its dynamics. We start by defining the positions of the masses using the notation in Fig. 1.
x1≔l__1 sinϑ__1;x2≔x1+l__2 sinϑ__2;y1≔− l__1cosϑ__1;y2≔y1−l__2 cosϑ__2
The x- and y-coordinates of the two masses depend on the time, t via the time dependence of the angles. Now we can define the kinetic and potential energy as follows:
Thus the Lagrange function is given via (1.2) and (1.3) as:
L≔subsS__2, simplifycombinevaluesubsS__1, Lagrange
where in the second step we inserted relations (1.1), used trigonometric relations and simplified via combine and simplify. The equations of motion of the two masses can then be obtained via the Euler-Lagrange equations:
ⅆⅆt∂ L∂ϑ__i.−∂ L∂ ϑ__i=0
for i=1,2 as:
ⅆⅆ tsubsS__1,∂ ∂ ϑ__1tL−subsS__1,∂ ∂ ϑ__1L
ⅆⅆ tsubsS__1,∂∂ ϑ__2tL−subsS__1,∂∂ ϑ__2L
The resulting equations EL__1 and EL__2 govern the dynamics of the two masses. They cannot be solved exactly, but we may try solving them numerically using dsolve. To do so, we set the constants to the following values in SI-units (g is given in m s−2 , the lengths l__i in m and the masses: m__i in kg)
g≔9.81: l__1≔5: l__2≔3: m1≔4: m2≔1:
Furthermore, we set the following initial conditions for the angles and their time derivatives:
with the derivatives given in s−1. Now we can solve the equations of motion (1.7) and (1.9) via
sol≔dsolveEL__1,EL__2, initial, numeric, output=listprocedure:
The procedures for the two angles ϑ__1 and ϑ__2 obtained from this solution:
ϑ__1≔evalϑ__1t, sol; ϑ__2≔eval ϑ__2t, sol
determine the dynamics of the system. In the following section we explore this solution a bit.
The following plot visualizes the procedures obtained above in the time interval 0..25 s.
Fig. 2 Visualization of the solution for ϑ__1 and ϑ__2
Note that the solution for the angles in this interval evolves chaotically, i.e. it does not exhibit any periodicity. Furthermore, note that the values of ϑ__2 are not constrained to the interval −π≤ϑ__2≤π. Whenever the line crosses a gridline, the pendulum flips over.
The dynamics of the double pendulum is chaotic, i.e. it is highly sensitive to the initial conditions initial. The following plot contains the trajectory and the angles of the mass m__2 for slightly different initial conditions.
Fig. 3 Chaotic motion
The three plots show the motion of the double pendulum as parameterized in the previous section. They only differ in the initial condition for the first mass's initial position:
Plot 1: ϑ__10=0.9⋅π7
Plot 2: ϑ__10=1.0⋅π7
Plot 3: ϑ__10=1.1⋅π7
While under the first condition, m__2 flips over five times, in the second plot it only does so twice and in the third plot four times within the first 25 seconds. Thus, a small change in the initial state can result in large differences in the later behavior of the system.
In the following you can explore the motion of the double pendulum. Using the radio buttons, you can choose the strength of the gravitational field. Furthermore, you can adjust the lengths and masses of the two individual pendula using the sliders. The higher the mass, the bigger the circle representing the mass. The initial position of the pendula can be changed by dragging and dropping the masses directly in the plot. Their initial velocities can be adjusted using the sliders; by selecting Show arrows the animation shows the velocities of the masses relative to their pivot points. Furthermore, you may choose the animation duration. You can also plot the animation alongside the trajectory of m__2 by selecting Show trajectory. After you have adjusted the settings, click Animate and wait for the Play button to appear.
Try to answer the following questions:
1) How does the gravitational field influence the motion of the pendulum? What happens as you turn off gravity (g=0)? Is the motion still chaotic?
2) How do the lengths of the individual pendula influence the motion of the double pendulum? What do you observe for l__2≪l__1 and l__1≪l__2?
3) How do the masses influence the motion of the pendulum? What do you observe in the case m__1≫m__2? What happens when you change the masses of the pendula in the case l__2≪l__1 and l__1≪l__2?
4) Investigate the motion of the pendulum for different initial states. Confirm that slight changes in the initial state can lead to very different behaviors at later times.
g=24.79 m s−2
g=9.81 m s−2
g=1.62 m s−2
ϑ.__10 π s−1 :
ϑ.__20 π s−1 :
Drag and drop the two masses into position directly in the plot.
Note: The calculation of the animation delays the appearance
of the Play button. Depending on the chosen animation
duration and whether "Show arrows" or "Show trajectory" is
checked, you may have to wait a few seconds.
animation duration t s:
Download Help Document