You may have noticed by now that an odd function has no cosine terms in the Fourier series and an even function has no sine terms in the Fourier series. This observation is not a coincidence. Let us look at even and odd periodic function in more detail.

Recall that a function \(f(t)\) is odd if \(f(-t) =
-f(t)\text{.}\) A function \(f(t)\) is even if \(f(-t) = f(t)\text{.}\) For example, \(\cos (n t)\) is even and \(\sin (n t)\) is odd. Similarly the function \(t^k\) is even if \(k\) is even and odd when \(k\) is odd.

Exercise4.4.1

Take two functions \(f(t)\) and \(g(t)\) and define their product \(h(t) =
f(t)g(t)\text{.}\) a) Suppose both are odd, is \(h(t)\) odd or even? b) Suppose one is even and one is odd, is \(h(t)\) odd or even? c) Suppose both are even, is \(h(t)\) odd or even?

If \(f(t)\) and \(g(t)\) are both odd, then \(f(t)+g(t)\) is odd. Similarly for even functions. On the other hand, if \(f(t)\) is odd and \(g(t)\) even, then we cannot say anything about the sum \(f(t) + g(t)\text{.}\) In fact, the Fourier series of any function is a sum of an odd (the sine terms) and an even (the cosine terms) function.

In this section we consider odd and even periodic functions. We have previously defined the \(2L\)-periodic extension of a function defined on the interval \([-L,L]\text{.}\) Sometimes we are only interested in the function on the range \([0,L]\) and it would be convenient to have an odd (resp. even) function. If the function is odd (resp. even), all the cosine (resp. sine) terms disappear. What we will do is take the odd (resp. even) extension of the function to \([-L,L]\) and then extend periodically to a \(2L\)-periodic function.

Take a function \(f(t)\) defined on \([0,L]\text{.}\) On \((-L,L]\) define the functions

Extend \(F_{\text{odd}}(t)\) and \(F_{\text{even}}(t)\) to be \(2L\)-periodic. Then \(F_{\text{odd}}(t)\) is called the odd periodic extension of \(f(t)\text{,}\) and \(F_{\text{even}}(t)\) is called the even periodic extension of \(f(t)\text{.}\) For the odd extension we generally assume that \(f(0) = f(L) = 0\text{.}\)

Exercise4.4.2

Check that \(F_{\text{odd}}(t)\) is odd and \(F_{\text{even}}(t)\) is even. For \(F_{\text{odd}}\text{,}\) assume \(f(0) = f(L) = 0\text{.}\)

Example4.4.1

Take the function \(f(t) = t\,(1-t)\) defined on \([0,1]\text{.}\) Figure 5.4.4 shows the plots of the odd and even periodic extensions of \(f(t)\text{.}\)

Subsection4.4.2Sine and cosine series

Let \(f(t)\) be an odd \(2L\)-periodic function. We write the Fourier series for \(f(t)\text{.}\) First, we compute the coefficients \(a_n\) (including \(n=0\)) and get

That is, there are no cosine terms in the Fourier series of an odd function. The integral is zero because \(f(t) \cos \left( {n \pi}{L} \,t \right)\) is an odd function (product of an odd and an even function is odd) and the integral of an odd function over a symmetric interval is always zero. The integral of an even function over a symmetric interval \([-L,L]\) is twice the integral of the function over the interval \([0,L]\text{.}\) The function \(f(t) \sin \left( \frac{n \pi}{L} \, t \right)\) is the product of two odd functions and hence is even.

An interesting consequence is that the coefficients of the Fourier series of an odd (or even) function can be computed by just integrating over the half interval \([0,L]\text{.}\) Therefore, we can compute the Fourier series of the odd (or even) extension of a function by computing certain integrals over the interval where the original function is defined.

Theorem4.4.1

Let \(f(t)\) be a piecewise smooth function defined on \([0,L]\text{.}\) Then the odd periodic extension of \(f(t)\) has the Fourier series

