The Double

Jeremy S. Heyl Department of Physics and Astronomy, University of British Columbia 6224 Agricultural Road, Vancouver, British Columbia, Canada, V6T 1Z1; Canada Research Chair (Dated: August 11, 2008) The double pendulum is an excellent example of a chaotic system. Small differences in initial con- ditions yield exponetially diverging outcomes. Although the chaotic nature of the double pendulum is well studied, the fractal nature of the dependence of the outcomes on the initial conditions has not been examined. Numerical simulations of a double pendulum over long timescales reveal the fractal structure of the time evolution of this system. Energetics determine the gross shape of the fractal. It also exhibits quasi-self-similar structure, and other hallmarks of classic such as the Mandelbrot and Julia sets. Additionally, in common with other Hamiltonian systems the double pendulum exhibits a fat fractal structure; specfically for a small fraction of the initial conditions, it is impossible to determine with certainty whether either pendulum will flip in the future even with arbitrarily accurate initial conditions.

I. INTRODUCTION T T ? θ1T The double pendulum is one of the simplest systems to g T exhibit chaotic motion1–3. A double pendulum consists T of one pendulum hanging from another. The system is @ governed by a set of coupled non-linear ordinary differ- @ nential equations. Although the structure of the system θ2 @ @ is relatively simple, above a certain initial energy the mo- @ tion of the system is chaotic. Many researchers have examined the dynamics of the FIG. 1: Coordinates for the double pendulum double pendulum from various points of view from how to make a better baseball bat4 or golf swing5, the dynamics 6 of church bells and the adequacy of Newton’s axioms to did in their Appendix B, including the 7–9 describe its dynamics , to the quantum mechanics of of the rods better reflects the that they 10,11 the system . However, the long-term evolution of the describe, so the equations of motion derived here will system as a function of initial conditions has not been differ slightly. studied in great detail. The position of the centre of mass of the two rods in This paper presents the results of numerical simula- terms of these coordinates is tions of a double pendulum over many thousands of os- l 1 cillations and examines the fractal nature of the relation- x = sin θ , x = l sin θ + sin θ , (1) 1 2 1 2 1 2 2 ship between the initial conditions and the final outcome   (specifically whether either part of the pendulum flips). and II introduces the physical system and sets a system of co§ ordinates, and III derives the Lagrangian and the l 1 § y = cos θ y = l cos θ + cos θ . (2) equations of motion. IV presents the results of the 1 −2 1 2 − 1 2 2 simulations. §   This is enough information to write out the La- grangian. II. COORDINATES

Specifically, let us model the double pendulum by two III. LAGRANGIAN 1 2 identical thin rods (I = 12 Ml ) connected by a pivot and the end of the upper rod suspended from a pivot. The Lagrangian is given by 2 For comparison Shinbrot et al. studied two nearly iden- 1 1 tical and Levien and Tan3 looked at a set of L = m v2 + v2 + I θ˙2 + θ˙2 mg (y + y ) (3) 2 1 2 2 1 1 − 1 2 pendulums with widely different masses.   It is natural to define the coordinates to be the angles where the kinetic energy is the sum of the between each rod and the vertical. These coordinates of the centre of mass of each rod and the kinetic energy 2 are denoted by θ1 and θ2 (see Fig. 1). This are the same about the centres of mass of the rods . The potential coordinates used in by Shinbrot et al.2. Although one energy of a body in a uniform gravitational field is given could neglect the masses of the rods as Shinbrot et al.2 by the at the centre of mass. 2

