Applications of Switching Sums and Integrals
Solution 1:
The standard integral representation of the Riemann zeta function,
$$ \zeta(s+1)=\frac1{\Gamma(s+1)}\int_0^\infty\frac{x^s}{e^x-1}\:dx, \qquad s>0, \tag1 $$
is obtained this way, using a uniform convergence, one has $$ \begin{align} \int_0^\infty\frac{x^s}{e^x-1}\:dx&=\int_0^\infty x^s \cdot \frac{e^{-x}}{1-e^{-x}}\:dx \\\\&=\int_0^\infty x^s\cdot\sum_{n=0}^\infty e^{-(n+1)x}\:dx \\\\&=\sum_{n=0}^\infty\int_0^\infty x^s e^{-(n+1)x}\:dx \\\\&=\sum_{n=0}^\infty\frac1{(n+1)^{s+1}}\int_0^\infty u^s e^{-u}\:du \\\\&=\sum_{n=1}^\infty\frac1{n^{s+1}}\cdot\Gamma(s+1) \\\\&=\Gamma(s+1)\cdot \zeta(s+1). \end{align} $$ This integral representation yields many consequences concerning the Riemann zeta function, one of them being the functional equation $$ \zeta(s) = 2^s\pi^{s-1}\ \sin\left(\frac{\pi s}{2}\right)\ \Gamma(1-s)\ \zeta(1-s), \qquad s \in \mathbb{C}, \,s \neq 1. \tag2 $$
Solution 2:
Another example is \begin{align*} \int_{0}^1\frac{dx}{x^x}=\sum_{n=1}^\infty \frac{1}{n^n} \end{align*}
We obtain \begin{align*} \int_{0}^1\frac{dx}{x^x}&=\int_{0}^1e^{-x\log x}dx\\ &=\int_{0}^1\sum_{n=0}^\infty\frac{(-x \log x)^n}{n!}dx\tag{1}\\ &=\sum_{n=0}^\infty\int_{0}^1\frac{(-x \log x)^n}{n!}dx\tag{2}\\ &=\sum_{n=0}^\infty\frac{(-1)^n}{n!}\cdot\frac{(-1)^n n!}{(n+1)^{n+1}}\tag{3}\\ &=\sum_{n=1}^\infty \frac{1}{n^n} \end{align*} and the claim follows.
Comment:
In (1) we use the power series representation for $e^x$
In (2) we use the fact that we integrate power series term by term
In (3) we use the following identity for $k\geq 0, j>0$ \begin{align*} \int_{0}^1x^j(\log x)^k\,dx=\frac{(-1)^k k!}{(j+1)^{k+1}} \end{align*} This can be shown for $j>0$ by induction on $k$. For $k=0$ it can be seen quite easily and for the inductive step, we use integration by parts \begin{align*} \int_{0}^1x^j(\log x)^k\,dx&=\frac{1}{j+1}\left.x^j(\log x)^k\right|_0^{1}-\frac{k}{j+1}\int_{0}^1x^j(\log x)^k\,dx\\ &=-\frac{k}{j+1}\int_{0}^1x^j(\log x)^k\,dx\tag{4}\\ &=\frac{-k}{j+1}\cdot\frac{(-1)^{k-1}(k-1)!}{(j+1)^k}\tag{5}\\ &=\frac{(-1)^k k!}{(j+1)^{k+1}} \end{align*}
In (4) we use $ \lim_{x\rightarrow 0^+}x^j(\log x)^k=0 $ for $j>0$ and $k\geq 0$.
In (5) we apply the inductive hypothesis
Hint: This example is stated as Gem 30 in Real Infinite Series by D.D. Bonar and M.J. Khoury. See also this related answer.