Applications of Switching Sums and Integrals

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 $$


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.


First example

For $|a|<1$

$$\int^{2\pi}_0 \frac{1- a \cos(x)}{1+a^2-2a \cos(x)}dx = \sum_{k=0}^{\infty} a^{k} \int^{2\pi}_0 \cos(kx)\,dx = 2\pi $$

Where we used that

$$\sum_{k=0}^{\infty} a^{k} \cos(kx) = \frac{1- a \cos x}{1-2a \cos x + a^{2}} , \ \ |a|<1$$

Second example

$$ \int_{0}^{\infty}\frac{e^{-t}\cosh(a\sqrt{t})}{\sqrt{t}}dt$$

We know that we can expand $\cosh$ using power series

$$\cosh(a\sqrt{t}) = \sum_{n=0}^{\infty}\frac{a^{2n}\cdot t^n}{(2n)!}$$

Substituting back in the integral we have

$$\int_{0}^{\infty}e^{-t}\sum_{n=0}^{\infty}\frac{a^{2n}\cdot t^n}{(2n)!\, \sqrt{t}}dt$$

Now since the series is always positive we can swap the integral and the series

$$\sum_{n=0}^{\infty}\frac{a^{2n}}{(2n)!}\left[ \int_{0}^{\infty}e^{-t} t^{n-\frac{1}{2}}dt\right] $$

Hence we have by using the gamma function

$$\sum^{\infty}_{n=0} \frac{a^{2n}\,\Gamma\left(\frac{1}{2}+n\right)}{(2n!)}$$

Using LDF (Legendre Duplication Formula) we get

$$\sum^{\infty}_{n=0}\frac{a^{2n}}{(2n!)}\left({(2n)! \over 4^n n!} \sqrt{\pi}\right)$$

By further simplification

$$\sqrt{\pi}\,\sum^{\infty}_{n=0} \frac{a^{2n} }{4^n\,n!}$$

Using the expansion of the exponential we get

$$\int_{0}^{\infty}\frac{e^{-t}\cosh(a\sqrt{t})}{\sqrt{t}}dt\,=\,\sqrt{\pi}e^{{a^2 \over 4}}$$