Solution:
Concept: After dividing by x, the equation involves only dxdy and xy, so it is homogeneous. We put y=vx; then dxdy=v+xdxdv, and the equation separates in v and x.
Step 1 — Divide by x.
Since x=0, we can divide every term by x.
cos(xy)dxdy=xycos(xy)+1
Step 2 — Substitute y=vx.
We replace xy by v and dxdy by v+xdxdv.
cosv(v+xdxdv)=vcosv+1
The terms vcosv cancel on both sides.
xcosvdxdv=1
Step 3 — Separate and integrate.
We multiply by xdx and integrate both sides, adding one arbitrary constant c.
cosvdv=xdx
sinv=log∣x∣+c
Step 4 — Put back v=xy.
We replace v by xy.
sin(xy)=log∣x∣+c
Therefore, the general solution is sin(xy)=log∣x∣+c, where c is an arbitrary constant.