Integrate $e^{y-2e^y}$ I would like to compute:
$$
\int_{0}^{\infty} e^{y-2e^y} dy
$$
I thought about using integration by parts but it didn't lead me anywhere. I also tried changing variables but it didn't work as well.
Any suggestion is appreciated :)
 A: Hint
Write $\displaystyle e^{y-2e^y}$ as $\dfrac{e^y}{e^{2e^y}}$ and let $u=e^y$. This leaves you with a nicer expression to integrate. Then it's just a matter of setting the limit for the upper bound of the integral as characteristic of improper integrals and evaluate the lower bound as the corresponding $u$ evaluated at $y=0$.
$$\int_{0}^{\infty} \dfrac{e^y}{e^{2e^y}}\mathrm dy=\lim_{b \to \infty}\int_{1}^{b} \dfrac{\mathrm du}{e^{2u}}$$
A: The integral itself is a u-substitution problem:
$$
\begin{align}
\int e^{y-2e^y} dy
&=\int e^ye^{-2e^y} dy\\
&=\int e^{-2e^y}\frac{d}{dy}\left(e^y\right)dy\\
&=\int e^{-2e^y}d\left(e^y\right) (u=e^y)\\
&=\int e^{-2u}du\\
&=-\frac{1}{2}\int e^{-2u}\frac{d}{du}\left(-2u\right)du\\
&=-\frac{1}{2}\int e^{-2u}d\left(-2u\right) (w=-2u)\\
&=-\frac{1}{2}\int e^wdw\\
&=-\frac{1}{2}e^w+C\\
&=-\frac{1}{2}e^{-2e^y}+C.
\end{align}
$$
And here's how you should do your improper integral:
$$
\begin{align}
\int_{0}^{\infty} e^{y-2e^y} dy
&=\lim_{b \to \infty}\int_{0}^{b} e^{y-2e^y} dy\\
&=\lim_{b \to \infty}\left(-\frac{1}{2}e^{-2e^y}\Big|_{0}^{b}\right)\\
&=\lim_{b \to \infty}\left(-\frac{1}{2}e^{-2e^b}+\frac{1}{2}e^{-2e^0}\right)\\
&=0+\frac{1}{2}e^{-2}\\
&=\frac{1}{2e^2}.
\end{align}
$$
A: Rewrite the integrand as $$e^ye^{-2e^y}=(e^y)'e^{-2e^y}$$ and by the chain rule the antiderivative must be
$$-\frac12e^{-2e^y}.$$
