Finding Trigonometric Fourier Series of Functions of Period 2L

# Finding Trigonometric Fourier Series of Functions of Period 2L

So far, all of the formulas we have looked at regarding trigonometric Fourier series have been for functions $f$ that are defined on an interval of length $2\pi$ and/or are $2\pi$-periodic. We would like to generalize obtaining a trigonometric Fourier series for functions that are instead of period $2L$. Fortunately, this is rather simple.

Suppose that $f$ is $2L$-periodic ($L > 0$), i.e., $f(x + 2L) = f(x)$ for all $x \in \mathbb{R}$. Then the trigonometric Fourier series of $f$ is given by:

(1)
\begin{align} \quad f(x) \sim \frac{c_0}{2} + \sum_{n=1}^{\infty} \left [ c_n \cos \left ( \frac{n \pi x}{L} \right ) + d_n \sin \left ( \frac{n \pi x}{L} \right ) \right ] \end{align}

Where $\displaystyle{c_n = \frac{1}{L} \int_{-L}^{L} f(t) \cos \left ( \frac{n \pi t}{L} \right ) \: dt}$ and $\displaystyle{d_n = \frac{1}{L} \int_{-L}^{L} f(t) \sin \left ( \frac{n \pi t}{L} \right ) \: dt }$.

For example, suppose that we want to find the Fourier series of the function $f(x) = \mid x \mid$ for $-1 \leq x \leq 1$ and $f(x + 2) = f(x)$ for all $x \in \mathbb{R}$ ($f$ is $2$-periodic). Then $L = 1$ and:

(2)
\begin{align} \quad a_0 = \frac{1}{L} \int_{-L}^{L} f(t) \: dt = \int_{-1}^{1} \mid L \mid \: dt = \int_{-1}^{0} -t \: dx + \int_0^{1} t \: dx = -\frac{t^2}{2} \biggr \lvert_{-1}^{0} + \frac{t^2}{2} \biggr \lvert_0^1 = \frac{1}{2} + \frac{1}{2} = 1 \end{align}
(3)
\begin{align} \quad c_n = \frac{1}{L} \int_{-L}^{L} f(t) \cos \left ( \frac{n \pi t}{L} \right ) \: dt = \int_{-1}^{1} \mid t \mid \cos n \pi t \: dt = \int_{-1}^{0} -t \cos n\pi t \: dt + \int_0^1 t \cos n \pi t \: dt \quad (*) \end{align}

We use integration by parts to evaluate the integrals above. Let $u = t$ and let $dv = \cos n \pi t$. Then $du = dt$ and $\displaystyle{v = \frac{\sin n \pi t}{n \pi}}$, so:

(4)
\begin{align} \quad \int t \cos n \pi t \: dt = t \frac{\sin n \pi t}{n \pi} - \int \frac{\sin n \pi t}{n \pi} \: dt = t\frac{\sin n \pi t}{n \pi} + \frac{\cos n \pi t}{n^2 \pi^2} \end{align}

Evaluating the righthand side of the equation above at $t = 0$ and $t = 1$ yields:

(5)
\begin{align} \quad \int_0^1 t \cos n \pi t \: dt = \frac{\cos n \pi}{n^2 \pi^2} - \frac{1}{n^2 \pi^2} = \frac{(\cos n \pi - 1)}{n^2 \pi^2} \quad (**) \end{align}

We similarly find that:

(6)
\begin{align} \quad \int_{-1}^{0} t \cos n \pi t \: dt = \frac{(\cos n \pi - 1)}{n^2 \pi^2} \quad (***) \end{align}

Thus, by plugging $(**)$ and $(***)$ into $(*)$ we see that:

(7)
\begin{align} \quad c_n = \frac{2(\cos n \pi - 1)}{n^2 \pi^2} \end{align}

Furthermore we have that:

(8)
\begin{align} \quad d_n = \frac{1}{L} \int_{-L}^{L} f(t) \sin \left ( \frac{n \pi t}{L} \right ) \: dt = \int_{-1}^{1} \mid t \mid \sin n \pi t \: dt \quad (****) \end{align}

Note that $\mid t \mid$ is an even function and $\sin n \pi t$ is an odd function on $[-L, L] = [-1, 1]$, so $\mid t \mid \sin n \pi t$ is an odd function on the symmetric interval $[-1, 1]$ so the integral $(****)$ above is equal to $0$ and the trigonometric Fourier series of $f$ is therefore:

(9)
\begin{align} \quad f(x) & \sim \frac{1}{2} + \sum_{n=1}^{\infty} \frac{2(\cos n \pi - 1)}{n^2 \pi^2} \cos n \pi x \\ & \sim \frac{1}{2} + \frac{-4}{\pi^2} \cos \pi x + \frac{-4}{9 \pi^2} \cos 3\pi x + \frac{-4}{25 \pi^2} \cos 5 \pi x + ... \\ & \sim \frac{1}{2} - \sum_{n=1}^{\infty} \frac{4}{(2n - 1)^2 \pi^2} \cos (2n - 1)\pi x \end{align}

The graph of the first three approximations of $f$ (in red, yellow, and green) are graphed below alongside with $f$ itself (in blue): Clearly the Fourier series of $f$ converges to $f$ on all of $\mathbb{R}$. In particular, the series converges at $x = 1$ to $f(1)$, and consequentially:

(10)
\begin{align} \quad 1 = \frac{1}{2} - \sum_{n=1}^{\infty} \frac{4}{(2n - 1)^2 \pi^2} \cos (2n - 1)\pi \end{align}

Therefore:

(11)
\begin{align} \sum_{n=1}^{\infty} \frac{4}{(2n - 1)^2 \pi^2} \cos (2n - 1)\pi = -\frac{1}{2} \end{align}

Finding the sum of the series above would have been much more difficult without the use of Fourier series.