The series \(\sum_{n=1}^\infty b_n \sin \left( \frac{n \pi}{L} \, t\right)\) is called the sine series of \(f(t)\) and the series \(\frac{a_0}{2} + \sum_{n=1}^\infty a_n \cos \left( \frac{n \pi}{L} \, t
\right)\) is called the cosine series of \(f(t)\text{.}\) We often do not actually care what happens outside of \([0,L]\text{.}\) In this case, we pick whichever series fits our problem better.

It is not necessary to start with the full Fourier series to obtain the sine and cosine series. The sine series is really the eigenfunction expansion of \(f(t)\) using eigenfunctions of the eigenvalue problem \(x''+\lambda x = 0\text{,}\) \(x(0) = 0\text{,}\) \(x(L) = L\text{.}\) The cosine series is the eigenfunction expansion of \(f(t)\) using eigenfunctions of the eigenvalue problem \(x''+\lambda x = 0\text{,}\) \(x'(0) = 0\text{,}\) \(x'(L) = L\text{.}\) We could have, therefore, gotten the same formulas by defining the inner product

and following the procedure of Section 4.2. This point of view is useful, as we commonly use a specific series that arose because our underlying question led to a certain eigenvalue problem. If the eigenvalue problem is not one of the three we covered so far, you can still do an eigenfunction expansion, generalizing the results of this chapter. We will deal with such a generalization in Chapter 5.

Example4.4.2

Find the Fourier series of the even periodic extension of the function \(f(t) = t^2\) for \(0 \leq t \leq \pi\text{.}\)

Note that we have “detected” the continuity of the extension since the coefficients decay as \(\frac{1}{n^2}\text{.}\) That is, the even periodic extension of \(t^2\) has no jump discontinuities. It does have corners, since the derivative, which is an odd function and a sine series, has jumps; it has a Fourier series whose coefficients decay only as \(\frac{1}{n}\text{.}\)

a) Compute the derivative of the even periodic extension of \(f(t)\) above and verify it has jump discontinuities. Use the actual definition of \(f(t)\text{,}\) not its cosine series! b) Why is it that the derivative of the even periodic extension of \(f(t)\) is the odd periodic extension of \(f'(t)\text{?}\)

Subsection4.4.3Application

Fourier series ties in to the boundary value problems we studied earlier. Let us see this connection in more detail.

Suppose we have the boundary value problem for \(0 < t < L\text{,}\)

for the Dirichlet boundary conditions \(x(0) = 0\text{,}\) \(x(L) = 0\text{.}\) By using the Fredholm alternative (Theorem 4.1.2), as long as \(\lambda\) is not an eigenvalue of the underlying homogeneous problem, there exists a unique solution. Eigenfunctions of this eigenvalue problem are the functions \(\sin \left( \frac{n \pi}{L} t \right)\text{.}\) Therefore, to find the solution, we first find the Fourier sine series for \(f(t)\text{.}\) We write \(x\) also as a sine series, but with unknown coefficients. We substitute the series for \(x\) into the equation and solve for the unknown coefficients. If we have the Neumann boundary conditions \(x'(0) = 0\text{,}\) \(x'(L) = 0\text{,}\) we do the same procedure using the cosine series.

Let us see how this method works on examples.

Example4.4.3

Take the boundary value problem for \(0 < t < 1\text{,}\)

where \(f(t) = t\) on \(0 < t < 1\text{,}\) and satisfying the Dirichlet boundary conditions \(x(0) = 0\text{,}\) \(x(1)=0\text{.}\) We write \(f(t)\) as a sine series

where again \(f(t) = t\) on \(0 < t < 1\text{,}\) but now satisfying the Neumann boundary conditions \(x'(0) = 0\text{,}\) \(x'(1)=0\text{.}\) We write \(f(t)\) as a cosine series

Take \(f(t) = {(t-1)}^2\) defined on \(0 \leq t \leq 1\text{.}\) a) Sketch the plot of the even periodic extension of \(f\text{.}\) b) Sketch the plot of the odd periodic extension of \(f\text{.}\)

Exercise4.4.5

