Solve the differential equation: $(x^2-y^2)dx+2xydy=0$. Given $(x^2-y^2)dx+2xydy=0$
My solution-
Divide the differential equation by $dx$
$\Rightarrow x^2-y^2+2xy\frac{dy}{dx}=0$
$\Rightarrow 2xy\frac{dy}{dx}=y^2-x^2$
Divide both sides by $2xy$
$\Rightarrow \frac{dy}{dx}=\frac{1}{2}[\frac{y}{x}-\frac{x}{y}]$
This is a homogenous differential equation. Substitute $y=vx$
$\Rightarrow \frac{dy}{dx}=v+x\frac{dv}{dx}$
$\Rightarrow v+x\frac{dv}{dx}=\frac{1}{2}[v-\frac{1}{v}]$
$\Rightarrow x\frac{dv}{dx}=-\frac{v^2+1}{2v}$
$\Rightarrow -\frac{2v}{v^2+1}dv=\frac{dx}{x}$
Integrating both sides
$\Rightarrow -\log|v^2+1|=\log x+\log c$
$\Rightarrow -\log|\frac{y^2}{x^2}+1|=\log xc$
$\Rightarrow -\log|\frac{x^2+y^2}{x^2}|=\log xc$
$\Rightarrow \frac{x^2}{x^2+y^2}= xc$
$\Rightarrow x= c(x^2+y^2)$
$\Rightarrow y=\pm \sqrt{xc-x^2}$
Kindly review my solution and let me know if there are other methods of solving such problems.

Another approach let's call $u=x^2+y^2$.
Then $xu'=2x^2+2xyy'=2x^2+(y^2-x^2)=x^2+y^2=u$
Which solves to $u=cx\iff x^2+y^2=cx$
