Answer
The equation
$$
\left(y e^{x y} \cos 2 x-2 e^{x y} \sin 2 x+2 x\right) d x+\left(x e^{x y} \cos 2 x-3\right) d y=0
$$
is exact, and its solutions are
$$
e^{x y} \cos 2 x-3y +x^{2}=c
$$
where $ c $ is an arbitrary constant
Work Step by Step
$$
\left(y e^{x y} \cos 2 x-2 e^{x y} \sin 2 x+2 x\right) d x+\left(x e^{x y} \cos 2 x-3\right) d y=0
\quad \quad (i)
$$
Comparing this Equation with the differential form:
$$
M(x,y) d x+N(x,y) d y=0
$$
we observe that
$$
\begin{aligned}M(x,y) &=\left(y e^{x y} \cos 2 x-2 e^{x y} \sin 2 x+2 x\right)
\\ N(x,y) &=\left(x e^{x y} \cos 2 x-3\right) \end{aligned}
$$
By calculating $M_{y}$ and $N_{x}$ , we find that
$$
M_{y}(x, y)= e^{x y} [xy \cos 2 x+\cos 2 x -2x \sin 2 x]=N_{x}(x, y)
$$
so the given equation is exact. Thus there is a $\psi (x, y)$ such that
$$
\begin{aligned} \psi_{x}(x, y) &=M(x,y) =\left(y e^{x y} \cos 2 x-2 e^{x y} \sin 2 x+2 x\right) ,
\\ \psi_{y}(x, y) &=N(x,y) =\left(x e^{x y} \cos 2 x-3\right) \end{aligned} \quad \quad (ii)
$$
Integrating the second of these equations with respect to $y$ , we obtain
$$
\psi(x, y)=\left( e^{x y} \cos 2 x-3y\right) +g(x) \quad \quad (iii)
$$
where $g(x)$ is an arbitrary function of $x$ only. To try to satisfy the first of Eqs. (ii), we compute $\psi_{x}(x, y) $ from Eq. (iii) and set it equal to $M$, obtaining
$$
\psi_{x}(x, y)=y e^{x y} \cos 2 x-2 e^{x y} \sin 2 x+g^{\prime}(x)=y e^{x y} \cos 2 x-2 e^{x y} \sin 2 x+2 x
$$
Thus $g^{\prime}(x)=2x $ and $g(x)=x^{2} $ The constant of integration can be omitted since any solution of the preceding differential equation is satisfactory.
Now substituting for g(x) in Eq. (iii) gives
$$
\psi(x, y)= e^{x y} \cos 2 x-3y +x^{2}
$$
Hence solutions of Eq. (i) are given implicitly by
$$
\psi(x, y) = e^{x y} \cos 2 x-3y +x^{2}=c
$$
where $ c $ is an arbitrary constant