Conceptual passage in geometric series I have a question about a passage in solving an integral. The integral in question is rather known:
$$\int_0^{+\infty} \dfrac{x^{s-1}}{e^x-1} \text{d}x = \Gamma(s)\zeta(s)$$
Now, in solving the integral what one does is to collect $e^x$ and using the geometric series:
$$\int_0^{+\infty} \dfrac{x^{s-1}}{e^x(1-e^{-x}} \text{d}x \to \int_0^{+\infty} \dfrac{x^{s-1}}{e^x}\sum_{k = 0}^{+\infty} e^{-kx} \text{d}x$$
Where indeed we used the geometric series:
$$\dfrac{1}{1-e^{-x}} = \sum_{k = 0}^{+\infty} e^{-kx}$$
Now, the question which will surely be dumb but today I'm really messed up.
Why exactly can we use the geometric series without worries? I mean I know that we can becahse $|e^{-x}| < 1$ but the domain of the integral starts from $0$.
I would mind that this would give some problem, since $\dfrac{1}{1-e^{-x}}$ as $x = 0$ is problematic.
How can we rigirously justify that passage? Does it have something to do with the absolute convergence? I'm rust.
Thank you!
 A: It can be justified using two very well known theorems of measure theory: the monotone convergence theorem and the dominated convergence theorem.
First assume that $s>1$, then $f(x):=\frac{x^{s-1}}{e^x-1}>0$ for all $x>0$, and define $g_n(x):=\sum_{k=0}^n e^{-kx}$ and $f_n(x):=\frac{x^{s-1}}{e^x}g_n(x)$. Now the monotone convergence theorem says to us that if we have a sequence $\{h_n\}_{n\in\mathbb{N}}$ of non-negative measurable functions such that $h_n$ increases pointwise to a function $h$ then
$$
\lim_{n\to \infty }\int_{\mathbb{R}}h_n(x)\,d x=\int_{\mathbb{R}}h(x)\,d x\tag1
$$
Above the integrals are Lebesgue integrals respect to the Lebesgue measure. In your case, as $f_n\uparrow f$ pointwise  this means that
$$
\sum_{k\geqslant 0}\int_{(0,\infty )}\frac{x^{s-1}}{e^x}e^{-kx}\,d x=\int_{(0,\infty )}\frac{x^{s-1}}{e^x-1}\,d x\tag2
$$
Now, if $s\in \mathbb{C}$ and $\operatorname{Re}(s)>1$ we have that
$$
\left| \frac{x^{s-1}}{e^x}g_n(x) \right|\leqslant \left| \frac{x^{s-1}}{e^x-1} \right|\leqslant \frac{x^{\operatorname{Re}(s)-1}}{e^x-1}\tag3
$$
and so, as the LHS of (2) is finite when $s$ is real and bigger than one, we can apply the dominated convergence theorem to reach again (2) but this time for $s\in \mathbb{C}$ such that $\operatorname{Re}(s)>1$.
Finally, it can be proved, using the monotone convergence theorem, that when $f$ is a non-negative improperly Riemann integrable function we have that
$$
\int_{0}^{\infty }f(x)\,d x=\int_{(0,\infty )}f(x)\,d x\tag4
$$
where the LHS is an improper integral of Riemann and the RHS is a Lebesgue integral.
