#### Answer

The differential equation :
$$
y d x+\left(2 x-y e^{y}\right) d y=0
$$
is not exact but becomes exact when multiplied by the given integrating factor $\mu(x, y)=y $ and its solutions are given implicitly by
$$
xy^{2} -e^{y}\left( y^{2} -2 y+2 \right)=c
$$
where $ c $ is an arbitrary constant

#### Work Step by Step

$$
y d x+\left(2 x-y e^{y}\right) d y=0, \quad \mu(x, y)=y
\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) &= y
\\ N(x,y) &=2 x-y e^{y} \end{aligned}
$$
By calculating $M_{y}$ and $N_{x}$ , we find that
$$
\begin{aligned} M_{y}(x, y) &= 1
\\ N_{x}(x, y) & =2 \end{aligned}
$$
we obtain that
$$
M_{y}(x, y) \neq N_{x}(x, y)
$$
so the given equation is not exact.
Multiplying Eq. (i) by this integrating factor $\mu(x, y)=y $, we obtain
$$
y^{2} d x+\left(2y x-y^{2} e^{y}\right) d y=0, \quad \quad (ii)
$$
The latter equation is exact, since
$$
M_{y}(x, y)=2y=N_{x}(x, y)
$$
the equation (ii) is exact. Thus there is a $\psi (x, y)$ such that
$$
\begin{aligned} \psi_{x}(x, y) &=M(x,y) =y^{2} ,
\\ \psi_{y}(x, y) &=N(x,y) =\left(2y x-y^{2} e^{y}\right) \end{aligned} \quad \quad (iii)
$$
Integrating the first of these equations with respect to $x$ , we obtain
$$
\begin{split}
\psi(x, y) & = \int { y^{2} } dx \\
& = xy^{2} +h(y) \quad \quad (*)
\end{split}
$$
where $h(y)$ is an arbitrary function of $y$ only. To try to satisfy the second of Eqs. (iii), we compute $\psi_{y}(x, y) $ from Eq. (*) and set it equal to $N$, obtaining
$$
\psi_{y}(x, y)= 2xy+h^{\prime}(y)= \left(2y x-y^{2} e^{y}\right)
$$
Thus $h^{\prime}(y) =-y^{2} e^{y} $ Integrating this Equation by parts gives
$$
h(y)=- \int y^{2} e^{y} d y=-y^{2} e^{y}+2\left(e^{y} y-e^{y}\right)
$$
The constant of integration can be omitted since any solution of the preceding differential equation is satisfactory.
Now substituting for $h(y)$ in Eq. (*) gives
$$
\psi(x, y)= xy^{2} -e^{y}\left( y^{2} -2 y+2 \right)
$$
Hence solutions of Eq. (i) are given implicitly by
$$
\psi(x, y) = xy^{2} -e^{y}\left( y^{2} -2 y+2 \right)=c
$$
where $ c $ is an arbitrary constant