Find the solution for this differential equation Solve the differential equation;
$(xdx+ydy)=x(xdy-ydx)$
L.H.S. can be written as $\frac{d(x^2+y^2)}{2}$ but what should be done for R.H.S.?
 A: In polar coordinate $(r,\theta)$, $xdx + ydy = rdr$ and $xdy- ydx = r^2d\theta$.
The equation at hand becomes
$$rdr = r^3\cos\theta d\theta
\iff \frac{1}{r^2} dr = \cos\theta d\theta
\iff d\left(\frac{1}{r} + \sin\theta\right) = 0\\
\iff \frac{1+y}{r} = K
\iff (1+y)^2 = K^2(x^2+y^2)
$$
for some constant $K$.
A: Let $x^2=z+y$.  The equation $(xdx+ydy)=x(xdy-ydx)$ becomes
$$(dz+dy)+2ydy=2(z+y)dy-y(dz+dy)\\
(1+y)dz=(2z-y-1)dy\\
y=w-1\\
wdz=(2z-w)dw\\
\frac{dz}{w^2}-\frac{2zdw}{w^3}=-\frac{dw}{w^2}\\
\frac{z}{w^2}-\frac1w=const$$
A: As much as I can see, there is no standard solution. 
From Wolfram Alpha, I have obtained a very complicated solution. You can check the link, if you wish.




A: I think that there is actually a general solution to a  general kind of ODE. So I give here its general form  and its solution. After that, the solution to the ODE in the thread above is also given.
 Consider the following ODE
\begin{gather*}
 A(x,y)(xd x+yd y)=B(x,y)(xd y-yd x)\tag{1}
\end{gather*}
where $A$ and $B$ are homogeneous functions of degree $\alpha$ and $\beta$ respectively, that is to say, for all $t>0,$ we have 
\begin{gather*}
 A(tx,ty)=t^{\alpha}A(x,y),\\
 B(tx,ty)=t^{\beta}B(x,y).
\end{gather*} 
We claim that for $x>0,$  ODE (1) can be transformed into a separable ODE, by a suitable change of variables. For the case of $x<0,$ similar argument works. 
Since (a) can be manipulated as
\begin{align*}
&A(x,y)(xd x+yd y)=B(x,y)(xd y-yd x) \\
\iff & 2A(x,y)(xd x+yd y)=2B(x,y)(xd y-yd x) \\
\iff & A(x,y)d (x^2+y^2)=2B(x,y)x^2d \left(\frac{y}{x}\right),\tag{2}
\end{align*}
introduce the change of variables
\begin{align*}
x^2+y^2=&u, \\
 \frac{y}{x}=&v, 
\end{align*}
and then
\begin{gather*}
 1+v^2=1+\frac{y^2}{x^2}=\frac{x^2+y^2}{x^2}=\frac{u}{x^2},
\end{gather*}
which leads to, in the case of $x>0,$ 
\begin{gather*}
 x=\sqrt{\frac{u}{1+v^2}},\tag{3}\\
 y=xv=v\sqrt{\frac{u}{1+v^2}}. \tag{4}
\end{gather*}
By homogeneity condition  and (4) we have 
\begin{gather*}
 A(x,y)=A(x,xv)=x^{\alpha}A(1,v),\\
 B(x,y)=B(x,xv)=x^{\beta}B(1,v).
\end{gather*}
Thus (2) turns out to be
\begin{align*}
 &\quad x^{\alpha} A(1,v)d u=2x^{\beta+2}B(1,v)d v \\
 &\iff x^{\alpha-\beta-2}A(1,v)d u=2B(1,v)d v\\
 &\iff\frac{u^{\frac{\alpha-\beta}{2}-1}}{(1+v^2)^{\frac{\alpha-\beta}{2}-1}} A(1,v)d u=2B(1,v)d v\qquad \text{(by (3))}\\
 &\iff u^{\frac{\alpha-\beta}{2}-1}d u=\frac{2B(1,v)(1+v^2)^{\frac{\alpha-\beta}{2}-1}}{A(1,v)}d v.\tag{5}
\end{align*}
It is apparent that (5) is separable.
Now consider the particular case
\begin{gather*}
 x d x+yd y=x(xd y-yd x).\tag{6}
\end{gather*}
This corresponds to  $A(x,y)=1, B(x,y)=x,$ and so the degrees of $\alpha=0, \beta=1.$  Thus, under the change of variables (3) and (4) we arrive at 
\begin{gather*}
 u^{-3/2}d u=2(1+v^2)^{-3/2}d v,
\end{gather*}
whose solution is 
\begin{gather*}
 \frac{1}{\sqrt{u}}+\frac{v}{\sqrt{1+v^2}}=C.
\end{gather*}
Revering to original variables, we have the solution to (6) is, in the case of $x>0,$
\begin{gather*}
 \frac{1+y}{\sqrt{x^2+y^2}}=C.
\end{gather*}
