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.
Your answer is correct. Here is another way to solve the DE: $$(x^2-y^2)dx+2xydy=0$$ Divide by $x^2dx$: $$1+\dfrac {2xyy'-y^2}{x^2}=0$$ $$1+\left (\dfrac {y^2}{x}\right)'=0$$ Integrate: $$x+\dfrac {y^2}{x}=C$$