Suppose $f$ is a continuous real-valued function on $\mathbb{R}$ such that $f(x+1)=f(x)$ for every $x$, Let $\gamma$ be an irrational number. Suppose $f$ is a continuous real-valued function on $\mathbb{R}$ such that $f(x+1)=f(x)$ for every $x$, Let $\gamma$ be an irrational number. Prove that
$$
\lim_{n\to \infty}\frac{1}{n}\sum_{j=1}^{n}f(j\gamma)=\int_{0}^{1}f(x)dx.
$$
 A: Let $e_k(x) = e^{2 \pi i k x}$, it is straightforward to verify that the result
holds for $e_k$.
Since $f$ is $1$-periodic and continuous, for any $\epsilon>0$ there is some function $p$ of the form $p(x) = \sum_{k=0}^n f_n e_k(x)$
such that
$|f(x) -p(x)| < \epsilon$ for all $x$ (see, for example,
Rudin, "Real & Complex Analysis", Theorem 4.25).
Note that the theorem holds for $p$ using linearity of summation and integration.
Choose $p$ such that $|f(x) -p(x)| < {1 \over 3}\epsilon$ for all $x$. Now
choose $N$ such that if $n \ge N$, we have 
$|{1 \over n} \sum_{k=1}^n p(k \gamma) - \int_0^1 p(x) dx | < {1 \over 3}\epsilon$.
Then
$|{1 \over n} \sum_{k=1}^n (f(k \gamma)-p(k \gamma)) - \int_0^1 (f(x)-p(x)) dx | < {2 \over 3} \epsilon$.
Since
\begin{eqnarray}
{1 \over n} \sum_{k=1}^n (f(k \gamma)-p(k \gamma)) - \int_0^1 (f(x)-p(x)) dx &=& {1 \over n} \sum_{k=1}^n f(k \gamma) - \int_0^1 f(x) dx \\
& & \ \  - ({1 \over n} \sum_{k=1}^n p(k \gamma) - \int_0^1 p(x) dx)
\end{eqnarray}
we see that
$|{1 \over n} \sum_{k=1}^n f(k \gamma) - \int_0^1 f(x) dx| < \epsilon$, for
all $n \ge N$.
