Find the solution of the differential equation $\frac{xdy-ydx}{x^2+y^2}=0.$
I though this was quite an obvious differential equation. Hence, I proceeded to solve like this:
Given, $\frac{xdy-ydx}{x^2+y^2}=0.$ We can write this as, $$\frac{xdy}{x^2+y^2}=\frac{ydx}{x^2+y^2}\implies xdy=ydx\implies \frac{dy}{y}=\frac{dx}{x}.$$ On integrating, we have, $$\log x=\log y+c\implies \log(\frac xy)=c\implies \frac xy=e^c\implies x=ye^c.$$ So, the solution of this differential equation is $x=ye^c.$
However, to my surprise, the answer given is $\arctan (\frac yx)=c.$ Is there some mistake in my approach? I am confused about where I went wrong.
Or using polar coordinates $$ x= \cos \theta,~y=\sin \theta,~dx =-\sin \theta ~d\theta,~dy=\cos \theta ~d\theta~$$ Plugging into the given fraction and simplifying $$ d\theta=0 \to\theta= c=\tan^{-1} \frac {y}{x} $$ The constant $c$ is arbitrary, can be converted to any other desired function of $c$.