3. Oscillating Systems

Legal Notice, Disclaimer, and Book Ordering Information:

Null

Setup

\(Clear["Global`*`"]; 
Off[General::spell]; 
Off[General::spell1]; 
    \)

3.3 Problems

3.3.3  Small Oscillations

Problem 3:  The Double Pendulum

<< "D:\Mma\Inits\ch3init.m"

Clear["Global`*`"];

Part (a)   Find the normal modes for small oscillations.

\(x1 = L1\ Sin[θ1[#]]&; 
y1 = L1\ Cos[θ1[#]]&; 

    x2 = x1[#]\  + \ L2\ Sin[θ2[#]]&; 

    y2 = y1[#]\  + \ L2\ Cos[θ2[#]]&; 
L1 = \(L2 = len\); \)

\(T1 = 1/2\ m1\ \((\(x1'\)[t]^2\  + \ \(y1'\)[t]^2)\); 

    T2 = 1/2\ m2\ \((\(x2'\)[t]^2\  + \ \(y2'\)[t]^2)\); 

    V1 = \(-m1\)\ g\ y1[t]; 
V2 = \(-m2\)\ g\ y2[t]; 
T\  = \ T1\  + \ T2; 
    
V\  = \ V1\  + \ V2; \)

sol  = smallOsc[T, V, {θ1[t], θ2[t]}, {0, 0}, t]

Part (b)   Plot the normal modes and mixed modes for the motion of the mass points for one cycle.

eigenmatrix = Array[a, 2] //. sol[[2]]

\(θRule\  = \ 
      \((\({θ1[t], θ2[t]} -> 
              Transpose[eigenmatrix] . {c1\ Cos[ω1\ t\  + \ ϕ1]

                  					\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , 
                  c2\ Cos[ω2\ t\  + \ ϕ2]}
			 // Thread\)

          		 // Simplify)\)\)

ωRule = Thread[{ω1, ω2} -> Sqrt[sol[[1]]]]

values = {m1 -> 3, m2 -> 1, len -> 1, g -> 1, ϕ1 -> 0, 
        ϕ2 -> 0}

allRules = Join[θRule, values, ωRule];

\(\(line[c1_, c2_] = 
      Line[{{0, 0}, {x1[t], \(-y1[t]\)}

            		\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , {x2[t], 
              \(-y2[t]\)}}]
 //. allRules; \)\)

\(\(Show[
	
      Graphics[
		Table[
			line[1, 0] // N, {t, 0, 2, 0.1}]]]; \)\)

\(\(Show[
	
      Graphics[
		Table[
			line[0, 1] // N, {t, 0, 2.5, 0.2}]]]; 
    \)\)

\(\(Show[
	
      Graphics[
		Table[
			line[0.5, 0.5] // N, {t, 0, 6, 0.2}]]]; 
    \)\)

Part (c)   Animate one of these solutions.

frames = 25; \(\(Do[
      Show[Graphics[line[0.5, 0.5] // N
			, 
          PlotRange -> {{\(-2\), 2}, {0, \(-2\)}}]]

      	\ \ \ \ \ , {t, 1, 25, 25\/frames}]; \)\)

Code to Generate Animation ONLY!!!

Clear["Global`*"];

line[c1_, c2_] = 
      Line[{{0, 0}, {Sin[((c1 Cos[(Sqrt[(2/3)]) t] - c2 Cos[(Sqrt[2]) t])/(Sqrt[5]))], 
            -Cos[((c1 Cos[(Sqrt[(2/3)]) t] - c2 Cos[(Sqrt[2]) t])/(Sqrt[5]))]}, {
            Sin[((c1 Cos[(Sqrt[(2/3)]) t] - c2 Cos[(Sqrt[2]) t])/(Sqrt[5]))] + 
              Sin[((2 (c1 Cos[(Sqrt[(2/3)]) t] + c2 Cos[(Sqrt[2]) t])
                      )/(Sqrt[5]))], 
            -Cos[((c1 Cos[(Sqrt[(2/3)]) t] - c2 Cos[(Sqrt[2]) t])/(Sqrt[5]))] - 
              Cos[((2 (c1 Cos[(Sqrt[(2/3)]) t] + c2 Cos[(Sqrt[2]) t])
                      )/(Sqrt[5]))]}}];

frames = 25; Do[
      Show[Graphics[N[line[0, 1]], 
          PlotRange -> {{-2, 2}, {0, -2}}]], {t, 1, 25, 
        (25/frames)}];

frames = 25; Do[
      Show[Graphics[N[line[1, 0]], 
          PlotRange -> {{-2, 2}, {0, -2}}]], {t, 1, 25, 
        (25/frames)}];

frames = 25; Do[
      Show[Graphics[N[line[0.5, 0.5]], 
          PlotRange -> {{-2, 2}, {0, -2}}]], {t, 1, 25, 
        (25/frames)}];