According to the condition, dxdy=xy−cos2xy…(i)
This is a homogeneous differential equation
Substituting y=vx, we get v+xdxdv=v−cos2v ⇒xdxdv=−cos2v ⇒∫sec2vdv=−∫xdx ⇒tanv=−logx+C ⇒tanxy+logx=C
Substituting x=1,y=4π,
we get C=1. Thus, we get tan(xy)+logx=1
which is the required solution