Evaluating $\sum_{n=0}^{\infty}ne^{1-n}$ using calculus

ceiling-and-floor-functionsexponential-sumintegrationsequences-and-series

I'm trying to evaluate the following integral which popped up in MIT Integration Bee 2015 which involves the floor function.

$$\int_{0}^{\infty}\left(xe^{1-x}-\lfloor x\rfloor e^{1-\lfloor x\rfloor}\right)\mathrm dx$$

My Attempt:

$$\begin{aligned}\mathrm I &=\int_{0}^{\infty}xe^{1-x}\mathrm dx-\sum_{n=0}^{\infty}\int_{n}^{n+1}ne^{1-n}\mathrm dx\\ &= e-\sum_{n=0}^{\infty}ne^{1-n}=e\biggl(1+\sum_{n=0}^{\infty}\left(e^{1-n}\right)'\biggr)\end{aligned}$$


I'm getting stuck at this step because I'm not able to figure out how to evaluate this sum. I know one way is to use differentiation to get an expression for the sum but I'm not sure how to proceed. A hint in the right direction would be appreciated. Thanks

Note: This is different from How can I evaluate $\sum_{0}^{\infty}(n+1)x^n$?
. This problem is about bringing the sum into the form from which differentiation would yield the result.

Best Answer

Thanks to motivation from @Gerry Myerson. I'm attempting to answer my own question. Let the integral in question be denoted by $\mathrm I$ .$$\begin{aligned}\mathrm I &=\int_{0}^{\infty}xe^{1-x}\mathrm dx-\sum_{n=0}^{\infty}\int_{n}^{n+1}ne^{1-n}\mathrm dx\\ &= e-\sum_{n=0}^{\infty}ne^{1-n}=e-\sum_{n=0}^{\infty}\left(e^{1-n}x^n\right)'\end{aligned}$$

For the sum, differentiating $\sum_{n=0}^{\infty}e^{1-n}x^n$ term-by-term is the way to go. $$e\sum_{n=0}^{\infty}\left(\dfrac{x}{e}\right)^n=\dfrac{e^2}{e-x}\implies \sum_{n=0}^{\infty}ne^{1-n}x^{n-1}=\dfrac{e^2}{(e-x)^2}$$

Plugging in $x=1$ and consequently the value of the infinite sum into the value of the expression for the integral yields: $$\mathrm I =e-\dfrac{e^2}{(e-1)^2}=\dfrac{e^3-3e^2+e}{e^2-2e+1}$$

Related Question