The given differential equation is
(x2+xy)dy=(x2+y2)dx(i)
This differential equation is homogeneous since the degree of each coefficient of dx and dy is the same throughout (degree =2).
Rewriting the Equation
From (i),
dxdy=x2+xyx2+y2
=x2(1+xy)x2(1+x2y2)
⇒dxdy=1+xy1+(xy)2=F(xy)(ii)
Hence, the given differential equation is homogeneous.
Substitution
Put
xy=v⇒y=vx
⇒dxdy=v+xdxdv
Substituting these values in (ii),
v+xdxdv=1+v1+v2
Simplification
Transposing v to the right-hand side,
xdxdv=1+v1+v2−v
=1+v1+v2−v−v2
=1+v1−v
Separating Variables
xdxdv=1+v1−v
⇒1−v1+vdv=xdx
Integrating both sides
∫1−v1+vdv=∫x1dx
⇒∫1−v2−(1−v)dv=logx+c
⇒∫(1−v2−1)dv=logx+c
⇒−2log(1−v)−v=logx+c
Substituting v=xy
−2log(1−xy)−xy=logx+c
Dividing by −1,
2log(xx−y)+xy=−logx−c
⇒log(x2(x−y)2)+logx=−xy−c
⇒log(x(x−y)2)=−xy−c
Final Form
x(x−y)2=e−xye−c
Let C=e−c,
(x−y)2=Cxe−xy