Link to Current (updated) notes

next previous Next: Other forms of the Fourier coefficients Up: Lecture_17_web Previous: Representing a particular function with a sum of

Fourier Series

The functions $ \cos( 2 \pi x/\lambda )$ and $ \sin( 2 \pi x/\lambda )$ each have period $ \lambda$ . That is, they each take on the same value at $ x$ and $ x + \lambda$ .

There are an infinite number of other simple trigonometric functions that are periodic in $ \lambda$ ; they are $ \cos[ 2 \pi x/(\lambda/2)) ]$ and $ \sin[ 2 \pi x/(\lambda/2)) ]$ and which cycle two times within each $ \lambda$ , $ \cos[ 2 \pi x/(\lambda/3)) ]$ and $ \sin[ 2 \pi x/(\lambda/3)) ]$ and which cycle three times within each $ \lambda$ , and, in general, $ \cos[ 2 \pi x/(\lambda/n)) ]$ and $ \sin[ 2 \pi x/(\lambda/n)) ]$ and which cycle $ n$ times within each $ \lambda$ .

The constant function, $ a_0(x) =$   const , also satisfies the periodicity requirement.

The superposition of multiples of any number of periodic function must also be a periodic function, therefore any function $ f(x)$ that satisfies:

\begin{displaymath}\begin{split}f(x) & = \mathcal{E}_{0} + \sum_{n=1}^{\infty} \...
...+ \sum_{n=1}^{\infty} \mathcal{O}_{k_n} \sin(k_n x) \end{split}\end{displaymath} (17-8)

where the $ k_i$ are the wave-numbers or reciprocal wavelengths defined by $ k_j \equiv 2 \pi j/\lambda$ . The $ k$ 's represent inverse wavelengths--large values of $ k$ represent short-period or high-frequency terms.

If any periodic function $ f(x)$ could be represented by the series in in Eq. 17-8 by a suitable choice of coefficients, then an alternative representation of the periodic function could be obtained in terms of the simple trigonometric functions and their amplitudes.


The ``inverse question'' remains: ``How are the amplitudes $ \mathcal{E}_{k_n}$ (the even trigonometric terms) and $ \mathcal{O}_{k_n}$ (the odd trigonometric terms) determined for a given $ f(x)$ ?''

The method follows from what appears to be a ``trick.'' The following three integrals have simple forms for integers $ M$ and $ N$ :

\begin{displaymath}\begin{split}\int_{x_0}^{x_0 + \lambda} & \sin\left( \frac{2 ...
...} x \right) dx = 0 \text{ for any integers } M, N\ \end{split}\end{displaymath} (17-9)

Therefore, any amplitude can be determined by multiplying both sides of Eq. 17-8 by its conjugate trigonometric function and integrating over the domain. (Here we pick the domain to start at zero, $ x \in (0, \lambda)$ , but any other starting point would work fine.)

\begin{displaymath}\begin{split}\cos(k_M x) f(x) = & \cos(k_M x) \left( \mathcal...
... x) f(x) dx = & \frac{\lambda}{2} \mathcal{E}_{k_M} \end{split}\end{displaymath} (17-10)

This provides a formula to calculate the even coefficients (amplitudes) and multiplying by a sin function provides a way to calculate the odd coefficients (amplitudes) for $ f(x)$ periodic in the fundamental domain $ x \in (0, \lambda)$ .

\begin{displaymath}\begin{split}\mathcal{E}_{k_0} = & \frac{1}{\lambda} \int_0^\...
...space{0.25in}} k_N \equiv \frac{2 \pi N}{\lambda}\ \end{split}\end{displaymath} (17-11)

The constant term has an extra factor of two because $ \int_0^\lambda \mathcal{E}_{k_0} dx = \lambda \mathcal{E}_{k_0}$ instead of the $ \lambda/2$ found in Eq. 17-9.

MATHEMATICA$ ^{\text{\scriptsize {\textregistered }}}$ Example
(notebook Lecture-17)
(html Lecture-17)
(xml+mathml Lecture-17)
Orthogonality of Trignometric Functions

Demonstrate that the relations in Eq. 17-9 are true.

MATHEMATICA$ ^{\text{\scriptsize {\textregistered }}}$ does not directly simplify and cancel periodic sine and cosine terms.

Calculating Fourier Amplitudes

  1. Write functions to calculate the even (cosine) coefficients and the odd (sine) coefficients using the formulas in Eq. 17-11.
  2. It is convenient to include the zeroth-order coefficient for the odd (sine) series which vanishes by definition.
  3. The functions work by doing an integral for each term--this is not very efficient. It would be more efficient to calculate the integral symbolically once and then evaluate it once for each term.
  4. Define an example function, $ f(x) = x(1-x)^2(2-x)$ , with which to demonstrate the Fourier approximation. This function is even about the $ x=1$ point.
  5. Define functions that create vectors of amplitudes for the cosine and sine terms.
  6. If a wavelength $ \lambda=2$ is used for the domain, then we should see that all odd (sine) Fourier amplitudes should vanish.
  7. The Fourier series up to a certain order can be defined as the sum of two inner (dot) products: the inner product of the odd coefficient vector and the sine basis vector, and the inner product of the even coefficient vector and the cosine basis vector.
  8. Illustrate convergence for different orders of approximation.
Using the Fourier Package Of course, Fourier series expansions are a common and useful mathematical tool, and it is not surprising that MATHEMATICA$ ^{\text{\scriptsize {\textregistered }}}$ would have a package to do this and replace the inefficient functions defined above.
  1. MATHEMATICA$ ^{\text{\scriptsize {\textregistered }}}$ 's Fourier package is designed to operate on the unit period located at $ x \in (-1/2, 1/2)$ .
  2. Construct a function that converts a function defined as periodic in fundamental domain $ x \in (0, \lambda)$ and maps it to a function that has fundamental domain $ x \in (-1/2, 1/2)$ .
  3. Demonstrate how MATHEMATICA$ ^{\text{\scriptsize {\textregistered }}}$ 's Fourier functions operate and illustrate convergence.
  4. If the function being approximated has some discontinuities either in its values, or in its first derivatives, then wiggles will develop near the discontinuities where the convergence is not locally well-behaved. This is called Gibbs' phenomenon.
  5. Use the Fourier package to illustrate and interpret the the spectrum of Fourier coefficients.



© W. Craig Carter 2003-, Massachusetts Institute of Technology