I want to compute the value of the integral $$\int_1^{\infty} \lfloor x^2 \rfloor e^{-x} \ \mathrm d x $$
where $\lfloor \ \rfloor$ denotes the floor function.
My try: I split into a series: since $\lfloor x^2 \rfloor = n$ is equivalent to $\sqrt{n} \le x < \sqrt{n+1}$, I get $$\int_1^{\infty} \lfloor x^2 \rfloor e^{-x} \ \mathrm d x = \sum_{n=1}^{\infty} n \int_{\sqrt{n}}^{\sqrt{n+1}} e^{-x} \ \mathrm d x = \sum_{n=1}^{\infty} n (e^{-\sqrt{n}}-e^{-\sqrt{n+1}})$$
Now I write down the first few terms of the series and write it in another way: $$\sum_{n=1}^{\infty} n (e^{-\sqrt{n}}-e^{-\sqrt{n+1}}) = 1 e^{-\sqrt{1}} - 1 e^{-\sqrt{2}} +2 e^{-\sqrt{2}} - 2 e^{-\sqrt{3}} + 3 e^{-\sqrt{3}} - 3 e^{-\sqrt{4}} + \cdots$$ and note that terms cancel. Thus the series is equal to te following limit: $$\lim_{n \to \infty} ( e^{-\sqrt{1}} + e^{-\sqrt{2}} + e^{-\sqrt{3}} + \cdots +e^{-\sqrt{n}}) - n e^{-\sqrt{n+1}}$$
And here I get stuck. Maybe I should use some integration by parts, but as $\lfloor x^2 \rfloor$ is discountinuous I don't know if I'm allowed to use it.