Plugging in the coordinates above and doing a bit of to flip barely, θ1 = π or θ2 = π. Looking at the Hamilto- algebra gives nian the latter requires less energy so 1 1 1 L = ml2 θ˙2 + 4θ˙2 + 3θ˙ θ˙ cos(θ θ ) + H0 = mgl (3 cos θ1 + cos θ2) > mgl(3 1) = mgl 6 2 1 1 2 1 − 2 −2 −2 − − 1 h i (12) mgl (3 cos θ + cos θ ) (4) Rearranging yields 2 1 2 3 cos θ + cos θ > 2 (13) Before looking at the equations of motion, there is only 1 2 one conserved quantity (the energy), and no conserved so within the following curve 3 cos θ1 +cos θ2 = 2 it is en- momenta. The two momenta are ergetically impossible for either pendulum to flip. Out- side this region, the pendulums can flip but this is differ- ∂L 1 2 ˙ ˙ pθ1 = = ml 8θ1 + 3θ2 cos(θ1 θ2) (5) ent from determining when they will flip. ∂θ˙1 6 − h i Energetics cannot determine whether either pendulum and will flip within a set period of time. The question of the future evolution of the system is much more compli- ∂L 1 cated. Chaotic motion is intimately connected with frac- p = = ml2 2θ˙ + 3θ˙ cos(θ θ ) (6) θ2 2 1 1 2 tals. Fig. 2 exhibits a fractal structure. First there is a ∂θ˙2 6 − h i large island of stability where neither pendulum can flip. Let’s invert these expressions to get Two large self-similar buds (and many smaller ones) grow off of the main island of instability. Furthermore, there 6 2p 3 cos(θ θ )p ˙ θ1 1 2 θ2 are small islands of relative stability within the regions θ1 = 2 − 2 − (7) ml 16 9 cos (θ1 θ2) where the pendulums flip rather quickly (see Fig. 3). − − These small islands are distorted copies of the main cen- and tral stable region. 6 8p 3 cos(θ θ )p One can estimate the fractal dimension of the bound- θ˙ = θ2 − 1 − 2 θ1 . (8) 2 ml2 16 9 cos2(θ θ ) ary between the stable and unstable initial conditions. − 1 − 2 Because this boundary is indeed a fractal, its area de- The remaining equations of motion are pends on the scale of measurement. The area of the boundary is estimated by counting the number of ini- ∂L 1 2 g ˙ ˙ tial conditions on a rectilinear grid of a given scale that p˙θ1 = = ml 3 sin θ1 + θ1θ2 sin(θ1 θ2) , ∂θ1 −2 l − do not result in either pendula flipping after a long time. h i (9) Only those initial conditions that have at least a single and neighbor (again at a particular scale) that does flip are counted as members of the boundary; an estimate of the ∂L 1 2 g ˙ ˙ p˙θ2 = = ml sin θ2 θ1θ2 sin(θ1 θ2) . area of the boundary is the product of the number of ∂θ2 −2 l − − points in the boundary and the square of the distance h i(10) between the grid points. These equations of motion cannot be integrated an- The entire domain of initial conditions π < θ , θ < π alytically but they are straightforward to integrate 1 2 is divided into a Cartesian grid of dimension− 215 215 for numerically12. Here they are integrated using a fourth- a total of 230 109 unique sets of initial conditions.× The order Runge-Kutta technique with adaptive stepsizes13. number of poin≈ts in the boundary are determined on the A straightforward question is whether a particular set full grid and for a grid consisting of every second grid of initial conditions with both pendulums stationary will point in each direction, every fourth grid point and so result with either pendulum flipping and if one does how on. To minimize counting errors, the sparse grids are long is it before it flips. shifted over the domain and averaged. For example, at the second to finest grid spacing, the number of boundary IV. FRACTALS points is determined for four different grids each shifted relative to each other. The spacing of the nth finest grid n 15 n 15 2n 2 is π2 − π2 − and there are 2 − such grids. In this Fig. 2 shows when and whether either pendulum flips. way the n×umber of initial conditions sampled in each grid The boundary of the central white region is defined in is 230, independent of n. The area of the boundary µ() part by energy conservation. Our initial conditions have is defined as the product of the number of grid points in the rods stationary so our initial Hamiltonian is the boundary and the square of the grid spacing 2. 1 The left panel of Fig. 4 shows the area of the bound- H0 = mgl (3 cos θ1 + cos θ2) . (11) ary as defined above for the entire set of initial conditions −2 (Fig. 2) and those initial conditions with θ1θ2 > 0 and Because the Lagrangian is not a function of time explic- θ1θ2 < 0. Different parts of the boundary have approxi- itly the Hamiltonian is conserved. For either pendulum mately the same fractal dimensions but the region with 3

FIG. 2: Outcomes for the double pendulum. The initial angles of the two rods θ1 and θ2 range from π to π. The color of each − pixel indicates how much time elapses before either pendulum flips in units of l/g. Green indicates the one of pendulums flips within 10 time units, red indicates between 10 and 100 units, purples denotes between 100 and 1000 units and blue shows those initial conditions that lead to flips only after 1000 to 10000 l/g have elapsed.p Those that do not flip within 10000 l/g are plotted white. For reference the period of of the lower pendulum is 2π 3/2 l/g 7.7 l/g. Within each colour p p range, the darker shades flip sooner. Within the solid black curve, it is not energetically possible≈ for either pendulum to flip. p p p

θ1θ2 > 0 contributes more to the boundary area for the For each of the regions the area of the boundary is finer grids than the region with θ1θ2 < 0. However, at fit with the sum of a power-law and a constant, µ() = the smallest grid scales the area of the boundary does not Aβ + µ(0)14,15. If µ(0) = 0, the boundary is a thin go to zero as the grid scale goes to zero. This is evidence fractal and β is equal to the codimension D d, where of a “fat fractal”. d is the fractal dimension and D is the dimension− of the 4

