Polar Coordinates tranformation for Linear Homogeneous Differential Equations (1st order) While studying a book of Differential Equations I found this problem so interesting. 
Suppose 
\begin{equation} 
M(x,y)dx+N(x,y)dy=0          \tag 1
\end{equation} 
is  a homogeneous ODE. Show that the transformation $x=r \cos (\theta) $ and $y= r \sin (\theta) $ reduces the equation to a separable  equation in the variables $r$ and $\theta$ 
Is from the book Diff. Eq's, Shepley L.  Ross. 
So starting from the hypothesis that the equation is homogenous then $(1)$ is equivalent to 
\begin{equation} 
\frac{dy}{dx}=g\left(\frac{y}{x}\right)          \tag 2
\end{equation} 

So the thing is thatI don't know how to relate $x$ and $y$ , or more precisely how to find the relation $\dfrac{dr}{d\theta}$ (or maybe the other way around)

The first thing that came to  mind was $r^2=x^2+y^2$ but how do I differentiate it ? I mean, I don´t see clearly how to use the chain rule  
I have seen this $2rr'=2xx'+2yy'$. Although, still not clear how did they do it.  
Later, a silly approach (I think so)  was to take the differentials of either $x$ and $y$ with respect to $r$ and $\theta$, respectively. Therefore: 
$$x=r \cos (\theta) \Rightarrow dx=\cos (\theta) dr  $$ and 
$$y= r \sin (\theta) \Rightarrow dy= r \cos (\theta) d\theta .$$ 
Later 
$$\frac{dy}{dx}=\frac{r \cos (\theta) d\theta} { \cos (\theta) dr} = \frac{r d\theta} {dr}$$
So after substituting in $(2)$ 
\begin{equation} 
\frac{r d\theta} {dr}=g\left(\frac{\sin \theta }{ \cos \theta }\right)  
\end{equation}
which reduces it to a separable equation
\begin{equation} 
\frac{dr } {r }=\frac{d\theta} { g(\tan \theta )}   
\end{equation}
But.... come on!
At least I tried... 
Later the book  has also as an exercise to prove that the same equations is invariant under the tranformations $x=k\alpha$ and $y=k\beta$ with $k$ constant. But I think that the previous one seems more approachable. 
Could someone help me with this kind of problems? Thanks. :)

This is what I've got: 
Given this fancy thing (At least I think so..) 
$$ \frac{dy}{dx}=\frac{dy}{d\theta} \times \frac{d\theta}{d x} = \frac{ \frac{dy}{d\theta} } { \frac{dx}{d\theta}} $$
So  $x=r\cos(\theta)$ and  $y=r \sin(\theta)$ ,yield: 
$$\frac{dx}{d\theta}= \cos (\theta) \frac{dr}{d\theta}-r \sin(\theta)$$ and $$\frac{dy}{d\theta}= \sin (\theta) \frac{dr}{d\theta}+r \cos(\theta)$$
Therefore: 
$$ \frac{dy}{dx}=\frac{  \sin (\theta) \frac{dr}{d\theta}+r \cos(\theta) } { \cos(\theta) \frac{dr}{d\theta}-r \sin(\theta)} $$ (*)
Knowing that (1) is equivalent to 
$$ \frac{dy}{dx} = g(\frac{y}{x}) $$ , thus plugging  (*)... 
$$\frac{  \sin (\theta) \frac{dr}{d\theta}+r \cos(\theta) } { \cos (\theta) \frac{dr}{d\theta}-r \sin(\theta)} = g(\frac{y}{x}) $$
Doing a little of algebra, (Hopefully I did it right, tho)...
$$ \frac{dr}{r} = \frac{  \sin (\theta)+  \cos(\theta) } {  \sin(\theta) - \cos (\theta) }  \frac{d\theta}{g( \tan \theta )}  $$
What do you think? :s
