Answer
An integrating factor is $ \mu (y)= \sin y $
The differential equation
$$
e^{x} d x+\left(e^{x} \cot y+2 y \csc y\right) d y=0
$$
is not exact but becomes exact when multiplied by the integrating factor $ \mu (y)= \sin y $ and its solutions are given implicitly by
$$
e^{x} \sin y +y^{2}=c
$$
where $ c $ is an arbitrary constant
Work Step by Step
$$
e^{x} d x+\left(e^{x} \cot y+2 y \csc y\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) &=e^{x}
\\ N(x,y) &=\left(e^{x} \cot y+2 y \csc y\right) \end{aligned}
$$
By calculating $M_{y}$ and $N_{x}$ , we find that
$$
\begin{aligned} M_{y}(x, y) &= 0
\\ N_{x}(x, y) & = e^{x} \cot y \end{aligned}
$$
we find that
$$
\frac{N_{x}(x, y)-M_{y}(x, y)}{M(x, y)}=\frac{e^{x} \cot y -0 }{ e^{x}}=\cot y .
$$
Thus there is an integrating factor $μ $ that is a function of $y$ only, and it satisfies the differential equation
$$
\frac{d \mu}{d y}= \mu \cot y .
$$
Hence
$$
\frac{d \mu}{ \mu}= \cot y dy
$$
Integrating, we obtain
$$
\ln \mu= \ln \sin y
$$
take the exponentiation we have
$$
\mu (y)= \sin y
$$
Multiplying Eq. (i) by this integrating factor, we obtain
$$
e^{x} \sin y d x+ \left(e^{x} \cos y+2 y \right) d y=0
$$
The latter equation is exact, since
$$
M_{y}(x, y)=e^{x} \cos y =N_{x}(x, y).
$$
Thus there is a $\psi (x, y)$ such that
$$
\begin{aligned} \psi_{x}(x, y) &=M(x,y) =e^{x} \sin y
\\
\psi_{y}(x, y) &=N(x,y) =\left(e^{x} \cos y+2 y \right)
\end{aligned} \quad \quad (ii)
$$
Integrating the first of these equations with respect to $x$ , we obtain
$$
\begin{split}
\psi(x, y) & =\int { e^{x} \sin y } dx \\
& = e^{x} \sin y +h(y)
\quad \quad \quad\quad\quad (iii)
\end{split}
$$
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 +h^{\prime}(y)= \left(e^{x} \cos y+2 y \right)
$$
Thus $h^{\prime}(y)=2 y $ and $h(y)=y^{2} $ , 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 +y^{2}
$$
Hence solutions of Eq. (i) are given implicitly by
$$
\psi(x, y) = e^{x} \sin y +y^{2}=c
$$
where $ c $ is an arbitrary constant