FIG. 3: Outcomes for the double pendulum (detail). The left-hand panel is an enlargement of the region within the cyan box in Fig. 2. The right-hand panel is an enlargement of the region in the region within the cyan box in the left-hand panel. The colors designate the time to flip as in Fig. 2. embedding space. In general, the value of β is dubbed with a given level on uncertainty in the initial conditions the fatness exponent and can be defined precisely as (), the analysis here maps nicely onto that of Farmer14. Firstly, the results presented in Fig. 4 imply that for a log [µ() µ(0)] β = lim − . (14) small fraction of the initial conditions of about 0.15% it  0 log  → is impossible to determine with certainty whether either pendulum will flip in the future even with arbitrarily ac- In all three cases, µ(0) = 0. For the entire set µ(0) 6 ≈ curate initial conditions. A finite fraction of the initial 0.057 or about 0.15% of the entire area of initial condi- conditions lie on the boundary between flipping and not 2 tions (4π ). flipping. Secondly, the value of µ()/(4π2) gives the prob- 15 Umberger and Farmer studied the Poincar´e section ability that if your initial conditions are specified with an of various Hamiltonian mappings and found that the area uncertainty of  that the numerical calculation of whether filled by a particular is greater than zero; more pre- either pendulum flips will be unreliable due to the uncer- cisely, the closure of the orbit has positive Lebesque mea- tainty in the initial conditions. sure. This paper examines the totality of possible orbits with static initial conditions for a non-linear Hamiltonian system, the double pendulum, for which no simple ana- V. CONCLUSIONS lytic mapping exists. Again the dependence of the future evolution of the system on its initial conditions exhibits Numerical simulations of the double pendulum reveal the structure of a fat fractal. Specifically, the set of ini- that the set of initial conditions that do not result in ei- tial conditions that eventually results in either pendulum ther pendulum flipping within a set period of time has flipping has fat fractal boundary. a fractal structure. Specfically, the boundary of this set Farmer14 examined the sensitivity of the behaviour of is a fat fractal similar to that found by Farmer14 for a the mapping simple Hamiltonian , indicating that fat frac- 2 tal boundaries may be a hallmark of chaos in non-linear xk+1 = fr(xk) = r 1 2x (15) − k Hamiltonian systems. on the value of the parameter r, in particular the frac- tion of chaotic parameter intervals and how the value of this fraction scales (the scaling exponent). In the dou- Acknowledgments ble pendulum for all initial conditions of sufficient en- ergy the motion is chaotic, i.e. the The Natural Sciences and Engineering Research Coun- is positive2,3. The sensitivity to initial conditions ex- cil of Canada, Canadian Foundation for Innovation and amined here is much more gross. If one defines chaotic the British Columbia Knowledge Development Fund sup- as the inability to forecast whether a pendulum will flip ported this work. Correspondence and requests for ma- 5

terials should be addressed to [email protected]. This research has made use of NASA’s Astrophysics Data Sys- tem Bibliographic Services

FIG. 4: The panel depicts area of the boundary of the stable set as a function of the measuring scale. At the smallest grid scale, the upper points (solid triangles) are for entire set (Fig. 2). The middle points (open circles) are for θ1θ2 < 0 and the lower points (crosses) are for θ1θ2 > 0. In all cases the asymptotic behaviour of each boundary is fitted by the sum of a power law and a constant.

1 P. H. Richter and H.-J. Scholz, in Stochastic phenomena 8 S. F. Felszeghy, American Journal of Physics 53, 230 and chaotic behaviour in complex systems (A86-16194 05- (1985). 70), edited by P. Schuster (Springer-Verlag, Berlin and 9 W. Stadler, American Journal of Physics 50, 595 (1982). New York, 1984), pp. 86–97. 10 J. Ford and G. Mantica, American Journal of Physics 60, 2 T. Shinbrot, C. Grebogi, J. Wisdom, and J. A. Yorke, 1086 (1992). American Journal of Physics 60, 491 (1992). 11 L. Perotti, Phys. Rev. E 70, 066218 (2004). 3 R. B. Levien and S. M. Tan, American Journal of Physics 12 D. R. Stump, American Journal of Physics 54, 1096 (1986). 61, 1038 (1993). 13 W. H. Press, S. A. Teukolsky, W. T. Vettering, and B. P. 4 R. Cross, American Journal of Physics 73, 330 (2005). Flannery, Numerical Recipes in C, 2nd ed. (Cambridge 5 A. R. Penner, Reports of Progress in Physics 66, 131 Univ. Press, Cambridge, 1992). (2003). 14 J. D. Farmer, Physical Review Letters 55, 351 (1985). 6 S. Ivorra, M. J. Palomo, G. Verdu,´ and A. Zasso, Meccnica 15 D. K. Umberger and J. D. Farmer, Physical Review Letters 41, 46 (2006). 55, 661 (1985). 7 W. Stadler, American Journal of Physics 53, 233 (1985).