Solve Differential Equation: $y' = \frac{\sqrt{x^2+y^2}-x}{y}$
This looks like a problem that would do well with a conversion to polar coordinates ($r^2 = x^2 + y^2$ and $x = r\cos(\theta)$ $y = r\sin(\theta)$). However, I am confused on how to change $y' = \frac{dy}{dx}$ to $\frac{dr}{d\theta}$, in order to do separation of variables. Could someone demonstrate a solution using this approach?
hint
Instead of looking for a cartesian solution of the form $ y=y(x) $, you want polar solution as $ r=r(\theta) $ with
$$x=r(\theta)\cos(\theta)\text{ and } y=r(\theta)\sin(\theta)$$
So, differentiation gives
$$dx=\Bigl(r'\cos(\theta)-r(\theta)\sin(\theta)\Bigr)d\theta$$
$$dy=\Bigl(r'\sin(\theta)+r(\theta)\cos(\theta)\Bigr)d\theta$$
thus, the equation becomes
$$\frac{dy}{dx}=\frac{r'\sin(\theta)+r\cos(\theta)}{r'\cos(\theta)-r\sin(\theta)}$$ $$=\frac{r-r\cos(\theta)}{r\sin(\theta)}$$ $$=\tan(\frac{\theta}{2})$$
which simplifies to
$$\frac{r'}{r}=-\frac{\cos(\frac{\theta}{2})}{\sin(\frac{\theta}{2})}$$
Yielding to the solution
$$\ln(\frac{r}{\lambda})=-2\ln(|\sin(\frac{\theta}{2})|)$$ and $$\boxed{r=\frac{2\lambda}{1-\cos(\theta)}}$$