The Simple Double Pendulum Austin Graf December 13, 2013 Abstract The double pendulum is a dynamic system that exhibits sensitive dependence upon initial conditions. This project explores the motion of a simple double pendulum in two dimensions by altering Bruce Sherwoods VPython code to accurately represent the simple double pendulum at high energies and graphing the phase portraits of the system. It includes an interface via which the user can alter the two masses and the initial angles of the system. This documentation explains the mathematics relevant to the project. 1 Lagrangian and Hamiltonian Mechanics 1.1 Hamilton s Principle: The Foundation of Lagrangian Mechanics Before discussing the double pendulum, we must first develop new ways to study mechanics, namely, Lagrangian and Hamiltonian mechanics. As Newtonian mechanics revolve about the famous equation F = ma, Lagrangian mechanics utilize Hamilton s Principle: The actual path which a particle follows between two points 1 and 2 in a given time interval, to t 2, is such that the action integral S = L dt (1) is stationary when taken along the actual path and the Lagrangian is here given by L = T-U (Taylor298). 1
1.2 Calculus of Variations In order to determine the path that extremizes the action, we require calculus of variations. Consider the integral A = L(q i (t), q i (t), t) dt (2) Let q i (t), q i (t) be the path that extremizes the integral. We will vary this optimal path q i (t) by adding some δ q i (t) where δ q i ( ) = δ q i (t 2 ) = 0 because the endpoints are fixed. We seek A stationary, δa = 0. By the chain rule, we have ( L 0 = δq i + L ) δ q i dt (3) q i q i Using integration by parts, ( ) ( ) L d q i dt δq L i dt = δq i q i t 2 δq i ( d dt ( L q i )) dt (4) The first term on the right-hand side goes to zero because δq i is zero at the endpoints. It follows that δa = 0 if and only if ( ( ( ))) L d L δq i δq i dt = 0 (5) q i dt q i or equivalently L = d ( ) L (6) q i dt q i This is the Euler-Lagrange Equation, the central tenant of calculus of variations and the primary tool for utilizing Hamilton s Principle. This methodology is known as Lagrangian Mechanics (Makins). 1.3 Transforming to Hamiltonian Mechanics Because the double pendulum is somewhat easier to analyze with Hamiltonian Mechanics, we will take a moment to shift to this technique. Unlike Lagrangian Mechanics, which utilizes the generalized coordinates q i and q i, Hamiltonian Mechanics uses the generalized coordinates q i and p i with the latter, the generalized momentum is given by p i = L q i (7) 2
(Taylor522) A Legendre Transformation converts Lagrangian Mechanics to Hamiltonian Mechanics. n H = q i p i L (8) i=1 where H is the Hamiltonian of the system. This transformation creates two new equations from each Lagrangian equation: (Math24) ṗ i = H q i (9) q i = H p i (10) 2 Analyzing the Simple Double Pendulum 2.1 Results of Hamiltonian Analysis For the simple double pendulum with two massless rods of equivalent length, we have q 1 = φ 1, the angle that the upper rod makes with respect to the vertical, and q 2 = φ 2, the angle that the lower rod makes with respect to the vertical. Hamiltonian analysis yields four first-order differential equations: where A = φ 1 = p 1 p 2 cos(φ 1 φ 2 ) f 1 (φ 1, φ 2, p 1, p 2 ) = m 1 l 2 (1 + µ sin 2 (φ 1 φ 2 )) (11) φ 2 = f 2 (φ 1, φ 2, p 1, p 2 ) = p 2(1 + µ) p 1 µ cos(φ 1 φ 2 ) m 1 l 2 (1 + µ sin 2 (φ 1 φ 2 )) (12) ṗ 1 = f 3 (φ 1, φ 2, p 1, p 2 ) = m 1 (1 + µ)gl sin(φ 1 ) A + B (13) ṗ 2 = f 4 (φ 1, φ 2, p 1, p 2 ) = m 1 µgl sin(φ 2 ) + A B (14) p 1 p 2 sin(φ 1 φ 2 ) m 1 l 2 (1 + µ sin(φ 1 φ 2 )) (15) B = (p2 1µ 2p 1 p 2 µ cos(φ 1 φ 2 ) + p 2 2(1 + µ))(sin(2(φ 1 φ 2 ))) 2m 1 l 2 (1 + µ sin 2 (φ 1 φ 2 )) 2 (16) µ = m 2 m 1 (17) 3
2.2 Numerical Analysis of the Double Pendulum: The Runge-Kutta Method This system can be approximated numerically using the Runge-Kutta Method. To perform 4th order Runge-Kutta analysis upon this system, we first write it in vector form: X = f(x) (18) where and φ 1 X = φ 2 p 1 p 2 f 1 (φ 1, φ 2, p 1, p 2 ) f(x) = f 2 (φ 1, φ 2, p 1, p 2 ) f 3 (φ 1, φ 2, p 1, p 2 ) f 4 (φ 1, φ 2, p 1, p 2 ) The 4th order Runge-Kutta method uses a small time step τ and at time t for which X = X n defines Y 1 = τf(x n ) (19) Y 2 = τf(x n + 1 2 Y 1) (20) Y 3 = τf(x n + 1 2 Y 2) (21) Y 4 = τf(x n + Y 3 ) (22) such that X n+1, which is the value of X at time t+τ, is given by X n+1 = X n + 1 6 (Y 1 + 2Y 2 + 2Y 3 + Y 4 ) (23) (Math24) The extra weight given to the midpoints stems from Simpson s rule: b f(x)dx b a ( ( ) ) a + b f(a) + 4f + f(b) (24) 6 2 (WolframMathworld) a 4
Works Cited John Taylor, Classical Mechanics (University Science Books, 2005), 430-440 Math24 http://www.math24.net/index.html Naomi Makins s Lectures for PHYS 325 Wolfram Mathworld http://mathworld.wolfram.com/ 5