I want to transform a differential equation from polar coordinates $(r,\theta)$ to the following $(u, v, \phi)$ coordinate system:
$$ u = r \cos(\theta - \phi) \\ v = r \sin(\theta - \phi) \\ \phi = \theta + \arctan(\dot r,\ r\dot\theta) $$
$u$ and $v$ form a rectilinear coordinate system aligned with the direction of motion along the $u$-axis. Put another way, $\phi$ is heading, $u$ is distance from the origin along the track, and $v$ is cross-track distance from the origin. (The reason I want to use coordinate system is numerical accuracy.)
I know that adding a variable means I need to add an equation, and I have a differential equation for $\phi$:
$$ \dot \phi = -\frac{\dot v}{u} $$
I'm also using the following substitutions:
$$ r = \sqrt{u^2+v^2} \\ \theta = \phi + \arctan(u, v) $$
The problem comes when I try taking the derivatives of $r$ and $\theta$:
$$ \ddot r = \frac{u\ddot u + v\ddot v}{\sqrt{u^2+v^2}} + \cdots \\ \ddot \theta = -\frac{v}{u}\frac{u\ddot u + v\ddot v}{u^2+v^2} + \cdots $$
Both of them contain a multiple of $u\ddot u+ v\ddot v$. Therefore I can't solve for both $\ddot u$ and $\ddot v$ (in fact the equations are inconsistent, so I can't even get one in terms of the other).
Is there something about my choice of coordinate system that is causing problems, or is it just my method of substitution?
Update
I think I've figured out part of the problem. I can set up two equations for $r$ and $\theta$ in terms of $u$, $v$, and $\phi$, and I can set up four more for the first and second derivatives. Plus, I can add one more for $\phi$ as a function of $\theta$, $r$, $\dot r$ and $\dot\theta$. This gives me seven equations.
I need to solve for $\ddot u$, $\ddot v$, and $\dot \phi$ to set up my differential equation. I also need to solve for $r$, $\theta$, $\dot r$ and $\dot theta$ to eliminate them from the final equations. This uses up all seven of my equations.
However, there is still a $\ddot\phi$ floating around. I can try to solve for it by taking the derivative of $\dot\phi$, but it contains $\ddot u$ and $\ddot v$; and when I substitute it into the expression for $\ddot v$ I end up with $\ddot v = \cdots + \ddot v$, which is false. What is another way to get $\ddot \phi$ that avoids this problem?