Skip to main content

Exercises 5.7 Exercise

1.

Expand the following functions in a cosine series and a sine series:
  1. \(f(x) = x\) when \(0 \lt x \lt \pi\)
  2. \(f(x) = \pi-x\) when \(0 \lt x \lt \pi\text{.}\)
Answer.
  1. \begin{equation*} \frac{\pi}{2}-\frac{4}{\pi}+\left(\cos x+\frac{\cos 3x}{3^{2}}+ \frac{\cos 5x}{5^{2}}+\cdots\right), \end{equation*}
    \begin{equation*} 2\left(\sin x-\frac{\sin 2x}{2}+ \frac{\sin 3x}{3}-\cdots\right). \end{equation*}
  2. \begin{equation*} 2\left(\sin x-\frac{\sin 2x}{2}+ \frac{\sin 3x}{3}-\cdots\right), \end{equation*}
    \begin{equation*} \frac{\pi}{2}-\frac{4}{\pi}+\left(\cos x+\frac{\cos 3x}{3^{2}}+ \frac{\cos 5x}{5^{2}}+\cdots\right) \end{equation*}

2.

Expand the following function \(f(x) x\sin x\) in the Fourier series in the interval \(-\pi \lt x \lt \pi\text{.}\)
Answer.
\begin{equation*} 1-2\left(-\frac{\cos x}{4}+ \frac{\cos 2x}{1\cdot 3}-\frac{\cos 3x}{2\cdot 4}+\frac{\cos 4x}{3\cdot 5}-\cdots\right). \end{equation*}

3.

Find the Fourier series representation of the half wave rectifier given by the following function:
\begin{equation*} f(x) = \begin{cases} \sin \omega t, & \text{for} \quad 0 \leq \omega t \leq \pi\\ 0, & \text{for} \quad -\pi \leq \omega t \leq 0 \end{cases} \end{equation*}
Hint.
\begin{equation*} f(t) = \begin{cases} 0, & \text{from} \quad -T/2 \leq t \leq 0\\ \sin \omega t, & \text{from} \quad 0 \leq t \leq T/2 \end{cases} \end{equation*}
Answer.
hence,
\begin{equation*} f(t) = \frac{1}{\pi}+\frac{\sin\omega t}{2}-\frac{2}{\pi}\left[\frac{\cos 2\omega t}{1\cdot 3}\right. \end{equation*}
\begin{equation*} \left. +\frac{\cos 4\omega t}{3\cdot 5}+\frac{\cos 6\omega t}{5\cdot 7}+\cdots \right] \end{equation*}

4.

Find the Fourier series representation of a full wave rectifier given by the following function:
\begin{equation*} f(t) = \begin{cases} i_{o}\sin\omega t, & \text{from} \quad 0 \leq t \leq T/2\\ -i_{o}\sin\omega t, & \text{from} \quad T/2 \leq t \leq T \end{cases} \end{equation*}
Answer.
\begin{equation*} f(t) = i-\frac{2 i_{o}}{\pi}-\frac{4i_{o}}{3\pi}\cos 2\omega t \end{equation*}
\begin{equation*} - \frac{4i_{o}}{15\pi}\cos 4\omega t -\frac{4i_{o}}{35\pi}\cos 6\omega t - \cdots \end{equation*}

5.

Develop the Fourier expansion for a triangular wave represented by the following function:
\begin{equation*} f(x) = \begin{cases} -x, & \text{from} \quad -\pi \lt x \lt 0\\ x, & \text{from} \quad 0 \lt x \lt \pi \end{cases} \end{equation*}
Answer.
\begin{equation*} f(x) = \frac{\pi}{2}-\frac{4}{\pi}\sum\limits_{n_{odd}=1}^{\infty}\frac{1}{n^{2}}\cos nx. \end{equation*}

6.

Determine the Fourier series expansion of the function \(f(x) = |x|\text{,}\) for \(-\pi \leq x \leq \pi\text{.}\) Hence deduce that
\begin{equation*} \frac{\pi^{2}}{8}=1+\frac{1}{3^{2}}+\frac{1}{5^{2}}+\frac{1}{7^{2}}+\cdots. \end{equation*}

Python Code 1.

from sympy import fourier_series, pi, plot from sympy.abc import x f = x s = fourier_series(f, (x, 0, pi)) s1 = s.truncate(n = 5) s2 = s.truncate(n = 7) s3 = s.truncate(n = 9) p = plot(f, s1, s2, s3, (x, 0, pi), show=False, legend=True) s
p.show()
python code
 1 
docs.sympy.org/latest/modules/series/fourier.html#sympy.series.fourier.FourierSeries