next up previous
Next: Points of discontinuity and Up: Fseries_1 Previous: Fourier coefficients for -periodic

Example 4 (calculation of Fourier coefficients)

Let us calculate the Fourier coefficients for the function in Example 2 whose graph is shown in Figure 1. In order to calculate $ a_0$, we have to know the values of the function $ f(x)$ when $ x$ is changing from $ -\pi$ to $ \pi$. From the graph we read that $ f(x) = 0$ for $ x \in [-\pi, 0)$, and $ f(x) = 1$ for $ x \in [0, \pi)$. Note that the values of $ f(x)$ at the endpoints of the intervals do not affect the value of the integrals. Thus,



$ a_0 = \displaystyle{\frac{1}{\pi} \int_{-\pi}^{\pi} f(x)  dx  = \
\frac{1}{...
...\pi}^{0} 0 \cdot  dx  + \
\frac{1}{\pi} \int_{0}^{\pi} 1 \cdot  dx  = 1,} $



$ a_n = \displaystyle{ \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)  \cos nx  dx  = \...
...\cos nx  dx  + \
\frac{1}{\pi} \int_{0}^{\pi} 1 \cdot \cos nx  dx  = \\
}$



$ =  \displaystyle{ \biggl. \frac{1}{\pi} \frac{1}{n} \sin nx
\biggr\vert^{\pi}_0  =  \frac{1}{n\pi} (\sin n\pi - \sin 0)  =  0} ,$



and



$ b_n = \displaystyle{ \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)  \sin nx  dx  = \...
... \sin nx  dx  + \
\frac{1}{\pi} \int_{0}^{\pi} 1 \cdot \sin nx  dx  = \ }$



$ =  \displaystyle{ \biggl. \frac{1}{\pi} ( -\frac{1}{n}) \cos nx
\biggr\vert^...
...=  - \frac{1}{n\pi} (\cos n\pi - \cos 0)  = \
\frac{1}{n\pi} (1 - (-1)^n),
}$



whence

\begin{displaymath}b_n =
\displaystyle{
\left \{
\begin{array}{cl}
\displaysty...
...
0 & {\mbox for}  n  {\mbox even.} \\
\end{array}\right .
}\end{displaymath}



The resulting Fourier series representation for $ f(x)$ on the interval $ (-\pi, \pi)$ is the following:



$\displaystyle f(x) \thicksim \displaystyle{ \frac{1}{2}  +  \sum_{n {\mbox  ...
...i} \sin x  +  \frac{2}{3\pi} \sin 3x  +  \frac{2}{5\pi} \sin 5x  + \ldots}$ (8)



Note that in the equation (8) in place of the expected "=" sign we see the "$ \thicksim$" sign instead. The paragraph below provides the explanation.


next up previous
Next: Points of discontinuity and Up: Fseries_1 Previous: Fourier coefficients for -periodic
Matthias Neufang 2002-09-18