Using matrix algebra to solve a differential vector equation

87 Views Asked by At

So I am solving a simple problem under the influence of gravity, with no resistance or extra forces.

Labeling the axes, let us use the downward vertical as our positive $y%-axis, with $x$ being standard.

Of course, the easiest way to actually define the position of the pendulum (or it's center of mass) is via

\begin{align*} \text{position: }\vec{r} &= \begin{bmatrix} x\\ y\\ \end{bmatrix} = R\begin{bmatrix} \sin\theta\\\cos\theta \end{bmatrix}\\ \text{velocity: }\vec{v} &=\frac{d}{dt}(\vec{r})=\begin{bmatrix}\dot{x}\\\dot{y}\end{bmatrix}= R\begin{bmatrix}\dot{\theta}\cos\theta\\-\dot{\theta}\sin\theta\end{bmatrix}\\ \text{acceleration: }\vec{a} &=\frac{d^2}{dt^2}(\vec{r})= R\begin{bmatrix}\ddot{\theta}\cos\theta - \dot{\theta}^2\sin\theta\\-\ddot{\theta}\sin\theta - \dot{\theta}^2\cos\theta\end{bmatrix} \end{align*}

where $\theta$ is the angle formed with the vertical by the pendulum.

Normally we would write the EOM as two separate equations:

$$\begin{cases}m\ddot{x}=0\\m\ddot{y}=F_g=mg\end{cases}$$

Of course, the two equations of motion are coupled by the relationship $x^2+y^2=R^2$, where but I wanted to try something a little different.

Instead, I wanted to try solving this system through matrix algebra, so rewriting the vector equation in polar coordinates by substituting for $\ddot{x}$ and $\ddot{y}$ yields:

$$m\vec{a} = m \begin{bmatrix} \ddot{x}\\\ddot{y}\end{bmatrix} = mR \begin{bmatrix} \ \ddot{\theta}\cos\theta-\dot{\theta}^2\sin\theta \\ -\ddot{\theta}\sin\theta-\dot{\theta}^2\cos\theta \\\end{bmatrix} = \begin{bmatrix}0\\mg\end{bmatrix}$$

Normally we would express this system like so:

$$\begin{cases}m\ddot{x} = mR(\ddot{\theta}\cos\theta-\dot{\theta}^2\sin\theta)=0\\ m\ddot{y} = mR(-\ddot{\theta}\sin\theta-\dot{\theta}^2\cos\theta)=mg\end{cases}$$

Here is my first question: Instead of solving the two equations separately, does it make sense to factor the matrix version of the equation, then employ some matrix multiplications to both sides to solve the problem?

The way I am imagining this process is as follows (beginning from Newton's second law)

\begin{align*} m\vec{a} &= \vec{F}_{net} = \vec{F}_g\\ % m\begin{bmatrix}\ddot{x}\\\ddot{y}\end{bmatrix} &= \begin{bmatrix}0\\ mg\end{bmatrix}\\ % \text{Subsitute for $x,y$} \rightarrow m\begin{bmatrix}\ddot{x}\\\ddot{y}\end{bmatrix} &= mR\begin{bmatrix} \ \ddot{\theta}\cos\theta-\dot{\theta}^2\sin\theta \\ -\ddot{\theta}\sin\theta-\dot{\theta}^2\cos\theta \\\end{bmatrix}\\ % \text{Factor} \rightarrow \begin{bmatrix} \ \ddot{\theta}\cos\theta-\dot{\theta}^2\sin\theta \\ -\ddot{\theta}\sin\theta-\dot{\theta}^2\cos\theta \\\end{bmatrix} &= \begin{bmatrix} \cos\theta&-\sin\theta \\ -\sin\theta&-\cos\theta \\\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}\\ % \text{So we have: }\rightarrow \begin{bmatrix} \cos\theta&-\sin\theta \\ -\sin\theta&-\cos\theta \\\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&=\begin{bmatrix}0\\ \frac{g}{R}\end{bmatrix}\\ % \begin{bmatrix}1&0\\0&-1\end{bmatrix}\begin{bmatrix} \cos\theta&-\sin\theta \\ -\sin\theta&-\cos\theta \\\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&=\begin{bmatrix}1&0\\0&-1\end{bmatrix}\begin{bmatrix}0\\ \frac{g}{R}\end{bmatrix}\\ % \begin{bmatrix}\cos\theta&0\\0&\sin\theta\end{bmatrix} \begin{bmatrix}1&0\\0&-1\end{bmatrix}\begin{bmatrix} \cos\theta&-\sin\theta \\ -\sin\theta&-\cos\theta \\\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&=\begin{bmatrix}\cos\theta&0\\0&\sin\theta\end{bmatrix}\begin{bmatrix}1&0\\0&-1\end{bmatrix}\begin{bmatrix}0\\ \frac{g}{R}\end{bmatrix}\\ % \begin{bmatrix}\cos\theta&0\\0&\sin\theta\end{bmatrix} \begin{bmatrix} \cos\theta&-\sin\theta \\ \sin\theta&\cos\theta \\\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&=\begin{bmatrix}\cos\theta&0\\0&\sin\theta\end{bmatrix}\begin{bmatrix}0\\ -\frac{g}{R}\end{bmatrix}\\ % \begin{bmatrix} \cos^2\theta&-\sin\theta\cos\theta\\ \sin^2\theta&\sin\theta\cos\theta \\\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&=\begin{bmatrix}0\\ -\frac{g}{R}\sin\theta\end{bmatrix}\\ % \begin{bmatrix}1&1\end{bmatrix}\begin{bmatrix} \cos^2\theta&-\sin\theta\cos\theta\\ \sin^2\theta&\sin\theta\cos\theta \\\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&=\begin{bmatrix}1&1\end{bmatrix}\begin{bmatrix}0\\ -\frac{g}{R}\sin\theta\end{bmatrix}\\ % \begin{bmatrix}\cos^2\theta+\sin^2\theta&\sin\theta\cos\theta-\sin\theta\cos\theta\end{bmatrix}\begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&= -\frac{g}{R}\sin\theta\\ % \begin{bmatrix}1&0\end{bmatrix}\begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&= -\frac{g}{R}\sin\theta\\ \ddot{\theta}&= -\frac{g}{R}\sin\theta\\ % \end{align*}

$$\frac{d\dot{x}}{dx}\dot{x}= -\frac{g}{R}\sin\theta$$

$$\dot{x}d\dot{x}= -\frac{g}{R}\sin\theta dx$$

Is this a valid derivation of the equation of motion for a pendulum?

Edit: Here is another question. Instead of left multiplying by $\begin{bmatrix}\cos\theta&0\\0&\sin\theta\end{bmatrix}$, if we left multiply by $\begin{bmatrix}0&\cos\theta\\-\sin\theta&0\end{bmatrix}$, we get:

\begin{align} \begin{bmatrix}0&\cos\theta\\-\sin\theta&0\end{bmatrix} \begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&= \begin{bmatrix}0&\cos\theta\\-\sin\theta&0\end{bmatrix} \begin{bmatrix}0\\-\frac{g}{R}\end{bmatrix}\\ % \begin{bmatrix}\sin\theta\cos\theta&\cos^2\theta\\-\sin\theta\cos\theta&\sin^2\theta\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&= \begin{bmatrix}-\frac{g}{R}\cos\theta\\0\end{bmatrix}\\ % \begin{bmatrix}1&1\end{bmatrix} \begin{bmatrix}\sin\theta\cos\theta&\cos^2\theta\\-\sin\theta\cos\theta&\sin^2\theta\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&= \begin{bmatrix}1&1\end{bmatrix} \begin{bmatrix}-\frac{g}{R}\cos\theta\\0\end{bmatrix}\\ % \begin{bmatrix}0&1\end{bmatrix} \begin{bmatrix}\ddot{\theta}\\ \dot{\theta}^2\end{bmatrix}&= -\frac{g}{R}\cos\theta\\ % \dot{\theta}^2 &= -\frac{g}{R}\cos\theta \\ % \end{align}

If the above is valid, this should be valid too, correct?

1

There are 1 best solutions below

1
On BEST ANSWER

The problem is that you started with a wrong assumption, that the gravity is the only force. If you just have a mass suspended at some point, and you release it, it will not oscillate, but instead it will go straight down. You need to add the tension in the suspending wire.