The given differential equation is
x2dy+(xy+y2)dx=0
⇒dydx=−y(x+y)x2
which is homogeneous as each of the functions in the numerator and the denominator is a homogeneous function of degree 2.
Putting y=vx and dydx=v+xdvdx, the given equation becomes
v+xdvdx=−vx(x+vx)x2
xdvdx=−v(1+v)−v=−(2v+v2)=−v(v+2)
⇒dvv(v+2)=−1xdx
∴∫dvv(v+2)=−∫dxx
∫12(1v−1v+2)dv=−∫dxx
⇒12log|v|−12log|v+2|=−log|x|+logc
⇒log∣∣∣x√v√v+2∣∣∣=logc
⇒x√v√v+2=c⇒x√y√y+2=c (putting v=yx)
⇒ x2y=A(y+2x)......(i)
Where A=c2
when x=1 and y=1, equation (i) becomes
1=A(1+2)⇒ A=13
Putting the value of A in equation (i), we get
3x2y=(y+2x)