How to calculate this integral involving an exponential? I would like to calculate the integral $$\int_{0}^{\infty} xe^{-x(y+1)}dy.$$ I think I get the first steps correct. First $$\int_{0}^{\infty} xe^{-x(y+1)}dy = x\int_{0}^{\infty} e^{-x(y+1)}dy.$$ I then select $u = -x(y+1)$ so $du = -xdy$ and $dy = \frac{du}{-x}$. Therefore $$x\int_{0}^{\infty} e^{-x(y+1)}dy = x\int_{0}^{\infty} \frac{e^{u}du}{-x} = -\int_{0}^{\infty} e^{u}du.$$ I don't get how to solve it from here. I tried $$-\int_{0}^{\infty} e^{u}du = -(e^{\infty} - e^{0}) = -(0 - 1) = -1$$ but my textbook says it should be $e^{-x}$. I guess it is the back-substitution step I don't understand. How to do this?
 A: You have forgotten about the bounds of the integral. When you are substituting, bounds may change. When operating on bounds like $\pm\infty$, try to find antiderivative first. It is true that
$$I=\int x e^{-x(y+1)}\,dy=-\int e^u\,du=-e^u+C$$
where $u=-x(y+1)$, thus
$$I=-e^{-x(y+1)}$$
and for $x>0$:
$$\int_0^\infty x e^{-x(y+1)}\,dy=\left[-e^{-x(y+1)}+C\right]_0^\infty=0-(-e^{-x})=e^{-x}$$
A: As 'x' is a constant here, you can take it out of the integration, basically you just have to integrate $e^{-x(y+1)}$ w.r.t y. so, the answer (using required u substitutions should be -$e^{-x(1+y)}$,(The 'x' that we had taken out got cancelled) plugging in the limits, we get the answer as $e^{-x}$. 
A: $$\int_{0}^{\infty} xe^{-x(y+1)}dy = 
xe^{-x}\int_{0}^{\infty} e^{-xy}dy=
\lim_{t\to\infty}xe^{-x}\frac{e^{-xy}}{-x}\Bigg|_{y=0}^t=
e^{-x}\lim_{t\to\infty}e^{-xy}\Bigg|_0^t=\quad
e^{-x}\lim_{t\to\infty}(e^{-xt}-1)=
\begin{cases}
e^{-x}&x>0\\
0&x=0\\
\infty&x<0
\end{cases}
$$
A: 1) The indefinite integral:
$$\int xe^{-x(y+1)}\space\space\text{d}y=$$
$$x\int e^{-x(y+1)}\space\space\text{d}y=$$
$$x\int e^{x(-y)-x}\space\space\text{d}y=$$

Substitute $u=x(-y)-x$ and $\text{d}u=-x\space\space\text{d}y$:

$$-\int e^{u}\space\space\text{d}u=$$
$$-e^u+\text{C}=$$
$$-e^{-x(y+1)}+\text{C}$$

2) Setting the boundaries


*

*Infinity:


$$\lim_{y\to\infty}\left(-e^{-x(y+1)}\right)=0,x>0$$


*

*Zero:


$$\lim_{y\to 0}\left(-e^{-x(y+1)}\right)=-e^{(1+0)(-x)}=-e^{-x}$$

So your final answer gives us:
$$\int_{0}^{\infty}xe^{-x(y+1)}\space\space\text{d}y=e^{-x}\space\space,\Re(x)>0$$
