TITLE: Complex integral with zeta
QUESTION [10 upvotes]: this is a homework problem I am stuck on: Compute the following integral for $\sigma > 1$
$$\displaystyle \lim_{T \to \infty} \frac{1}{2T} \int_{-T}^{T}\left|\zeta{(\sigma + it)}\right|^2dt .$$
I tried integrating over the contour given by the semicircle of radius $T$ with diameter from $\sigma - it$ to $\sigma + it$ going "left" and applying the residue theorem, but it does not seem to be going anywhere. I suppose part of my confusion comes from not completely understanding the structure of the function $\left|\zeta{(\sigma + it)}\right|^2$. Am I right to say that this function is holomorphic everywhere except at 1, where it has a pole of order 2 and no simple pole (by squaring the laurent expansion of $\zeta$ at 1)? 
I'd rather not see a full solution immediately, but any hints in the right direction would be appreciated.

REPLY [3 votes]: Hint: Use the fact that  $\zeta(s)=\sum_{n=1}^{\infty}n^{-s}$ for $\sigma>1$.  Then since all the series converge absolutely, we may freely rearrange everything, and bring the integral inside a double series, leading to the result.

Warning! Spoiler/Solution Follows:

For $\sigma>1$, since $\zeta(s)=\sum_{n=1}^{\infty}n^{-s}$, we may write  $$\left|\zeta\left(\sigma+it\right)\right|^{2}=\zeta\left(\sigma+it\right)\overline{\zeta\left(\sigma+it\right)}=\sum_{n=1}^{\infty}\sum_{m=1}^{\infty}\left(mn\right)^{-\sigma}n^{-it}m^{it}.$$ Now, we bring the integral inside the sum and split into cases depending on whether or not $\frac{m}{n}=1$.  When $m\neq n$ then  $$\int_{-T}^{T}n^{-it}m^{it}dt=\int_{-T}^{T}\left(\frac{m}{n}\right)^{it}dt=\frac{i\left(\frac{m}{n}\right)^{-iT}-i\left(\frac{m}{n}\right)^{iT}}{\log\left(\frac{m}{n}\right)}.$$  It is then not hard to show that $$\sum_{n=1}^{\infty}\sum_{m\neq n}\left(mn\right)^{-\sigma}\frac{i\left(\frac{m}{n}\right)^{-iT}-i\left(\frac{m}{n}\right)^{iT}}{\log\left(\frac{m}{n}\right)}$$ is bounded in absolute value for a fixed $\sigma>1$, and hence factor of $\frac{1}{2T}$  them implies that the off diagonal elements contribute $0$  in the limit.  When $n=m$ , the integral is exactly $2T$ , so we conclude that $$\lim_{T\rightarrow \infty} \frac{1}{2T}\int_{-T}^{T}\left|\zeta\left(\sigma+it\right)\right|^{2}dt=\sum_{n=m}\left(mn\right)^{-\sigma}=\sum_{n=1}^\infty (n^2)^{-\sigma}=\zeta(2\sigma).$$ 
Edit: Corrected last line.