UP

PDF letter size

PDF legal size

HW 6 Mathematics 503, Mathematical Modeling, CSUF , June 24, 2007

Nasser M. Abbasi

Summer 2007   Compiled on October 14, 2025 at 5:10pm  [public]

Contents

1 animations
2 Problem 1 (section 3.5,#9, page 197)
3 Problem 1 (section 3.5,#9, page 197)

1 animations

Click on shrink_pendulum3.swf (adobe flash file) (it will take 2-3 second for the simulation to start.)

Source code is

PDF

2 Problem 1 (section 3.5,#9, page 197)

problem:

Consider a simple plane pendulum with a bob of mass \(m\) attached to a string of length \(l\). After the pendulum is set in motion the string is shortened by a constant rate \(\frac {dl}{dt}=-\alpha \). Formulate Hamilton’s principle and determine the equation of motion. Compare the Hamiltonian to the total energy. Is energy conserved?

Solution:

Assume initial string length is \(l\), and assume \(t\left ( 0\right ) =0\), then at time \(t\) we have

\[ r\left ( t\right ) =l-\alpha t \]

K.E.  First note that

\begin{align*} \dot {x} & =\frac {d}{dt}\left ( r\left ( t\right ) \sin \theta \left ( t\right ) \right ) \\ & =\dot {r}\sin \theta +r\cos \theta \dot {\theta }\end{align*}

and

\begin{align*} \dot {y} & =\frac {d}{dt}\left ( r\left ( t\right ) \cos \theta \left ( t\right ) \right ) \\ & =\dot {r}\cos \theta -r\sin \theta \dot {\theta }\end{align*}

Now

\begin{align*} T & =\frac {1}{2}m\left ( \dot {x}^{2}+\dot {y}^{2}\right ) \\ & =\frac {1}{2}m\left ( \left ( \dot {r}\sin \theta +r\cos \theta \dot {\theta }\right ) ^{2}+\left ( \dot {r}\cos \theta -r\sin \theta \dot {\theta }\right ) ^{2}\right ) \\ & =\frac {1}{2}m\left ( \dot {r}^{2}+r^{2}\dot {\theta }^{2}\right ) \\ & =\frac {1}{2}m\left ( \alpha ^{2}+r^{2}\dot {\theta }^{2}\right ) \end{align*}

P.E.

\begin{align*} V & =mgl-mg\left ( r\cos \theta \right ) \\ & =mg\left ( l-r\cos \theta \right ) \end{align*}

Hence

\begin{align*} J\left ( \theta \right ) & =\int _{0}^{T}\left ( T-V\right ) dt\\ & =\int _{0}^{T}\frac {1}{2}m\left ( \alpha ^{2}+r^{2}\dot {\theta }^{2}\right ) -mg\left ( l-r\cos \theta \right ) \text { }dt \end{align*}

Hence

\begin{equation} L\left ( t,\theta \left ( t\right ) ,\dot {\theta }\left ( t\right ) \right ) =\frac {1}{2}m\left ( \alpha ^{2}+r^{2}\dot {\theta }^{2}\right ) -mg\left ( l-r\cos \theta \right ) \tag {1}\end{equation}

Hence the Euler-Lagrange equations are

\begin{equation} L_{\theta }-\frac {d}{dt}\left ( L_{\dot {\theta }}\right ) =0 \tag {2}\end{equation}

But

\[ \fbox {$L_{\theta }=-mgr\sin \theta $}\]

and

\[ \fbox {$L_{\dot {\theta }}=mr^{2}\dot {\theta }$}\]

and

\[ \frac {d}{dt}\left ( L_{\dot {\theta }}\right ) =m\left ( 2r\dot {r}\dot {\theta }+r^{2}\ddot {\theta }\right ) \]

But \(\dot {r}=-\alpha \), the above becomes

\[ \fbox {$\frac {d}{dt}\left ( L_{\dot {\theta }}\right ) =m\left ( r^{2}\ddot {\theta }-2r\alpha \dot {\theta }\right ) $}\]

Hence \(L_{\theta }-\frac {d}{dt}\left ( L_{\dot {\theta }}\right ) =0\) becomes

\begin{align*} -mgr\sin \theta -m\left ( r^{2}\ddot {\theta }-2\alpha \dot {\theta }r\right ) & =0\\ r^{2}\ddot {\theta }-2\alpha \dot {\theta }r+gr\sin \theta & =0 \end{align*}

Hence the ODE becomes, after dividing by common factor \(r\)

\[ \fbox {$r\ddot {\theta }-2\alpha \dot {\theta }+g\sin \theta =0$}\]

This is a second order nonlinear differential equation. Notice that when \(l=\alpha t\) it will mean that the string has been pulled all the way back to the pivot and \(r\left ( t\right ) =0\). So when running the solution it needs to run from \(t=0\) up to \(t=\frac {l}{\alpha }\).

A small simulation was done for the above solution which can be run for different parameters to see the effect more easily. Here is a screen shot.

Now we need to determine the Hamiltonian of the system.

\begin{equation} H=-L\left ( t,\theta ,\phi \left ( t,\theta ,p\right ) \right ) +\phi \left ( t,\theta ,p\right ) p \tag {3}\end{equation}

Where we define a new variable \(p\) called the canonical momentum by

\begin{align*} p & \equiv L_{\dot {\theta }}\left ( t,\theta ,\dot {\theta }\right ) \\ & =mr^{2}\dot {\theta }\end{align*}

Hence

\[ \dot {\theta }=\frac {p}{mr^{2}}\]

This implies that

\[ \phi \left ( t,\theta ,p\right ) =\frac {p}{mr^{2}}\]

Then from (1) and (3), we now calculate \(H\)

\begin{align*} H & =-L\left ( t,\theta ,\phi \left ( t,\theta ,p\right ) \right ) +\phi \left ( t,\theta ,p\right ) p\\ & =-\left \{ \frac {1}{2}m\left ( \alpha ^{2}+r^{2}\left ( \frac {p}{mr^{2}}\right ) ^{2}\right ) -mg\left ( l-r\cos \theta \right ) \right \} +\left ( \frac {p}{mr^{2}}\right ) p\\ & =-\frac {1}{2}m\left ( \alpha ^{2}+\frac {p^{2}}{m^{2}r^{2}}\right ) +mg\left ( l-r\cos \theta \right ) +\frac {p^{2}}{mr^{2}}\\ & =-\frac {1}{2}m\alpha ^{2}-\frac {1}{2}\frac {p^{2}}{mr^{2}}+mg\left ( l-r\cos \theta \right ) +\frac {p^{2}}{mr^{2}}\end{align*}

Hence the Hamiltonian is

\begin{equation} H=\frac {1}{2}\frac {p^{2}}{mr^{2}}+mg\left ( l-r\cos \theta \right ) -\frac {1}{2}m\alpha ^{2} \tag {5}\end{equation}

Now we are asked to compare \(H\) to the total energy. The total instantaneous energy of the system is \(\left ( T+V\right ) \), hence we need to determine if \(H=T+V\) or not.

\begin{equation} T+V=\frac {1}{2}m\left ( \alpha ^{2}+r^{2}\dot {\theta }^{2}\right ) +mg\left ( l-r\cos \theta \right ) \tag {6}\end{equation}

To make comparing (5) and (6) easier, I need to either replace \(p\) by \(mr^{2}\dot {\theta }\) in (5) or replace \(\dot {\theta }\) by \(\frac {p}{mr^{2}}\). Lets do the later, hence \((6)\) becomes

\begin{align} T+V & =\frac {1}{2}m\left ( \alpha ^{2}+r^{2}\left ( \frac {p}{mr^{2}}\right ) ^{2}\right ) +mg\left ( l-r\cos \theta \right ) \nonumber \\ & =\frac {1}{2}m\left ( \alpha ^{2}+\frac {p^{2}}{m^{2}r^{2}}\right ) +mg\left ( l-r\cos \theta \right ) \nonumber \\ & =\frac {1}{2}m\alpha ^{2}+\frac {1}{2}\frac {p^{2}}{mr^{2}}+mg\left ( l-r\cos \theta \right ) \tag {7}\end{align}

If \(H\) is the total energy, then (7)-(6) should come out to be zero, lets find out

\begin{align*} H-\left ( T+V\right ) & =\left ( \frac {1}{2}\frac {p^{2}}{mr^{2}}+mg\left ( l-r\cos \theta \right ) -\frac {1}{2}m\alpha ^{2}\right ) -\left ( \frac {1}{2}m\alpha ^{2}+\frac {1}{2}\frac {p^{2}}{mr^{2}}+mg\left ( l-r\cos \theta \right ) \right ) \\ & =-m\alpha ^{2}\end{align*}

Hence we see that

\(\fbox {$H-\left ( T+V\right ) \neq 0$}\)

Hence \(H\) does not represents the total energy, and the energy of the system is not conserved.\(\footnote {Reading a reference on Noether's theorem, total energy is written as $-\left ( T+V\right ) $ not $\left ( T+V\right ) $, this would not make a difference in showing that $H\neq $ total energy, just different calculations results as shown below, but the same conclusion \par \begin {equation} -\left ( T+V\right ) =-\left ( \frac {1}{2}m\left ( \alpha ^{2}+r^{2}\dot {\theta }^{2}\right ) +mg\left ( l-r\cos \theta \right ) \right ) \tag {6}\end {equation} \par To make comparing (5) and (6) easier, I\ need to either replace $p$ by $mr^{2}\dot {\theta }$ in (5) or replace $\dot {\theta }$ by $\frac {p}{mr^{2}}$, let do the later, hence $(6)$ becomes \par \begin {align} -\left ( T+V\right ) & =-\left ( \frac {1}{2}m\left ( \alpha ^{2}+r^{2}\left ( \frac {p}{mr^{2}}\right ) ^{2}\right ) +mg\left ( l-r\cos \theta \right ) \right ) \nonumber \\ & =-\left ( \frac {1}{2}m\left ( \alpha ^{2}+\frac {p^{2}}{m^{2}r^{2}}\right ) +mg\left ( l-r\cos \theta \right ) \right ) \nonumber \\ & =-\left ( \frac {1}{2}m\alpha ^{2}+\frac {1}{2}\frac {p^{2}}{mr^{2}}+mg\left ( l-r\cos \theta \right ) \right ) \tag {7}\end {align} \par If $H$ is the total energy, then (7)-(6) should come out to be zero, lets find out \par \begin {align*} H-\left ( -\left ( T+V\right ) \right ) & =\left ( \frac {1}{2}\frac {p^{2}}{mr^{2}}+mg\left ( l-r\cos \theta \right ) -\frac {1}{2}m\alpha ^{2}\right ) +\left ( \frac {1}{2}m\alpha ^{2}+\frac {1}{2}\frac {p^{2}}{mr^{2}}+mg\left ( l-r\cos \theta \right ) \right ) \\ & =\frac {p^{2}}{mr^{2}}+2mg\left ( l-r\cos \theta \right ) \end {align*} \par Now we ask, can the above be zero? Since $\frac {p^{2}}{mr^{2}}$ is always $\geq 0$, and since $\left ( l-r\cos \theta \right ) $ represents the remaining length of the string, hence it is a positive quantity (until such time the string has been pulled all the way in), Therefore RHS\ above $>0$. Hence $H$ does not represent the total energy of the system. Hence the energy is not conserved.}\)

3 Problem 1 (section 3.5,#9, page 197)

problem: A bead of mass \(m\) slides down the rim of a circular hoop of radius \(R\). The hoop stands vertically and rotates about its diameter with angular velocity \(\omega \). Determine the equation of motion of the bead.

Answer:

Kinetic energy \(T\) is made up of 2 components, one due to motion of the bead along the hoop itself with speed \(R\dot {\theta }\), and another due to motion with angular speed \(\omega \) which has speed given by \(R\sin \theta \omega \)

Hence

\begin{align*} T & =\frac {1}{2}m\left ( \left ( R\dot {\theta }\right ) ^{2}+\left ( R\sin \theta \omega \right ) ^{2}\right ) \\ & =\frac {1}{2}mR^{2}\left ( \dot {\theta }^{2}+\omega ^{2}\sin ^{2}\theta \right ) \end{align*}

P.E. \(V\) is due to the bead movement up and down the hoop, which is the standard \(V\) for a pendulum given by

\[ V=mgR\left ( 1-\cos \theta \right ) \]

Hence

\begin{align*} L & =T-V\\ & =\frac {1}{2}mR^{2}\left ( \dot {\theta }^{2}+\omega ^{2}\sin ^{2}\theta \right ) -mgR\left ( 1-\cos \theta \right ) \end{align*}

Hence

\[ L_{\theta }=mR^{2}\left ( \omega ^{2}\sin \theta \cos \theta \right ) -mgR\sin \theta \]

and

\[ L_{\dot {\theta }}=mR^{2}\dot {\theta }\]

Hence

\[ \frac {d}{dt}L_{\dot {\theta }}=mR^{2}\ddot {\theta }\]

Hence

\begin{align*} L_{\theta }-\frac {d}{dt}L_{\dot {\theta }} & =0\\ mR^{2}\left ( \omega ^{2}\sin \theta \cos \theta \right ) -mgR\sin \theta -mR^{2}\ddot {\theta } & =0\\ \omega ^{2}\sin \theta \cos \theta -\frac {g}{R}\sin \theta -\ddot {\theta } & =0 \end{align*}

Hence the ODE is

\[ \fbox {$\ddot {\theta }+\sin \theta \left ( \frac {g}{R}-\omega ^{2}\cos \theta \right ) =0$}\]

With initial conditions \(\theta \left ( 0\right ) =\theta _{0},\dot {\theta }\left ( 0\right ) =\dot {\theta }_{0}\)