Quasiperiodic Orbits and Lissajous Figures for Coupled Pendulums

Consider the problem of two coupled pendulums with no friction.  A linear approximation (modelling small oscillations) is given by the following system in four variables (x,v,y,w) where x, y describe the positions of the pendulums and v,w are the velocities.  We will calculate several interesting solutions and plot them in various ways.  Here is the ODE and also a little function to draw the pendulums.

ode= {x'[t]==v[t],v'[t]==-(k+eps)x[t]+eps*y[t],y'[t]==w[t],w'[t]==eps*x[t]-(k+eps)*y[t]} 

MakePendulumPicture[x_,y_] :=Module[{t=0.01,tl=0.01,r = 0.1,k=0.5,l=1.0,amp=0.3,d,p1,p2,q1,q2},p1= -k-l*Sin[amp*x];p2=-l(Cos[amp*x]);q1= k-l*Sin[amp*y];q2=-l(Cos[amp*y]);
d=EuclideanDistance[{p1,p2},{q1,q2}];
Show[Graphics[{Thickness[t/d],Black,Line[{{p1,p2},{q1,q2}}],Thickness[tl],Blue,Line[{{p1,p2},{-k,0}}],Disk[{p1,p2},r],Green,Line[{{q1,q2},{k,0}}],Disk[{q1,q2},r]}],PlotRange->{{-1.7,1.7},{-1.5,0}}]]

Normal Modes

Choosing special initial conditions leads to periodic motions of two different types, called normal modes of oscillation.  We will calculate the solution and plot it in the (x ,y) plane and in the the (x,y,v) space.  And of course we also show the animation of the pendulums.  The first normal mode has the pendulums oscillating in phase (x = y).

k=1;
eps=0.1;
x0=1;v0=0;
y0=1.0;w0=0;
elapsedtime=100;
ic = {x[0]==x0,v[0]==v0,y[0]==y0,w[0]==w0}; 
{xsol,vsol,ysol,wsol} = NDSolveValue[{ode, ic}, {x,v,y,w},{t,0,elapsedtime}];

Plot[{xsol[t],ysol[t]},{t,0,100}]
ParametricPlot[{xsol[t],ysol[t]},{t,0,100}]
ParametricPlot3D[{xsol[t],ysol[t],vsol[t]},{t,0,100}]
Manipulate[MakePendulumPicture[xsol[t],ysol[t]],{t,0,100}]

The second normal mode has the pendulums oscillating in opposite phases (x = -y).

k=1;
eps=0.1;
x0=1;v0=0;
y0=-1;w0=0;
elapsedtime=100;
ic = {x[0]==x0,v[0]==v0,y[0]==y0,w[0]==w0}; 
{xsol,vsol,ysol,wsol} = NDSolveValue[{ode, ic}, {x,v,y,w},{t,0,elapsedtime}];

Plot[{xsol[t],ysol[t]},{t,0,100}]
ParametricPlot[{xsol[t],ysol[t]},{t,0,100}]
ParametricPlot3D[{xsol[t],ysol[t],vsol[t]},{t,0,100}]
Manipulate[MakePendulumPicture[xsol[t],ysol[t]],{t,0,100}]

Quasiperiodic Motion and Invariant Tori

A typical solution has x and y oscillations which are not periodic and which go in and out of phase.  The phase plots show various views of the resulting motion on a torus.

k=1;
eps=0.1;
x0=1;v0=0;
y0=0.5;w0=-1;
elapsedtime=200;

ic = {x[0]==x0,v[0]==v0,y[0]==y0,w[0]==w0}; 
{xsol,vsol,ysol,wsol} = NDSolveValue[{ode, ic}, {x,v,y,w},{t,0,elapsedtime}];

Plot[{xsol[t],ysol[t]},{t,0,100}]
ParametricPlot[{xsol[t],ysol[t]},{t,0,200}]
ParametricPlot3D[{xsol[t],ysol[t],vsol[t]},{t,0,200}]
Manipulate[MakePendulumPicture[xsol[t],ysol[t]],{t,0,200}]