# Riemann Integrals and Periodic Functions

Consider the following result, where integrals are, say, Riemann integrals:

Let $f:\mathbb{R}\to\mathbb{C}$ be a periodic function of period $L$. Then for all $a\in\mathbb{R}$ $$\int_0^Lf(x)\,dx=\int_a^{a+L}f(x)\,dx.$$

Question: Is a periodic function $f:\mathbb{R}\to\mathbb{C}$ necessarily Riemann-integrable? If not, then clearly the Riemann-integrability of $f$ is implicitly supposed in the proposition, so it is natural to ask whether it is a mistake not to add this hypothesis explicitly?

Thoughts: [Looks like something is wrong with my argument.] I do not think that a periodic function $f:\mathbb{R}\to\mathbb{C}$ is necessarily Riemann-integrable. I think that a periodic extension of, say, $f:[-\sqrt{2},\sqrt{2}]\to\mathbb{C}$ defined by $$\begin{cases} 1,&x\in\mathbb{Q}\cap[-\sqrt{2},\sqrt{2}],\\ 0,&\text{otherwise} \end{cases}$$ is a counter-example.

Clearly the periodic extension of $f$ is $g:\mathbb{R}\to\mathbb{C}$ where $$\begin{cases} 1,&x\in\mathbb{Q},\\ 0,&\text{otherwise}. \end{cases}$$ By extending $f$ to obtain $g$, we see that $g$ is $2\sqrt{2}$-periodic. However $2\sqrt{2}$ is irrational, therefore if $a$ is rational then $a+2\sqrt{2}$ is also irrational. Hence $f(a)\neq f(a+2\sqrt{2})$...

What's wrong? Is $g$ really periodic? I think $g$ is periodic for any non-zero rational number.

• Relatedly math.stackexchange.com/questions/1004426/… The example there is also not Riemann integrable. One way out of the problem you cite would be to impose the strong condition of continuity on $f$. – Simon S Nov 10 '14 at 18:33

It is correct that periodicity does not all imply integrability, no matter what type of integral you use. Just choose any non-integrable function on $[0,1)$ and extend periodically with period $1$ to get a counter-example. How a function behaves outside of $[0,1)$ does not change its integrability in $[0, 1)$.
The problem with the example is that $g$ is not the periodic extension of $f$. The periodic extension $\bar f$ of $f$ with period $a = 2\sqrt 2$ would have value $\bar f(a) = \bar f(0) = f(0) = 1$, but $g(a) = 0$.
$g$ is periodic with any rational period. But $a$ is irrational.