# Pendulum Problem with State Space and Stability

Given this information, \begin{aligned} \dot\theta &= w \\ \dot{w} &= -\sin(\theta) \end{aligned}

a) Use newton's law to show this describes the dynamics of a pendulum of length $L$, where $g$ is the acceleration of gravity, $\theta$ is the pendulum angle and $w=\dot{\theta}$.

b) Find the function that is invariant on trajectories in state space.

For part a) this is what I have so far..

$\begin{bmatrix} \dot{\theta} \\ \dot{w} \end{bmatrix}=\begin{bmatrix} 0 && 1 \\ -g/L && 0 \end{bmatrix}\begin{bmatrix} \theta \\ w \end{bmatrix}$

So my question would be is part a) correct and how do you do part b). If part a) is wrong, could you please show me the correct state space representation of it. Also please show me how to do part b), that part is just confusing for me... I'm thinking I should consider the energy of the system but I'm not sure.

Thank you

• You have a few typos ($\dot{\theta}$ and $g/L$) in the first equations. And yes, you should consider the energy of the system. – jcandy Oct 26 '17 at 2:16
• Isn't the equation for a simple pendulum $\ddot{\theta}+g/L*sin(\theta)=0$? This would then let you assume that the equation simplifies to, $\ddot{\theta}=-g/L*\dot{w}$ because we were given that $\dot{w}=sin(\theta)$. – lnbmoco Oct 26 '17 at 20:12

a) The velocity of the point mass with coordinates $(x,y) = L (\sin\theta,-\cos\theta)$ is $(\dot x,\dot y) = L \dot\theta (\cos\theta,\sin\theta)$. Thus, its acceleration is $(\ddot x,\ddot y) = L \ddot\theta (\cos\theta,\sin\theta) + L \dot\theta^2 (-\sin\theta,\cos\theta)$. The gravity force applied on the point mass is given by $(0,-mg)$, where $m$ denotes the mass and $g$ the gravity constant. Therefore, Newton's second law writes \begin{aligned} \ddot\theta\cos\theta - \dot\theta^2\sin\theta &= 0 \, , && (1)\\ \ddot\theta\sin\theta + \dot\theta^2\cos\theta &= -g/L \, . && (2) \end{aligned} The combination $(1)\times\cos\theta + (2)\times\sin\theta$ gives the classical pendulum equation $$\ddot\theta + \frac{g}{L}\sin\theta = 0 \, .$$ To match the notations in the original post, we have several possibilities:
• either there is a typo in the first system which should be $\dot\theta = w$, $\dot w = -g/L\sin\theta$;
• or we should identify the first system with the pendulum by setting $g/L = 1$.
b) The mechanical energy $E$ is the sum of the kinetic energy $\frac{1}{2}mL^2\dot\theta^2$ and the potential energy $-mg\cos\theta$, which may be rewritten $E/m = \frac{1}{2}L^2w^2 - g\cos\theta$. Its time-derivative writes \begin{aligned} \dot E/m &= \frac{\text{d}}{\text{d}t} \left(\frac{1}{2}L^2\dot\theta^2 -g\cos\theta\right) ,\\ &= \dot\theta \left(L\ddot\theta + g\sin\theta\right) ,\\ &= 0 \, . \end{aligned} Therefore, $E$ is invariant on trajectories in the state space.