Answer
$C=\sin xy+\cos x$
Work Step by Step
We are given:
$$(y\cos xy-\sin x)dx+x\cos xydy=0 (1)$$
Here,
$M(x,y)=\frac{\partial}{\partial y}(y\cos xy-\sin x)=\cos xy-xy \sin xy$
$N(x,y)=\frac{\partial}{\partial x}(x\cos xy)=\cos xy-xy \sin xy$
$M_y=\cos xy-xy \sin xy\;\;\;\;,\;\;\;\;N_x=\cos xy-xy \sin xy$
$M_y=N_x$
$\Rightarrow$ (1) is exact differential equation
Therefore there exists a potential function $\phi$ such that
$\frac{\partial\phi}{\partial x}=y\cos xy-\sin x$ ___(2)
Integrating (2) with respect to $x$ holding $y$ fixed
$\phi =\sin xy + \cos x+f(y)$ ___(3)
Where $f(y)$ is arbitrary function of $y$
Hence we get:
$\frac{\partial\phi}{\partial y}=x\cos xy+f'(y)=x\cos xy\rightarrow f'(y)=0$ (4)
Differentiate (4) with respect to $y$:
$f(y)=C$
$C$ is constant
The solution is:
$\phi(x,y)=\sin xy+\cos x+C$
and $\phi(x,y)=0$
so:
$C=\sin xy+\cos x$