TITLE: Fejér's Theorem (Problem in Rudin)
QUESTION [6 upvotes]: Can you solve Problem 19 from Chapter 8 of Rudin's Principles of Mathematical Analysis, I'm having a lot of difficulty with it 
I've proven the first part, namely 
$$\lim_{N\to\infty}\frac{1}{N}\sum_{n=1}^N \exp(ik(x+n\alpha))=\frac{1}{2\pi}\int_{-\pi}^\pi(\cdots) = \begin{cases} 1\text{ if }k=0\\0\text{ otherwise}\end{cases}$$
Now I want to prove that if $f$ is continuous in $\mathbb{R}$ and $f(x+2\pi)=f(x)$ for all $x$ then 
$$\lim_{N\to\infty} \sum_{n=1}^{N} \frac{1}{N} f(x+n\alpha)=\frac{1}{2\pi} \int\limits_{-\pi}^{\pi}f(t)\mathrm dt$$
for any $x$, where $\alpha/\pi$ is irrational.
I've tried writing it as
$$\lim_{N\to\infty}\frac{1}{N}\sum_{n=1}^N \sum_{k=0}^N\frac{1}{2\pi}\int_{-\pi}^\pi e^{ikt}f(x+n\alpha) $$
but that was not helpful.

REPLY [6 votes]: For the sake of completeness, here's a solution. First I'll prove the lemma that the asker already could do.
$$\lim_{N\to \infty}\frac{1}{N}\sum_{n=1}^N \exp(ik(x+n\alpha)) = \lim_{N\to \infty} \exp(ikx)\frac{1}{N}\sum_{n=1}^N \exp(ikn\alpha)$$
If $k=0$, the right hand side evaluates to $1\frac{1}{N}N = 1$.
If $k\neq 0$, the sum is geometric, so we know how to evaluate it.
$$ \exp(ikx)\lim_{N\to \infty}\frac{1}{N} \frac{\exp((N+1)ik\alpha)-1}{\exp(ik\alpha)-1} = \frac{\exp(ikx)}{\exp(ik\alpha)-1}\lim_{N\to\infty}\frac{1}{N}(\exp((N+1)ik\alpha) -1)$$
Because $\alpha$ is an irrational multiple of $\pi$, $k\alpha$ is never an integer multiple of $2\pi$, so the denominator is nonzero. $\exp((N+1)ik\alpha)-1$ is bounded, so the limit evaluates to zero.
This means that 
$$\lim_{N\to \infty} \frac{1}{N}\sum_{n=1}^N \exp(ik(x+n\alpha)) = \delta_{k0} = \frac{1}{2\pi}\int_{-\pi}^\pi \exp(ikt)dt$$
Where $\delta$ is the Kronecker delta.
Now the main problem asks us to show that
$$\lim_{N\to \infty} \frac{1}{N}\sum_{n=1}^N f(x+n\alpha) = \frac{1}{2\pi} \int_{-\pi}^\pi f(t)dt$$
for any continuous $2\pi$-periodic function $f$ on the reals. If $f$ is a trigonometric polynomial, it follows easily from the result for $\exp(ikx)$. But we know that every continuous $2\pi$-periodic function is a uniform limit of trigonometric polynomials. If $f_1, f_2, \ldots$ is a sequence of trigonometric polynomials that converges uniformly to $f$, we know that for each $i$,
$$\lim_{N\to \infty}\frac{1}{N}\sum_{n=1}^N f_i(x+n\alpha) = \frac{1}{2\pi}\int_{-\pi}^\pi f_i(t)dt$$
Standard theorems about uniform convergence then tell us that
$$\frac{1}{2\pi}\int_{-\pi}^\pi f(t)dt = \frac{1}{2\pi}\int_{-\pi}^\pi \lim_{i\to \infty}f_i(t)dt = \lim_{i\to \infty} \frac{1}{2\pi}\int_{-\pi}^\pi f_i(t)dt$$
$$= \lim_{i\to \infty} \lim_{N\to \infty} \frac{1}{N}\sum_{n=1}^N f_i(x+n\alpha) = \lim_{N\to \infty} \frac{1}{N}\sum_{n=1}^N \lim_{i\to\infty}f_i(x+n\alpha) = \lim_{N\to\infty} \frac{1}{N}\sum_{n=1}^N f(x+n\alpha)$$