Subject GRE Exam 0568 Q.51 The question and its answer is given in the following pictures:



The first line in the solution is not clear for me, my questions are:
1- where is the interval from 0 to 1 ?
2- why we changed the x inside the floor function to n and did not change the x in the power of e ?
Could anyone illustrate this for me please? 
 A: For your first question: The first summand $\int_0^1 \lfloor x \rfloor e^{-x}$ gives 0, because $\lfloor x \rfloor = 0$ for all $x\in [0,1)$. That's why the whole integral vanishes.
For your second question: In the interval $[n,n+1)$ the function $\lfloor x \rfloor e^{-x} = n e^{-x}$, that's why only the $x$ that is 'floored' changed to $n$.
A: The solution is too complicated according to me.
A way to simplify,
$\begin{align} J&=\sum_{n=1}^{\infty} \int_n^{n+1} ne^{-x}\\
&=\sum_{n=1}^{\infty} \Big[-ne^{-x}\Big]_n^{n+1}\\
&=\sum_{n=1}^{\infty}n\left(e^{-n}-e^{-(n+1)}\right)\\
&=\sum_{n=1}^{\infty}ne^{-n}-\sum_{n=1}^{\infty}ne^{-(n+1)}\\
&=\sum_{n=1}^{\infty}ne^{-n}-\sum_{n=1}^{\infty}(n+1)e^{-(n+1)}+\sum_{n=1}^{\infty}e^{-(n+1)}\\
&=\sum_{n=1}^{\infty}ne^{-n}-\sum_{n=2}^{\infty}ne^{-n}+\sum_{n=1}^{\infty}e^{-(n+1)}\\
&=e^{-1}+\sum_{n=1}^{\infty}e^{-(n+1)}\\
&=\sum_{n=0}^{\infty}e^{-(n+1)}\\
&=\frac{1}{\text{e}}\sum_{n=0}^{\infty}\left(e^{-1}\right)^n\\
&=\dfrac{1}{\text{e}}\frac{1}{1-\dfrac{1}{\text{e}}}\\
&=\frac{1}{\text{e}-1}
\end{align}$
A: Our task here is nothing but calculating Laplace Transform of $\lfloor t\rfloor$ at $s=1$

$$\begin{align}F(s)&=\displaystyle\int_0^\infty \lfloor t \rfloor e^{-st}dt\\&=\displaystyle\int_0^1 \lfloor t \rfloor e^{-st}dt +\displaystyle\int_1^2 \lfloor t \rfloor e^{-st}dt +\displaystyle\int_2^3 \lfloor t \rfloor e^{-st}dt + \cdots\\&=\displaystyle\sum_{n=0}^\infty n\displaystyle\int_{n}^{n+1}  e^{-st}dt\\&=\dfrac{1}{s}\displaystyle\sum_{n=0}^\infty n \left[ e^{-sn}-e^{-s(n+1)} \right]\\&=\dfrac{1}{s}\left(1-e^{-s}\right)\displaystyle\sum_{n=0}^\infty n  e^{-sn}\\&=\dfrac{1}{s}\left(1-e^{-s}\right)\dfrac{e^{-s}}{\left(1-e^{-s}\right)^{2}}\\&=\dfrac{1}{s\left(e^s-1\right)}\\&=\dfrac{\coth\left(\dfrac{s}{2}\right)-1}{2s}\end{align}\tag*{}$$

Now just put $s=1$
Note that:
$$\displaystyle\sum_{n=0}^{\infty} e^{-n x} = \dfrac{1}{1-e^{-x}}$$
$$\displaystyle\sum_{n=0}^{\infty}n e^{-n x}=- \dfrac{d}{dx}\left(\dfrac{1}{1-e^{-x}}\right)$$
A: In answer to your first question, on that interval the integrand vanishes, so there is no contribution to the integral. In answer to your second question, on each of the length-$1$ intervals considered the floor factor is constant but $e^{-x}$ is not.
A: $$ \forall x \in [n, n+1[, \lfloor x \rfloor = n$$
and $$\int_0^1{\lfloor x \rfloor e^{-x}dx} = \int_0^1{0 e^{-x}dx} =0$$
