Simple Pendulum
The objective in this section is to visualize the
motion of a simple pendulum which consist of a small mass m suspended
by a light inextensible cord of length L from a
fixed support. If we apply the law of the conservation of
mechanical energy to analyze the motion of the mass m, we
obtain the following initial value problem described by the
differential equation
+
subject to the initial conditions and . g is the
acceleration of gravity and the angular displacement is measured from
the vertical. If we account for the frictional resistance of the
surrounding medium which is proportional to the instantaneous
velocity, c , the result is the
differential equation:
+ c +
This equation has no closed-form solution for , so we find a
numerical solution using the Runge-Kutta-Fehlberg fourth-fifth
method. We define the general nonlinear pendulum eqation by:
> deq:=(c,L)->diff(theta(t),t$2)+c*diff(theta(t),t)+9.8/L*sin(theta(t))=0:
With the damping coefficient , L = 5 m and the initial conditions , we get:
> sol:=dsolve({deq(0.2,5),theta(0)=Pi/3,D(theta)(0)
= 0},theta(t),numeric,startinit=true);
For t = 5
we get:
> sol(5);
The graphs of and is shown in Figure
2.
> with(plots):
> plt1:=odeplot(sol,[t,theta(t)],0..10):
> plt2:=odeplot(sol,[t,diff(theta(t),t)],0..10,color=blue):
> display(plt1,plt2);
Figure 2 Angular
and angular velocity position for the simple pendulum with
damping
The pseudoperiod of time for the
first complete damped oscillation is about four times the amount
of time required for to decrase from to .
> alpha:=u->subs(sol(u),theta(t)):
> T[1]=4*fsolve('alpha(u)'=0,u=0..2);
Figure 3 animates damped motion of the pendulum
and the simultaneous position of the mass on the angular position
curve.
> Pendulum(5,60,0.2,scaling=constrained,axes=normal,tickmarks=[4,4]);
Figure 3 Damped
motion of a simple pendulum.
t and (in degree) are displayed in the cyan window