Periodically Forced Pendulum
by David Housman
.
All Graphs for No Drag or External Forces with Moderate Amplitude Swings
What information do we obtain from each graph?
Parameter definitions.
b := 0: F := 0: omega := 0:
theta0 := 1.2: v0 := 0.0:
Phase plot
ics := [[theta(0) = theta0, v(0) = v0]]:
DEplot(sys, fns, t=0..30, ics, theta = -Pi..Pi, v = -3.5..3.5, linecolour=blue, stepsize=.1);
Dependent vs. Independent Variable Plots
ic := {theta(0) = theta0, v(0) = v0}:
soln := dsolve(sys union ic, fns, type=numeric, output=listprocedure,maxfun=300000):
solntheta := subs(soln,theta(t)):
solnv := subs(soln,v(t)):
plot(solntheta, 0..30, title="Angle vs. Time", labels=["t","theta"]);
plot(solnv, 0..30, title="Velocity vs. Time", labels=["t","theta"]);
plot([solntheta,solnv], 0..30, title="Angle and Velocity vs. Time", labels=["t","theta"]);
Period calculation
t1 := fsolve(solntheta(t)=0,t,1..2);
t2 := fsolve(solntheta(t)=0,t,8..9);
period := t2 - t1;
3d Curve of all three variables
spacecurve([solntheta(t),solnv(t),t],t=0..30, numpoints=150, axes=NORMAL, labels=["theta","v","t"]);
Poincare Return Map
points := [seq([solntheta(period*n),solnv(period*n)],n=0..50)]:
plot(points, -3..3, -3..3, style=point, symbolsize=10, title="Poincare Return Map", labels=["theta","v"]);
Poincare Map Animation
points := [seq([solntheta(period*n),solnv(period*n)],n=0..50)]:
plot(points, style=point, symbolsize=10, title="Poincare Return Map", labels=["theta","v"]);