Assuming you are differentiating with respect to xx and assuming that this equation implicitly defines yy as a function of xx, you get, by using the Chain Rule and Product Rule,
dy/dx=cos(xy) * d/dx(x y)dydx=cos(xy)⋅ddx(xy)
=cos(xy)*(y+x*dy/dx)=ycos(xy)+xcos(xy) dy/dx=cos(xy)⋅(y+x⋅dydx)=ycos(xy)+xcos(xy)dydx
No rearrange this equation as dy/dx-xcos(xy) dy/dx = ycos(xy)dydx−xcos(xy)dydx=ycos(xy), factor out the dy/dxdydx on the left-hand side and then divide both sides by 1-xcos(xy)1−xcos(xy) to get
dy/dx=\frac{ycos(xy)}{1-xcos(xy)}dydx=ycos(xy)1−xcos(xy)
Since the original equation cannot be solved explicitly for yy as a function of xx, this is the best you can do.