Consider
(x+y)dy+(x−y)dx=0
⇒dydx=−x−yx+y...(1)
It is a homogeneous function of degree 0.
Put y=vx
Differentiating with respect to x we get
dydx=xdvdx+v
Thus (1) becomes,
xdvdx+v=−x−vxx+vx
⇒xdvdx+v=−x(1−v)x(1+v)
⇒xdvdx+v=−1−v1+v
⇒xdvdx=v−11+v−v
⇒xdvdx=v−1−v−v21+v
⇒xdvdx=−(1+v2)1+v
⇒1+v1+v2dv=−dxx
Integrating both sides we get
⇒∫1+v1+v2dv=−∫dxx
⇒∫11+v2dv+∫v1+v2dv=−∫dxx
⇒tan−1(v)+∫v1+v2dv=−logx+logc
Put v2+1=t⇒2vdv=dt⇒vdv=dt2
∴tan−1(v)+∫12tdt=−logx+logc
⇒tan−1(v)+12logt=−logx+logc
Substitute back t=v2+1
⇒tan−1(v)+12log(v2+1)=−logx+logc
Substitute back v=yx
⇒tan−1(yx)+12log(y2x2+1)=−logx+logc
⇒tan−1(yx)+12log(y2+x2x2)=−logx+logc
⇒tan−1(yx)+log√(y2+x2x2)=−logx+logc
⇒tan−1(yx)+log(√y2+x2x)=−logx+logc
⇒tan−1(yx)+log(√x2+y2)−logx=−logx+logc
⇒tan−1(yx)+log(√x2+y2)=logc