: User manual for Iode
: Second order linear ODEs
: Partial differential equations



Fourier series

The Fourier series module can compute and graph the Fourier coefficients of a periodic function $ f$, and can plot partial sums of the Fourier series and the error (difference) between these partial sums and the function $ f$.

For concreteness, we will write $ f(x)$ for the function being considered, even though you can change the name of the independent variable from $ x$ to something else like $ t$, if you want.

After selecting Fourier series from the Iode main menu, the Fourier series window will open up, showing two graphs. The top graph plots a function $ f(x)$ in dark blue and a partial sum of its Fourier series in red. These are plotted over two period lengths. Recall that a partial sum of the Fourier series is an expression of the form

$\displaystyle \frac{A_0}{2} + \sum_{n=1}^N (A_n \cos \frac{n\pi x}{L} + B_n \sin \frac{n\pi x}{L})$ (4.1)

where

$\displaystyle A_n = \frac{1}{L} \int_{x_1}^{x_2} f(x) \cos \frac{n\pi x}{L} dx$   and$\displaystyle \qquad B_n = \frac{1}{L} \int_{x_1}^{x_2} f(x) \sin \frac{n\pi x}{L} dx
$

are the % latex2html id marker 2462
$ n^{\text{th}}$ Fourier coefficients and $ L$ is the half-period, $ L = (x_2-x_1)/2$.

The top harmonic number $ N$ tells you the highest frequency that is included in the partial sum. Try increasing or decreasing the value of the top harmonic used in your plot, by clicking on the ``arrow'' buttons in the middle of the window. Alternatively, you can type a number directly into the Current top harmonic box between the arrows.

The bottom graph in the window plots the error between the function $ f(x)$ and the partial sum of its Fourier series:

   error $\displaystyle (x) =
f(x) - \left[ \frac{A_0}{2} + \sum_{n=1}^N (A_n \cos \frac{n\pi x}{L} +
B_n \sin \frac{n\pi x}{L}) \right] .
$

Notice that the vertical scale on this error plot is generally different from the scale on the top plot, in which the function is plotted. In fact, the vertical scale on the error plot will change as you step through the partial sums (increasing or decreasing the top harmonic).

Across the top of both graphs you will find the function written out, along with the basic period interval $ x_1 \leq x < x_2$. The function is extended periodically by Iode, and is shown over two periods.

Controls

Function menu

Remark 4.2   It is interesting to plot the values of $ C_n$ and determine their rate of decay because $ C_n$ equals the amplitude of the combined oscillations at the $ n$th frequency level, in the Fourier series of $ f$. To see this, observe that

$\displaystyle A_n \cos \frac{n\pi x}L + B_n \sin \frac {n\pi x}L = C_n \cos (\frac {n \pi x}L - \alpha_n)$ (4.2)

where the angle $ \alpha_n$ is defined by requiring $ \cos \alpha_n =
A_n/C_n$ and $ \sin \alpha_n = B_n/C_n$. (Formula (4.2) is proved just by substituting the identity $ \cos(\beta-\alpha) = \cos
\beta \cos \alpha + \sin \beta \sin \alpha$ on the right hand side.)

Options menu


: User manual for Iode : Second order linear ODEs : Partial differential equations
平成16年11月7日