next up previous
Next: Note: Up: Fseries_1 Previous: Geometric interpretation of Fourier

Example 5

Sketch several periods of the given function and find its Fourier series:



\begin{displaymath}
f(x) =
\left \{
\begin{array}{rl}
-1, & -\pi < x < 0 \\
x,...
..., & x = -\pi,  0  {\mbox and}  \pi.\\
\end{array}\right .
\end{displaymath}



Solution:

The graph of $ f$ is sketched in Figure 4.

The values of $ f$ 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} \int_{-\pi}^{0} (-1)  dx  + \
\frac{1}{\pi} \int_{0}^{\pi} x  dx  =} $



$ =  \displaystyle{ \biggl. \frac{1}{\pi} (-\pi) + \frac{1}{\pi} \frac{x^2}{2}
\biggr\vert^{\pi}_0  =  -1 + \frac{\pi}{2}}.$



Calculation of $ a_n$ involves integration by parts:



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



$  = \displaystyle{\biggl. -\frac{1}{\pi} \frac{1}{n} \sin nx \biggr\vert^0_{-\...
...\biggl[\cos nx \biggr]_0^{\pi} =
\frac{1}{\pi n^2}\biggl[(-1)^n - 1 \biggr].
}$



Taking into account that $ \cos 0 = 1$, $ \sin n\pi = \sin (-n\pi) = 0$ and $ \cos n \pi = (-1)^n$, we finally obtain



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



Similarly, we calculate the coefficients $ b_n$:

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



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



$  +  \displaystyle{
\frac{1}{\pi}\biggl[\frac{1}{n^2} \sin n\pi - \frac{\pi}{n} \cos n\pi - 0 + 0 \biggr]  = \
}$



$  =  \displaystyle{
\frac{1}{n\pi}\biggl( 1 - (-1)^n\biggr) + \frac{1}{\pi}\b...
...os n\pi \biggr)  = \
\frac{1}{n\pi}\biggl( 1 - (-1)^n - \pi (-1)^n \biggr).
}$



Thus,



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



To ensure that the Fourier series converges to $ f(x)$ at every point $ x$, we need to redefine $ f$ at the points of discontinuity $ \pm 2n\pi, n = 0,1,2, \ldots$ to the average value $ f_{av} = -0.5$. Note that at the points $ \pm (2n + 1)\pi, n = 0,1,2, \ldots$, $ f(x) = f_{av} = 0$, and no change is required.



With $ f(x)$ redefined, we have

$ f(x) = \displaystyle{
- \frac{1}{2}  +  \frac{\pi}{4}  +  \sum_{{\mbox n \...
...ac{2}{\pi n^2} \cos nx +
(\frac{2}{n\pi} + \frac{1}{n}) \sin nx \biggr)  +
}$

$  +  \displaystyle{
\sum_{{\mbox n  even}} (- \frac{1}{n}) \sin nx = - \frac...
...\frac{\pi}{4}  - \frac{2}{\pi} \cos x \
+  (\frac{2}{\pi} + 1) \sin x  -
}$

$ \displaystyle{
- \frac{1}{2} \sin 2x  -  \frac{2}{9\pi} \cos 3x \
+  (\frac{2}{3\pi} + \frac{1}{3}) \sin 3x  -  \frac{1}{4} \sin 4x  -  \ldots
}$


next up previous
Next: Note: Up: Fseries_1 Previous: Geometric interpretation of Fourier
Matthias Neufang 2002-09-18