Show that f is constant by using fourier coefficient Let f be a 2$\pi$ periodic, Riemann integrable function and let $\alpha$ be an irrational number. Suppose that $f(x+2\pi\alpha)=f(x)$ for all x. Show that f is constant almost everywhere.
I know that If f,g is $2\pi$ periodic function and the coefficients of Fourier series of f,g are same, then f=g
Finally, I want to prove that there exists a constant c such that $\{x:f(x)\neq c\} $is of measure zero.
How to prove that?  
 A: Compute the $n$th Fourier coefficient of $f$:
$$\begin{aligned}
a_n &= \frac{1}{2\pi}\int_0^{2\pi}f(x) e^{-inx} dx \\
&= \frac{1}{2\pi}\int_0^{2\pi}f(x + 2\pi \alpha) e^{-inx} dx \\
&= \frac{1}{2\pi}\int_0^{2\pi}f(x)e^{-in(x - 2\pi \alpha)} dx \\
&= e^{in2\pi \alpha} \frac{1}{2\pi}\int_0^{2\pi}f(x) e^{-inx} dx \\
&= e^{in2\pi \alpha} a_n \\
\end{aligned}$$
(Note that we can still take the limits of integration as $0$ to $2\pi$ after the change of variable in the third line because both $f$ and $x \mapsto e^{-in(x-2\pi\alpha)}$ have period $2\pi$.)
Now, since $\alpha$ is irrational, we must have $e^{i n 2\pi \alpha} \neq 1$ whenever $n \neq 0$, which forces $a_n = 0$ for all $n \neq 0$. This means that the Fourier series for $f$ is simply $a_0$. Equivalently, the Fourier coefficients of the function $f - a_0$ are all zero. What can you conclude?
A: As an additional exercise, you might like to try the following:


*

*Show that for any $x\in[0,2\pi]$ the set $\{x+2n\pi\alpha\mod2\pi:n\in\mathbb Z\}$ is dense in $[0,2\pi]$

*Show that if $f\equiv c_1$ on $C_1$ and $f\equiv c_2$ on $C_2$, where $C_1$ and $C_2$ are both dense subsets of $[0,2\pi]$, then $c_1=c_2$ (Hint: use Riemann integrability)

*Conclude that $f$ is constant everywhere, not just almost everywhere.

