Fourier Series for Periods Other Than $2\pi $

Figure 2: Left: Plot of $f(x)=x$, periodic of period $2\pi $,Right: Plot of the Fourier series expansion for $N=2,4,8$.
\includegraphics[scale=0.85]{figures/4.6.ps} \includegraphics[scale=0.85]{figures/4.7.ps}
Examples:
  1. Let $f(x)=x$ be periodic between $-\pi$ and $\pi$. (See Figure 2left). Find the $A$s and $B$s of its Fourier expansion. For $A_0$;

    \begin{displaymath}
A_0=\frac{1}{\pi}\int_{-\pi}^{\pi} f(x)dx=\frac{1}{\pi}\int_{-\pi}^{\pi} xdx=\left[ \frac{x^2}{2\pi}\right] ^{\pi}_{-\pi}=0
\end{displaymath}

    For the other $A$s;

    \begin{displaymath}
A_n=\frac{1}{\pi}\int_{-\pi}^{\pi} xcos(nx)dx=0
\end{displaymath}

    For the other $B$s;

    \begin{displaymath}
B_n=\frac{1}{\pi}\int_{-\pi}^{\pi} xsin(nx)dx=\frac{2(-1)^{n+1}}{n},~n=1,2,3,\ldots
\end{displaymath}

    We then have

    \begin{displaymath}
x\approx 2\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n} sin(nx),~-\pi<x<\pi
\end{displaymath}

    Figure 2right shows how the series approximates to the function when only two, four, or eight terms are used.
  2. Find the Fourier coefficients for $f(x)= \vert x\vert$ on $-\pi$ to $\pi$;

    \begin{displaymath}
A_0=\frac{1}{\pi}\int_{-\pi}^{0} -xdx+\frac{1}{\pi}\int_{0}^{\pi} xdx=\pi
\end{displaymath}


    \begin{displaymath}
A_n=\frac{1}{\pi}\int_{-\pi}^{0} (-x)cos(nx)dx+\frac{1}{\pi}...
...c{-4}{(n^2\pi)}, & n=1,3,5,\ldots\\
\end{array}\right\rbrace
\end{displaymath}


    \begin{displaymath}
B_n=\frac{1}{\pi}\int_{-\pi}^{0} (-x)sin(nx)dx+\frac{1}{\pi}\int_{0}^{\pi} (x)sin(nx)dx=0
\end{displaymath}

    Because the definite integrals are nonzero only for odd values of $n$, it simplifies to change the index of the summation. The Fourier series is then

    \begin{displaymath}
\vert x\vert\approx\frac{\pi}{2}-\frac{4}{\pi}\sum_{n=1}^{\infty} \frac{cos(2n-1)x}{(2n-1)^2}
\end{displaymath}

    Figure 3 shows how the series approximates the function when two, four, or eight terms are used.
    Figure 3: Plot of Fourier series for $\vert x\vert$ for $N=2,4,8$.
    \includegraphics[scale=1]{figures/4.8.ps}
  3. Find the Fourier coefficients for $f(x) = x(2 - x)=2x - x^2$ over the interval [-2, 2] if it is periodic of period 4. Equations 7 and 8 apply.

    \begin{displaymath}
A_0=\frac{2}{4}\int_{-2}^{2}(2x-x^2)dx=\frac{-8}{3}
\end{displaymath}


    \begin{displaymath}
A_n=\frac{2}{4}\int_{-2}^{2} (2x-x^2)cos\left( \frac{n\pi x}{2}\right) dx=\frac{16(-1)^{n+1}}{n^2\pi^2},~n=1,2,3,\ldots
\end{displaymath}


    \begin{displaymath}
B_n=\frac{2}{4}\int_{-2}^{2} (2x-x^2)sin\left( \frac{n\pi x}{2}\right) dx=\frac{8(-1)^{n+1}}{n\pi},~n=1,2,3,\ldots
\end{displaymath}


    \begin{displaymath}
x(2-x)\approx \frac{-4}{3}+\frac{16}{\pi^2}\sum_{n=1}^{\inft...
...{\infty}\frac{(-1)^{n+1}}{n}sin\left( \frac{n\pi x}{2}\right)
\end{displaymath}

    Figure 4 shows how the series approximates to the function when 40 terms are used.
    Figure 4: Plot of Fourier series for $x(2-x)$ for $N=40$.
    \includegraphics[scale=1]{figures/4.9.ps}
With MATLAB,

\includegraphics[scale=1.3]{figures/4-15}
Cem Ozdogan 2010-12-29