Double pendulum

We'll use the double pendulum as an example of a system governed by a non-linear pair of coupled differential equations, exhibiting chaotic behavior.

A double pendulum consists of a bob of mass \(TraditionalForm\`\(\(m\_1\)\(\ \ \)\(attached\)\(\ \)\(to\)\(\ \)\(a\)\(\ \)\(fixed\)\(\ \)\)\)point 0 by a rigid massless wire of length (Subscript[L, 1])to which is attached a second bob of mass (Subscript[m, 2])by a rigid massless wire of length (Subscript[L, 2]). Denote the angles made by the respective wires to the vertical by (Subscript[θ, 1]),  (Subscript[θ, 2]).

\(\(Show[
        Graphics[{PointSize[ .03], 
            Point[{0, 100}], 
Hue[1. ], PointSize[ .04], 
            Point[{20, 70}], 
Hue[ .7], PointSize[ .05], 
            Point[{30, 30}], 
RGBColor[0, 0, 0], 
            Thickness[ .005], \ 
            Line[{{0, 95}, {0, 75}}], 
Line[{{20, 65}, {20, 
                  45}}], 
Thickness[ .01], 
            Line[{{0, 100}, {20, 70}}], 
Line[{{30, 
                  30}, {20, 70}}], 
Text["0", {\(-3\), 
                100}], 
Text[\*""(Subscript[θ, 1])"", {3, 91}], 
Text[\*""(Subscript[θ, 2])"", {22, 
                52}], 
Text[\*""(Subscript[m, 1])"", {23, 
                70}], 
Text[\*""(Subscript[m, 2])"", {33, 
                30}], 
Text[\*""(Subscript[L, 1])"", {13, 
                85}], 
Text[\*""(Subscript[L, 2])"", {28, 
                50}]
}, 
          PlotRegion -> {{0.1, 0.9}, {0.1, 
                0.9}}, 
AspectRatio -> 1, 
          TextStyle -> {FontSize -> 
                14}
]];\)\)

The dynamics of the double pendulum are given by the following differential equations (of Euler-Lagrange) for (Subscript[θ, 1]) and (Subscript[θ, 2]).We change notation to avoid subscripts in the variables, using instead \(TraditionalForm\`u = \(θ\_1\ and\ v = \(\(θ\_2\)\(.\)\)\)\)Primes here denote differentiation with respect to time t.

eq1 = ((Subscript[m, 1]) + (Subscript[m, 2])) ((Subscript[L, 1])^2) u''[
              t] + (Subscript[m, 2]) (Subscript[L, 1]) (Subscript[L, 2]) v''[t] Cos[
              u[t] - v[t]] + (Subscript[m, 2]) (Subscript[L, 1]) (Subscript[L, 2]) (v'[
                  t])^2 Sin[u[t] - v[t]] + 
          (Subscript[L, 1]) g ((Subscript[m, 1]) + (Subscript[m, 2])) Sin[u[t]] == 0

eq2 = (Subscript[m, 2]) ((Subscript[L, 2])^2) v''[
              t] + (Subscript[m, 2]) (Subscript[L, 1]) (Subscript[L, 2]) u''[t] Cos[
              u[t] - v[t]] - (Subscript[m, 2]) (Subscript[L, 1]) (Subscript[L, 2]) (u'[
                  t])^2 Sin[u[t] - v[t]] + (Subscript[L, 2]) g (Subscript[m, 2]) Sin[v[t]] == 
        0

There is no general closed form solution for these equations, but if we assume small, slow oscillations, replacing Sin[w] by w and Cos[w] by 1 (for small w) and squares of velocities by 0, we obtain a simpler pair of equations with the form

leq1 = 
      eq1 /. {Cos[x_] -> 1, 
          Sin[x_] -> x, v'[t]^2 -> 0}

leq2 = 
      eq2 /. {Cos[x_] -> 1, 
          Sin[x_] -> x, u'[t] -> 0}

Question 1.

Find the explicit solutions to the equations above assuming units are in feet, seconds, taking

(Subscript[m, 1]) = 3;  (Subscript[m, 2]) = 1; (Subscript[L, 1]) = (Subscript[L, 2]) = 16; g = 32;

and assuming the initial conditions

init = {u[0] == 1, u'[0] == 0, 
        v[0] == -1, v'[0] == 0}

(The solutions may be given in complex form. Before using the solutions to define actual functions, use ComplexExpand and Simplify to get compact real forms.)

Question 2.

Give a ten second animation of the solutions obtained in Question 1, using the colors from the first picture and a total of 32 frames.

Question 3.

Now go back to the original equations eq1 and eq2, and the same values of masses and lengths as above, but with oscillations that are definitely not small. The equations must now be solved numerically. Give a 10 second animation (same colors as above) of the numerical solution under the initial conditions

largeinit = {u[0] == 1, u'[0] == 2, 
        v[0] == -1, v'[0] == 1}

(You will probably find it useful to first define a function of u and v which plots the individual frames.)

Question 4.

Use the solution in the preceding question to give a plot of the location of the second bob (the blue one) over the same 25 second period.