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