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