Evaluate the integral $\int_0^{\infty} \lfloor x \rfloor e^{-x}\mathrm dx$

I’d like some help with the following integral:

$$\int_0^\infty \lfloor x \rfloor e^{-x}\mathrm dx .$$

Thanks.

Solutions Collecting From Web of "Evaluate the integral $\int_0^{\infty} \lfloor x \rfloor e^{-x}\mathrm dx$"

This reduces to a series $\displaystyle \sum_{n=0}^{\infty} \int_n^{n+1}\!\! n e^{-x}\;dx$. The integrals are easy to evaluate and so is the series.

$$\begin{align}\int_0^{\infty} dx \, \lfloor x \rfloor \, e^{-x} &= \sum_{k=0}^{\infty} k \int_k^{k+1} dx \, e^{-x} \\ &= \sum_{k=0}^{\infty} k \, \left (e^{-k}-e^{-(k+1)} \right ) \\ &= \left ( 1-e^{-1} \right )\sum_{k=0}^{\infty} k \, e^{-k} \\ &= \left ( 1-e^{-1} \right ) \frac{e^{-1}}{(1-e^{-1})^2} \\ &= \frac1{e-1} \end{align}$$

No need for any explicit summing. (Note that we have $\lfloor x+n \rfloor = \lfloor x \rfloor +n$ for any integer $n$.)

Let $I = \int_0^\infty \lfloor x \rfloor e^{-x} dx $. Letting $t=x+1$, we obtain
$I = \int_1^\infty (\lfloor t \rfloor -1)e e^{-t} dt = e\int_1^\infty \lfloor t \rfloor e^{-t} dt – e \int_1^\infty e^{-t} dt = e (I-e^{-1})$.

Solving gives
$I={1 \over e-1}$.