Writing a system of ODEs in polar coordinates I have this system of equations:
$$\dot{x}=x-y-x(x^2+y^2)+\frac{xy}{\sqrt{x^2+y^2}} \\
\dot{y}=x+y-y(x^2+y^2)-\frac{x^2}{\sqrt{x^2+y^2}}$$
How can I get this in polar coordinates ? I know that $r^2=x^2+y^2$, but how can I find $\dot{r}$ or $\dot{\theta}$ ?

Setting
$$
x=r\cos\theta,\ y=r\sin\theta,
$$
we have
\begin{eqnarray}
\dot{r}\cos\theta-r\dot{\theta}\sin\theta&=&\dot{x}=r(\cos\theta-\sin\theta)-r^3\cos\theta+r\cos\theta\sin\theta,\\
\dot{r}\sin\theta+r\dot{\theta}\cos\theta&=&\dot{y}=r(\cos\theta+\sin\theta)-r^3\sin\theta-r\cos^2\theta.
\end{eqnarray}
It follows that
$$
\dot{r}=r-r^3,\quad \dot{\theta}=1-\cos\theta.
$$
