In Example 8.1.4 and Exercises 8.1.4-8.1.22 we saw that the eigenfunctions of Problem 5 are orthogonal on \([-L,L]\) and the eigenfunctions of Problems 1–4 are orthogonal on \([0,L]\). In this section and the next we introduce some series expansions in terms of these eigenfunctions. We’ll use these expansions to solve partial differential equations in Chapter 9.
Theorem \(\PageIndex{1}\)
Suppose the functions \(\phi_1,\) \(\phi_2,\) \(\phi_3,\) …\(,\) are orthogonal on \([a,b]\) and
It can be shown that the boundedness of the partial sums \(\{f_N\}_{N=1}^\infty\) and the integrability of \(f\) allow us to interchange the operations of integration and summation on the right of Equation \ref{eq:11.2.4}, and rewrite Equation \ref{eq:11.2.4} as
Now Equation \ref{eq:11.2.1} implies Equation \ref{eq:11.2.3}.
Theorem \(\PageIndex{1}\) motivates the next definition.
Theorem \(\PageIndex{2}\)
Suppose \(\phi_1,\) \(\phi_2\), …, \(\phi_n\),…are orthogonal on \([a,b]\) and \(\int_a^b\phi_n^2(x)\,dx\ne0\), \(n=1\), \(2\), \(3\), …. Let \(f\) be integrable on \([a,b],\) and define
Then the infinite series \(\sum_{n=1}^\infty c_n\phi_n(x)\) is called the Fourier expansion of \(f\) in terms of the orthogonal set \(\{\phi_n\}_{n=1}^\infty\), and \(c_1\), \(c_2\), …, \(c_n\), … are called the Fourier coefficients of \(f\) with respect to \(\{\phi_n\}_{n=1}^\infty\). We indicate the relationship between \(f\) and its Fourier expansion by
rather than Equation \ref{eq:11.2.7}. Unfortunately, this isn’t always true. The series on the right may diverge for some or all values of \(x\) in \([a,b]\), or it may converge to \(f(x)\) for some values of \(x\) and not for others. So, for now, we’ll just think of the series as being associated with \(f\) because of the definition of the coefficients \(\{c_n\}\), and we’ll indicate this association informally as in Equation \ref{eq:11.2.7}.
Fourier Series
We’ll now study Fourier expansions in terms of the eigenfunctions
of Problem 5. If \(f\) is integrable on \([-L,L]\), its Fourier expansion in terms of these functions is called the Fourier series of \(f\) on \([-L,L]\). Since
Note that \(a_0\) is the average value of \(f\) on \([-L,L]\), while \(a_n\) and \(b_n\) (for \(n\ge1\)) are twice the average values of
\[f(x)\cos{n\pi x\over L}\quad\mbox{ and }\quad f(x)\sin{n\pi x\over L}\nonumber \]
on \([-L,L]\), respectively.
Convergence of Fourier Series
The question of convergence of Fourier series for arbitrary integrable functions is beyond the scope of this book. However, we can state a theorem that settles this question for most functions that arise in applications.
Theorem \(\PageIndex{3}\)
A function \(f\) is said to be piecewise smooth on \([a,b]\) if:
\(f\) has at most finitely many points of discontinuity in \((a,b)\);
\(f'\) exists and is continuous except possibly at finitely many points in \((a,b)\);
\(f(x_0+)=\lim_{x\to x_0+}f(x)\) and \(f'(x_0+)=\lim_{x\to x_0+}f'(x)\) exist if \(a\le x_0<b\);
\(f(x_0-)=\lim_{x\to x_0-}f(x)\) and \(f'(x_0-)=\lim_{x\to x_0-}f'(x)\) exist if \(a< x_0\le b\).
Since \(f\) and \(f'\) are required to be continuous at all but finitely many points in \([a,b]\), \(f(x_0+)=f(x_0-)\) and \(f'(x_0+)=f'(x_0-)\) for all but finitely many values of \(x_0\) in \((a,b)\). Recall from Section 8.1 that \(f\) is said to have a jump discontinuity at \(x_0\) if \(f(x_0+)\ne f(x_0-)\).
The next theorem gives sufficient conditions for convergence of a Fourier series. The proof is beyond the scope of this book.
Theorem \(\PageIndex{4}\)
If \(f\) is a piecewise smooth on \([-L,L]\), then the Fourier series
\[\label{eq:11.2.8}F(x)=a_{0}+\sum_{n=1}^{\infty}\left(a_{n}\cos\frac{n\pi x}{L}+b_{n}\sin\frac{n\pi x}{L} \right)\] of \(f\) on \([-L,L]\) converges for all \(x\) in \([-L,L]\); moreover,
Note that \(F\) is itself piecewise smooth on \([-L,L]\), and \(F(x)=f(x)\) at all points in the open interval \((-L,L)\) where \(f\) is continuous. Since the series in Equation \ref{eq:11.2.8} converges to \(F(x)\) for all \(x\) in \([-L,L]\), you may be tempted to infer that the error
can be made as small as we please for all \(x\) in \([-L,L]\) by choosing \(N\) sufficiently large. However, this isn’t true if \(f\) has a discontinuity somewhere in \((-L,L)\), or if \(f(-L+)\ne f(L-)\). Here’s the situation in this case.
If \(f\) has a jump discontinuity at a point \(\alpha\) in \((-L,L)\), there will be sequences of points \(\{u_N\}\) and \(\{v_N\}\) in \((-L,\alpha)\) and \((\alpha,L)\), respectively, such that
Thus, the maximum value of the error \(E_N(x)\) near \(\alpha\) does not approach zero as \(N\to\infty\), but just occurs closer and closer to \((\)and on both sides of \()\) \(\alpha\), and is essentially independent of \(N\).
If \(f(-L+)\ne f(L-)\), then there will be sequences of points \(\{u_N\}\) and \(\{v_N\}\) in \((-L,L)\) such that
This is the Gibbs phenomenon. Having been alerted to it, you may see it in Figures \(\PageIndex{2}\) - \(\PageIndex{4}\), below; however, we’ll give a specific example at the end of this section.
Example \(\PageIndex{1}\)
Find the Fourier series of the piecewise smooth function
on \([-2,2]\) (Figure \(\PageIndex{1}\)). Determine the sum of the Fourier series for \(-2\le x\le 2\).
Figure \(\PageIndex{1}\)
Solution
Note that wen’t bothered to define \(f(-2)\), \(f(0)\), and \(f(2)\). No matter how they may be defined, \(f\) is piecewise smooth on \([-2,2]\), and the coefficients in the Fourier series
are not affected by them. In any case, Theorem \(\PageIndex{4}\) implies that \(F(x)=f(x)\) in \((-2,0)\) and \((0,2)\), where \(f\) is continuous, while
approximates \(f(x)\) for \(m=5\) (dotted curve), \(m=10\) (dashed curve), and \(m=15\) (solid curve).
Figure \(\PageIndex{2}\)
Even and Odd Functions
Computing the Fourier coefficients of a function \(f\) can be tedious; however, the computation can often be simplified by exploiting symmetries in \(f\) or some of its terms. To focus on this, we recall some concepts that you studied in calculus. Let \(u\) and \(v\) be defined on \([-L,L]\) and suppose that
\[u(-x)=u(x)\quad\mbox{ and }\quad v(-x)=-v(x),\quad -L\le x\le L.\nonumber \]
Then we say that \(u\) is an even function and \(v\) is an odd function. Note that:
The product of two even functions is even.
The product of two odd functions is even.
The product of an even function and an odd function is odd.
Example \(\PageIndex{2}\)
The functions \(u(x)=\cos \omega x\) and \(u(x)=x^2\) are even, while \(v(x)=\sin \omega x\) and \(v(x)=x^3\) are odd. The function \(w(x)=e^x\) is neither even nor odd.
You learned parts (a) and (b) of the next theorem in calculus, and the other parts follow from them (Exercise 11.2.1).
Theorem \(\PageIndex{5}\)
Suppose \(u\) is even and \(v\) is odd on \([-L,L].\) Then\(:\)
approximates \(f(x)\) for \(m=5\) (dotted curve), \(m=10\) (dashed curve), and \(m=15\) (solid curve).
Figure \(\PageIndex{3}\): Approximation of \(f(x)=x^{2}-x\) by partial sums of its Fourier series on \([-2,2]\)
Theorem \(\PageIndex{5}\) ilmplies the next theorem follows.
Theorem \(\PageIndex{6}\)
Suppose \(f\) is integrable on \([-L,L].\)
If \(f\) is even\(,\) the Fourier series of \(f\) on \([-L,L]\) is \[F(x)=a_0+\sum_{n=1}^\infty a_n\cos{n\pi x\over L},\nonumber \] where \[a_0={1\over L}\int_0^Lf(x) \,dx \quad \text{and} \quad a_n={2\over L}\int_0^L f(x)\cos{n\pi x\over L}\,dx,\quad n\ge1.\nonumber \]
If \(f\) is odd\(,\) the Fourier series of \(f\) on \([-L,L]\) is \[F(x)= \sum_{n=1}^\infty b_n \sin{n\pi x\over L},\nonumber \] where \[b_n={2\over L}\int_0^L f(x)\sin{n\pi x\over L}\,dx.\nonumber \]
Example \(\PageIndex{4}\)
Find the Fourier series of \(f(x)=x\) on \([-\pi,\pi]\), and determine its sum for \(-\pi\le x\le \pi\).
\[(-1)^n-1= \left\{\begin{array}{rl} 0&\mbox{ if }n=2m,\\ -2&\mbox{ if }n=2m+1, \end{array}\right.\nonumber \]
the terms in Equation \ref{eq:11.2.12} for which \(n=2m\) are all zeros. Therefore we only to include the terms for which \(n=2m+1\); that is, we can rewrite Equation \ref{eq:11.2.12} as
thus, \(F\) (as well as \(f\)) has unit jump discontinuities at \(x=\pm\frac{1}{2}\). Figures \(\PageIndex{5}\)-\(\PageIndex{7}\) show the graphs of \(y=f(x)\) and
for \(N=10\), \(20\), and \(30\). You can see that although \(F_{2N-1}\) approximates \(F\) (and therefore \(f\)) well on larger intervals as \(N\) increases, the maximum absolute values of the errors remain approximately equal to \(.09\), but occur closer to the discontinuities \(x=\pm\frac{1}{2}\) as \(N\) increases.
Figure \(\PageIndex{5}\): The Gibbs Phenomenon Example \(\PageIndex{7}\), \(N=10\)Figure \(\PageIndex{6}\): The Gibbs Phenomenon: Example \(\PageIndex{7}\), \(N=20\)Figure \(\PageIndex{7}\): The Gibbs Phenomenon: Example \(\PageIndex{7}\), \(N=30\)
Using Technology
The computation of Fourier coefficients will be tedious in many of the exercises in this chapter and the next. To learn the technique, we recommend that you do some exercises in each section “by hand,” perhaps using the table of integrals at the front of the book. However, we encourage you to use your favorite symbolic computation software in the more difficult problems.