Given the differential equation,
xcosyx(ydx+xdy)=ysinyx(xdy−ydx)⇒ydx+xdyxdy−ydx=ysinyxxcosyx
By componendo-dividendo,
xdyydx=ysinyx+xcosyxysinyx−xcosyx⇒xydydx=x(yxsinyx+cosyx)x(yxsinyx−cosyx)⇒dydx=yx⎧⎪
⎪⎨⎪
⎪⎩(yxsinyx+cosyx)(yxsinyx−cosyx)⎫⎪
⎪⎬⎪
⎪⎭
This shows that the given differential equation is homogeneous.
Now, substituting yx=v⇒y=vx⇒dydx=xdvdx+v
The differential equation becomes,
xdvdx+v=v{vsinv+cosvvsinv−cosv}⇒xdvdx=v{vsinv+cosvvsinv−cosv}−v⇒xdvdx=v{vsinv+cosvvsinv−cosv−1}⇒xdvdx=2vcosvvsinv−cosv⇒vsinv−cosv2vcosvdv=dxx
Integrating this separable variable type differential equation we get,
∫vsinv−cosv2vcosvdv=∫dxx+lnc⇒12∫{vsinvvcosv−cosvvcosv}dv=lnx+lnc⇒12∫(tanv−1v)dv=ln(cx)⇒lnsecv−lnv=2ln(cx)⇒ln(secvv)=ln(cx)2⇒v=secvc2x2⇒yx=secyxc2x2⇒y=secyxc2x⇒xycosyx=c−2
Hence, the required general solution is xycosyx=p,(p=c−2).