Fourier series for $f(x+\pi) = f(x)$ 
Let $f$ be a continuous $2\pi$-periodic function which satisfies $f(x+\pi) = f(x)$ for $x\in [-\pi,\pi]$. Show that the odd Fourier terms for $f$ are $0$, that is $c_{2k+1} = 0$, $k\in \mathbb{Z}$

This is the intended solution (from the prof.):

The Fourier series for $f$ has the form $\sum_{n=1}^{\infty} c_ne^{inx}$   where $$c_n = \int_{-\pi}^{\pi} f(x) e^{-inx} dx = \int_{-\pi}^{0}f(x)e^{-inx} dx + \\ +\int_0^{\pi} f(x) e^{-inx} dx = \int_0^{\pi} f(x)e^{-inx}(1+e^{-in \pi}) dx$$ If $n$ is odd then $1+e^{-in\pi} = 0$ and thus $c_{2k+1} =0$

I have two questions:
Question 1: Why doesn't the Fourier series include nonpositive integers?
Question 2: Shouldn't the integral have limits $[a,a+1] \subset [-\pi,\pi]$? I mean, the angular frequency is $1$, no?
 A: First off, I suspect that there is an error in the proof that you were given (where did this proof come from?).  For any "sufficiently nice" function $f$ ($f$ is $2\pi$-periodic and, say, $f$ is continuous, or piecewise continuous, or maybe $f\in L^1$), the Fourier series of $f$ is (typically) defined by
$$ \sum_{n\in\mathbb{Z}} c_n \mathrm{e}^{inx}, $$
where the $n$-th Fourier coefficient $c_n$ is given by
$$ c_n = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) \mathrm{e}^{-inx}\,\mathrm{x}. $$
So I have two points of confusion with the argument given:


*

*As you say, the lack of negative indices in the summation is suspicious.  I suspect that this is a typo, and will assume that it is a small mistake from here on out (again, where did this proof come from?  This is an easy kind of mistake to make).  I believe that this answers your Question 1.

*I would have defined the Fourier coefficients with the normalizing constant $2\pi$.  Since the goal is to show that the coefficients with odd indices are zero, this constant isn't going to play a role, but I probably would have tried to be a little more careful in my writeup.  On the other hand, the constant really is inessential here, so we really can ignore it.


As to your second question, I am a mathematician, not a physicist, thus I have no intuition or feeling about what you mean by the phrase "...the angular frequency is 1, no?"  That being said, you would integrate over $[a,a+1)$ if the function were 1-periodic (maybe this is what you mean by angular frequency of 1?), but the function given is not 1-periodic, it is $2\pi$-periodic, so we must integrate over the interval $[0,2\pi)$.  Note also that this changes the form of the Fourier coefficients.  If we really had a 1-periodic function, then we would define
$$ c_n = \int_{a}^{a+1} f(x) \mathrm{e}^{i2\pi nx}\,\mathrm{d}x. $$
Here, we lose the normalizing constant out front (or, really, that constant is 1), but we pick up an extra constant in the exponential term.  This should give an answer to your Question 2.

Finally, just for the sake of completeness, here is the computation in pedantic detail:
\begin{align}
2\pi c_n
&= \int_{-\pi}^{\pi} f(x) \mathrm{e}^{-inx}\,\mathrm{d}x \tag{1} \\
&= \int_{-\pi}^{0} f(x) \mathrm{e}^{-inx}\,\mathrm{d}x + \int_{0}^{\pi} f(x) \mathrm{e}^{-inx}\,\mathrm{d}x \tag{2} \\
&= \int_{0}^{\pi} f(x-\pi) \mathrm{e}^{-in(x-\pi)} \,\mathrm{d}x + \int_{0}^{\pi} f(x) \mathrm{e}^{-inx}\,\mathrm{d} \tag{3} \\
&= \int_{0}^{\pi} f(x) \mathrm{e}^{-inx}\mathrm{e}^{in\pi} \,\mathrm{d}x + \int_{0}^{\pi} f(x) \mathrm{e}^{-inx}\,\mathrm{d}x \tag{4} \\
&= \int_{0}^{\pi} f(x) \mathrm{e}^{-inx}\mathrm{e}^{in\pi} + f(x) \mathrm{e}^{-inx}\,\mathrm{d}x \tag{5} \\
&= \int_{0}^{\pi} f(x) \mathrm{e}^{-inx} \left( 1+\mathrm{e}^{in\pi} \right)\,\mathrm{d}x. \tag{6}
\end{align}
The justifications for the computation are as follows:


*

*This is simply the definition of the $n$-th Fourier coefficient.

*All we are doing here is using the additivity of the integral in order break up an integral over one interval into two integrals over two intervals.  The result that you should have in mind from elementary calculus:  for any $a,b,c\in\mathbb{R}$ and any "sufficiently nice" function $g$ (i.e. any function for which all of the following integrals exist), we have
$$ \int_{a}^{c} g(x) \,\mathrm{d}x = \int_{a}^{b} g(x)\,\mathrm{d}x + \int_{b}^{c} g(x)\,\mathrm{d}x. $$

*This can be done via a change of variables.  If you prefer, we could write the step as
$$ \int_{-\pi}^{0} f(x) \mathrm{e}^{-inx} \,\mathrm{d}x
= \int_{0}^{\pi} f(u-\pi)\mathrm{e}^{in(u-\pi)} \,\mathrm{d}u, $$
where we have made the substitution $u = x+\pi$.  After making the substitution, relabel $u$ as $x$ to get what we have written above.

*Here we do two things:  expand out the exponential term, and use the hypothesis that $f$ is $\pi$-periodic, i.e. that $f(x-\pi) = f(x)$ for all $x$.

*This follows from the linearity of the integral.  That is, for any $a,b\in\mathbb{R}$ and sufficiently nice $g$ and $h$, we have
$$ \int_{a}^{b} g(x)\,\mathrm{d}x + \int_{a}^{b} h(x) \,\mathrm{d}x
= \int_{a}^{b} g(x) + h(x)\,\mathrm{d}x. $$

*Finally, we factor out $f(x) \mathrm{e}^{-inx}$ from the two terms in the summand and get what was promised.


Therefore since $1+\mathrm{e}^{in\pi} = 0$ for all odd $n$, we conclude that
$$ c_{2k+1}
= \int_{0}^{\pi} f(x) \mathrm{e}^{-inx} \left( 1+\mathrm{e}^{in\pi} \right)\,\mathrm{d}x
= \int_{0}^{\pi} f(x) \mathrm{e}^{-i(2k+1)x} \cdot 0 \,\mathrm{d}x
= 0, $$
which is the desired result.
