Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to Mathematica tutorial for the second course APMA0340
Return to the main page for the course APMA0330
Return to the main page for the course APMA0340
Return to Part IV of the course APMA0330
Simple pendulum equation \( \ddot{\theta} + \omega_0^2
\sin \theta =0 , \)
although straightforward in appearance, is in fact rather difficult to solve
because of the non-linearity of the term \( \sin \theta . \) It turns out that the general initial value problem
where 𝑎 is the initial displacement and b is the initial velocity of the bob (its mass does not matter)), could not be solved using elementary functions but is expressed
through elliptic functions. Here &omega0² = ℓ/g, with ℓ being pendulum length and g being acceleration due to gravity.Accordingly, θ denotes the angle between the rod and the downward vertical direction with the counterclockwise direction taken as positive.
As usual in this tutorial, we demonstrate different approaches to obtain the
solution.
In order to derive the
exact solution, this equation is multiplied by the integrating factor \( \dot{\theta} = {\text d}\theta / {\text d} t, \)
so that it becomes
From this equation we immediately can determine the maximum amplitude of
oscillations by equating the first derivative to zero:
\[
\cos\theta = \cos a - \frac{b^2}{2\,\omega_0^2} . \qquad\blacktriangleleft
\]
We are going to derive the above first order differential equation for angle
θ using another approach. Let \( \alpha =
\dot{\theta} = {\text d}\theta / {\text d}t \) be the derivative of
θ with respect to time variable t. Then from chain rule, we get
which is exactly the same as we obtained previously using consevation of energy
approach.
Since the above first order differential equation is separable
\[
\pm\frac{{\text d}\theta}{\sqrt{A + B\,\cos\theta}} = {\text d}t , \qquad
\mbox{where}
\quad A = b^2 - 2\,\omega_0^2 \cos a , \quad B = 2\,\omega_0^2 ,
\]
we ask Mathematica to integrate
Integrate[(A + B*Cos[x])^(-1/2), x]
(2 Sqrt[(A + B Cos[x])/(A + B)]
EllipticF[x/2, (2 B)/(A + B)])/Sqrt[A + B Cos[x]]
Here EllipticF denotes the elliptic integral of the first kind
\[
\mbox{am} (u,k) = \phi = F^{-1} \left( u , k \right) .
\]
This allows us to express the solution of the pendulum equation only
implicitly:
\[
\frac{2}{\sqrt{b^2 - 2\omega_0^2 \cos a + 2\omega_0^2}} \,
F \left( \frac{\theta}{2} , \frac{4\omega_0^2}{b^2 - 2\omega_0^2 \cos a
+ 2\omega_0^2} \right) =
\frac{2}{\sqrt{b^2 - 2\omega_0^2 \cos a + 2\omega_0^2}} \,
F \left( \frac{a}{2} , \frac{4\omega_0^2}{b^2 - 2\omega_0^2 \cos a
+ 2\omega_0^2} \right) =
\pm t .
\]
Even with the aid of special function (the elliptic integral of the first
kind), the obtained implicit solution is not pleasant to deal with. Therefore,
we consider two auxiliary initial value problems:
The time τ to go from point (1,0) to point \( \left( z, {\text d}z / {\text d} \tau \right) \)
in the lower half-plane of the graph of \( {\text d}z / {\text d} \tau \) as a function of z is
The period of oscillation T is four times the time taken by the pendulum to swing from
\( \theta =0 \ (z=0) \) to \( \theta = \theta_0 \ (z=1) . \)
Therefore,
\[
z = \mbox{sn} \left( K(k) - \tau ; k \right) ,
\]
where Mathematica has special commands for their evaluations: EllipticK[m] for complete elliptic integral of the first kind,
and EllipticF[φ,m] for incomplete elliptic integral of the first kind. Mathematica also
uses a special command JacobiSN[u,m] for the Jacobi elliptic function sn(u;m). These functions are discussed
in the second part of the course.
Now we return to the original variables
Using the relations \( \dot{\bf e}_{r} = \dot{\theta} {\bf e}_{\theta} \) and
\( \dot{\bf e}_{\theta} = -\dot{\theta} {\bf e}_{r} , \) we obtain the velocity,
acceleration, and jerk:
A. Belendez, C. Pascual, D.I. Mendez, T. Belendez and C. Neipp,
Exact solution for the
nonlinear pendulum, Revista Brasileira de Ensino de Fisica,
v. 29, n. 4, p. 645--648, 2007.
Return to Mathematica page
Return to the main page (APMA0330)
Return to the Part 1 (Plotting)
Return to the Part 2 (First Order ODEs)
Return to the Part 3 (Numerical Methods)
Return to the Part 4 (Second and Higher Order ODEs)
Return to the Part 5 (Series and Recurrences)
Return to the Part 6 (Laplace Transform)
Return to the Part 7 (Boundary Value Problems)