Find the Fourier series of both the odd and even periodic extension of the function \(f(t) = {(t-1)}^2\) for \(0 \leq t \leq 1\text{.}\) Can you tell which extension is continuous from the Fourier series coefficients?

Exercise4.4.6

Find the Fourier series of both the odd and even periodic extension of the function \(f(t) = t\) for \(0 \leq t \leq \pi\text{.}\)

Exercise4.4.7

Find the Fourier series of the even periodic extension of the function \(f(t) = \sin t\) for \(0 \leq t \leq \pi\text{.}\)

where \(f(t) = 1\) on \(0 < t < 1\text{.}\) a) Solve for the Dirichlet conditions \(x(0)=0, x(1) = 0\text{.}\) b) Solve for the Neumann conditions \(x'(0)=0, x'(1) = 0\text{.}\)

for \(f(t) = \sin (2\pi t)\) on \(0 < t < 1\text{.}\) a) Solve for the Dirichlet conditions \(x(0)=0, x(1) = 0\text{.}\) b) Solve for the Neumann conditions \(x'(0)=0, x'(1) = 0\text{.}\)

where \(f(t) = \sum_{n=1}^\infty b_n \sin (n \pi t)\text{.}\) Write the solution \(x(t)\) as a Fourier series, where the coefficients are given in terms of \(b_n\text{.}\)

Exercise4.4.11

Let \(f(t) = t^2(2-t)\) for \(0 \leq t \leq 2\text{.}\) Let \(F(t)\) be the odd periodic extension. Compute \(F(1)\text{,}\) \(F(2)\text{,}\) \(F(3)\text{,}\) \(F(-1)\text{,}\) \(F(\nicefrac{9}{2})\text{,}\) \(F(101)\text{,}\) \(F(103)\text{.}\) Note: Do not compute using the sine series.

Exercise4.4.101

Let \(f(t) = \nicefrac{t}{3}\) on \(0 \leq t < 3\text{.}\) a) Find the Fourier series of the even periodic extension. b) Find the Fourier series of the odd periodic extension.

a) \(\nicefrac{1}{2}
+
\sum\limits_{\substack{n=1\\n\text{ odd}}}^\infty
\frac{-4}{\pi^2 n^2}
\cos\bigl(\frac{n\pi}{3} t \bigr)\) b) \(\sum\limits_{n=1}^\infty
\frac{2{(-1)}^{n+1}}{\pi n}
\sin\bigl(\frac{n\pi}{3} t \bigr)\)

Exercise4.4.102

Let \(f(t) = \cos(2t)\) on \(0 \leq t < \pi\text{.}\) a) Find the Fourier series of the even periodic extension. b) Find the Fourier series of the odd periodic extension.

a) \(\cos(2t)\) b) \(\sum\limits_{\substack{n=1 \\n \text{ odd}}}^\infty
\frac{-4n}{\pi n^2 - 4 \pi}
\sin(n t)\)

Exercise4.4.103

Let \(f(t)\) be defined on \(0 \leq t < 1\text{.}\) Now take the average of the two extensions \(g(t) = \frac{F_{\text{odd}}(t)+ F_{\text{even}}(t)}{2}\text{.}\) a) What is \(g(t)\) if \(0 \leq t < 1\) (Justify!) b) What is \(g(t)\) if \(-1 < t < 0\) (Justify!)

Let \(f(t) = \sum_{n=1}^\infty \frac{1}{n^2} \sin(nt)\text{.}\) Solve \(x''- x = f(t)\) for the Dirichlet conditions \(x(0) = 0\) and \(x(\pi) = 0\text{.}\)

(challenging) Let \(f(t) = t + \sum_{n=1}^\infty \frac{1}{2^n} \sin(nt)\text{.}\) Solve \(x'' + \pi x = f(t)\) for the Dirichlet conditions \(x(0) = 0\) and \(x(\pi) = 1\text{.}\) Hint: Note that \(\frac{t}{\pi}\) satisfies the given Dirichlet conditions.