# Converting DE to polar coordinates

Regarding "2" in the image, we know that $$\theta = \tan^{-1}(y/x)$$, but I have trouble finding out how $$\dot{\theta}$$ is calculated from this. I saw some more examples but they are not helping a lot.

It might be easier to rewrite it as $$\tan \theta = y/x$$ such that \begin{align} \frac{\mathrm{d}}{\mathrm{d}t} \tan\theta &= \dot{\theta} \sec^2\theta && \text{(chain rule)} \\ &= \frac{\mathrm{d}}{\mathrm{d}t} \frac{y}{x} && \text{(definition)}\\ &= \frac{x\dot{y} - \dot{x}y}{x^2}. && \text{(quotient rule)} \end{align} This finishes the left side of the equation by algebraic solution of $$\dot{\theta}$$, i.e. $$\dot{\theta} \equiv \left(\frac{\dot{y}}{x} - \frac{\dot{x}y}{x^2}\right)\cos^2\theta.$$ Now to find the right side of the equation, simply plug in \begin{align} \left(\frac{\dot{y}}{x} - \frac{\dot{x}y}{x^2}\right)\cos^2\theta &= \left(\frac{(x^2 + y^2 -1)y - x}{x} - \frac{(x^2 + y^2 - 1)xy + y^2}{x^2}\right) \cos^2 \tan^{-1}\frac{y}{x} \\ &= -\left(1 + \frac{y^2}{x^2}\right) \left(1 + \frac{y^2}{x^2}\right)^{-1} \\ &\equiv -1. \end{align}

We are given

$$\dot{x}=(x^2+y^2−1)x+y,\quad \dot{y}=(x^2+y^2−1)y-x$$

and it is known that in polar coordinates

$$\theta=\tan^{-1}\left(\frac{y}{x}\right),\quad x^2+y^2=r^2$$

therefore by the derivative of the inverse tangent function and the quotient and chain rule

\begin{align}\dot{\theta}&=\frac{1}{1+\left(\frac{y}{x}\right)^2}\left(\frac{\dot{y}x-\dot{x}y}{x^2}\right)\\&= \frac{\dot{y}x-\dot{x}y}{x^2+y^2}\\&= \frac{\Big((x^2+y^2−1)y-x\Big)x - \Big((x^2+y^2−1)x+y\Big)y}{r^2}\\&= \frac{-(x^2+y^2)}{r^2}\\&= \frac{-r^2}{r^2}\\&= -1 \end{align}