## Calculus (3rd Edition)

$$y=e^{-x}+1+Ce^{e^{-x}}$$
Rewrite the equation as $$y'+e^{-x}y=e^{-2x}$$ This is a linear equation which has the integrating factor as follows $$\alpha(x)= e^{\int P(x)dx}=e^{\int e^{-x}dx}=e^{-e^{-x}} .$$ Now the general solution is \begin{align} y&=\alpha^{-1}(x)\left( \int\alpha(x) Q(x)dx +C\right)\\ &=e^{e^{-x}}\left( \int e^{-2x} e^{-e^{-x}} dx +C\right)\\ &=e^{e^{-x}} \left(e^{-x} e^{-e^{-x}} +e^{-e^{-x}} +C\right) .\end{align} Where we did integration by parts. Thus, the general solution is $$y=e^{e^{-x}} \left(e^{-x} e^{-e^{-x}} +e^{-e^{-x}} +C\right) .$$ We can simplify this as: $$y=e^{-x}+1+Ce^{e^{-x}}$$