$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# 4.5: When is it a Fourier Series?

$$\newcommand{\vecs}{\overset { \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

The series discussed before are only useful is we can associate a function with them. How can we do that?

Lets us assume that the periodic function $$f(x)$$ has a Fourier series representation (exchange the summation and integration, and use orthogonality),

$f(x) = \frac{a_0}{2} + \sum_{n=1}\bigg[a_n\cos\bigg(\frac{n\pi x}{L}\bigg) + b_n\sin\bigg(\frac{n\pi x}{L}\bigg)\bigg]$

We can now use the orthogonality of the trigonometric functions to ﬁnd that

$\frac{1}{L}\int_{-L}^Lf(x)\cdot 1 dx = a_0 \nonumber$

$\frac{1}{L}\int_{-L}^Lf(x)\cdot \cos \bigg(\frac{n\pi x}{L}\bigg) dx = a_n \nonumber$

$\frac{1}{L}\int_{-L}^Lf(x)\cdot \sin \bigg(\frac{n\pi x}{L}\bigg) dx = a_n \nonumber$

This deﬁnes the Fourier coeﬃcients for a given $$f(x)$$. If these coeﬃcients all exist we have deﬁned a Fourier series, about whose convergence we shall talk in a later lecture.

An important property of Fourier series is given in Parseval’s lemma:

$\int_{-L}^L (f(x))^2dx = \frac{La_0^2}{2}+L\sum_{n=1}^\infty(a_n^2+b_n^2).$

This looks like a triviality, until one realises what we have done: we have once again interchanged an inﬁnite summation and an integration. There are many cases where such an interchange fails, and actually it make a strong statement about the orthogonal set when it holds. This property is usually referred to as completeness. We shall only discuss complete sets in these lectures.

Now let us study an example. We consider a square wave (this example will return a few times)

$f(x) = \bigg\{\begin{array}{ll}-3 & \mbox{if }-5+10n<x<10n\\ 3 & \mbox{if }10n < x < 5+10n \end{array}, \label{eq3}$

where $$n$$ is an integer, as sketched in Fig. $$\PageIndex{1}$$. Figure $$\PageIndex{1}$$: The square wave (\ref{eq3}).

This function is not defined at $$x=5n$$. We easily see that $$L=5$$. The Fourier coefficients are \begin{aligned} a_0 &= \frac{1}{5} \int_{-5}^0 -3 dx + \frac{1}{5} \int^{5}_0 3 dx = 0 \nonumber\\ a_n &= \frac{1}{5} \int_{-5}^0 -3 \cos\left(\frac{n\pi x}{5}\right) +\frac{1}{5} \int_0^5 3 \cos\left(\frac{n\pi x}{5}\right) = 0\\ b_n &= \frac{1}{5} \int_{-5}^0 -3 \sin\left(\frac{n\pi x}{5}\right) +\frac{1}{5} \int_0^5 3 \sin\left(\frac{n\pi x}{5}\right) \nonumber\\ &= \left.\frac{3}{n\pi}\cos\left(\frac{n\pi x}{5}\right)\right|^0_{-5} -\left.\frac{3}{n\pi}\cos\left(\frac{n\pi x}{5}\right)\right|^5_{0} \nonumber\\&= \frac{6}{n\pi}[1-\cos(n\pi)] = \begin{cases} \frac{12}{n\pi} &\text{if n odd}\\ 0 &\text{if n even} \end{cases} \nonumber\end{aligned} And thus ($$n=2m+1$$) $f(x) = \frac{12}{\pi}\sum_{m=0} \frac{1}{2m+1} \sin\left(\frac{(2m+1)\pi x}{5}\right).$

Exercise $$\PageIndex{1}$$

What happens if we apply Parseval’s theorem to this series?

We find $\int_{-5}^5 9 dx = 5 \frac{144}{\pi^2} \sum_{m=0}^\infty\left(\frac{1}{2m+1}\right)^2$Which can be used to show that $\sum_{m=0}^\infty\left(\frac{1}{2m+1}\right)^2 = \frac{\pi^2}{8}.$