problem08
1 Write differential equations in polar form
We finally get:
\[\vec{a} = (\ddot{r} - r\omega^2)\hat{e}_r + (2\dot{r}\omega + r\dot{\omega})\hat{e}_\theta = \vec{0}\]
We can break this down into two scalar differential equations of non-unity order,
\[ \ddot{r} - r\omega^2 = 0 \]
\[ 2\dot{r}\omega + r \dot{\omega} = 0 \]
Rearranging the terms
\[ \ddot{r} = r\omega^2 \]
\[ \dot{\omega} = - 2r^{-1}v_r\omega \]
introducing the state variable in the following way to reduce this into a first order vector differential equation, also we include \(\theta\) to able to track it:
\[\vec{z} = \begin{bmatrix} \dot{r} \\ \dot{v_r} \\ \dot{\theta} \\ \dot{\omega} \end{bmatrix} = \begin{bmatrix} v_r \\ r\omega^2 \\ \omega \\ - 2r^{-1}v_r\omega \\ \end{bmatrix} \]
2 Solve them numerically for various initial conditions
Some trajectories and some animations for various initial sets of initial conditions look indeed like uniform motion.
3 Plot the solution and check that the motion is a straight line at constant speed.
The plots generated by this:
../../media/problem08/problem08-trajectory.png
4 Define a metric to measure straightness, plot
Just like problem03
, we can either use an analog to slither
, i.e. the root mean squared error, but that again would require a lot of computer memory, which corresponds to impossibility on my computer, hence the easiest way here is the tail_match
.
The measure here is the euclidean norm from the expected end point:
\[\mathbf{\hat{p}} = r_0\left(cos(\theta_0)\hat{i} + sin(\theta_0)\hat{j}\right) + \vec{v} \Delta t\]
\[e = \texttt{norm}(\mathbf{\vec{p}}-\mathbf{\hat{p}})\]
The path is already very straight without refining \(\Delta h\):
../../media/problem08/problem08-error.png
This sums up my attempt of problem08
.