A Painful Fourier Computation

Problem 1. Evaluate the Fourier series of the function f defined by f(t) := |t-1| on [-2, 2) with periodic extension f(t) = f(t+4).

(Click for Solution)

Solution. By definition of the absolute value function,

f(t) = \begin{cases} 1-t,\quad t \in [-2, 1], \\ t-1, \quad t \in [ 1, 2). \end{cases}

We first use this decomposition to compute the odd and even parts of f: for t > 0,

\displaystyle \begin{aligned} f_{\mathrm{even}}(t) &= \frac{f(t) + f(-t)}{2} = \begin{cases} 1, & t \in [0, 1], \\ t, & t \in [1, 2),\end{cases} \\ f_{\mathrm{odd}}(t) &= \frac{f(t) - f(-t)}{2} = \begin{cases} -t, & t \in [0, 1], \\ -1, & t \in [1, 2).\end{cases} \end{aligned}

Now integrating by parts,

\begin{aligned} \int u \cos u\, \mathrm du &= u \sin u + \cos u + C, \\ \int u \sin u\, \mathrm du &= -u \cos u +\sin u + C. \end{aligned}

Evaluating the Fourier coefficient a_0,

\begin{aligned} a_0 &= \frac 12 \int_{-2}^2 f(t)\, \mathrm dt = \frac 12 \int_{-2}^2 f_{\mathrm{even}}(t)\, \mathrm dt = \int_0^2 f_{\mathrm{even}}(t)\, \mathrm dt = \frac 52. \end{aligned}

Similarly, evaluating the Fourier coefficients a_n, b_n using the substitution u = n\pi t/ 2 where needed,

\begin{aligned} a_n &= \frac 12 \int_{-2}^2 f_{\text{even}}(t) \cos \left( \frac{n\pi t}{2} \right)\, \mathrm dt = \frac 2{n\pi} \int_0^{n \pi} f_{\text{even}}\left( \frac 2{n\pi} u \right) \cos u \, \mathrm du, \\ b_n &= \frac 12 \int_{-2}^2 f_{\text{odd}}(t) \sin \left( \frac{n\pi t}{2} \right)\, \mathrm dt = \frac 2{n\pi} \int_0^{n \pi} f_{\text{odd}}\left( \frac 2{n\pi} u \right) \sin u \, \mathrm du \end{aligned}

All that remains is evaluating these integrals piece-wise:

\begin{aligned}  \int_0^2 f_{\text{even}}\left( \frac 2{n\pi} u \right) \cos u \, \mathrm du  &= \int_0^{n\pi/2}  \cos u \, \mathrm du + \int_{n\pi/2}^{n\pi} \frac 2{n\pi} u \cos u \, \mathrm du \\ &= \left[\sin u \right]_0^{n\pi/2} + \frac 2{n\pi} \left[u \sin u - \cos u\right]_{n\pi/2}^{n\pi} \\ &= \sin \frac{n \pi} 2 + \frac 2{n\pi} \left(  \cos(n \pi) - \left( \frac{n \pi}{2} \sin \frac{n \pi}{2} + \cos \frac{n \pi}{2} \right)\right) \\ &= \frac 2{n\pi} \left((-1)^n - \left(  \cos \frac{n \pi}{2} \right)\right), \\ \int_0^2 f_{\text{odd}}\left( \frac 2{n\pi} u \right) \sin u \, \mathrm du &= -\frac 2{n\pi} \int_0^{n\pi/2} u \sin u \, \mathrm du - \int_{n\pi/2}^{n\pi} \sin u \, \mathrm du \\ &= -\frac 2{n\pi} \left[ -u \cos u + \sin u \right]_0^{n\pi/2} -  \left[-\cos u\right]_{n\pi/2}^{n\pi} \\ &= \frac 2{n\pi} \left[ u \cos u - \sin u \right]_0^{n\pi/2} +  \left[\cos u\right]_{n\pi/2}^{n\pi} \\ &= \frac 2{n\pi} \left(  \left( \frac{n \pi}{2} \cos \frac{n \pi}{2} - \sin \frac{n \pi}{2} \right) - \sin(n \pi) \right)  \\ & \phantom{==} + \left( \cos n\pi - \cos \frac{n \pi} 2\right) \\ &= -\frac 2{n\pi} \sin \frac{n \pi}{2}  + \cos n\pi = (-1)^n -\frac 2{n\pi} \sin \frac{n \pi}{2} . \end{aligned}

Therefore, we obtain the awfully long Fourier series

\begin{aligned} f(t) &= \frac 54 + \frac 2{n \pi} \sum_{n=1}^\infty \left[  \frac 2{n\pi} \left((-1)^n - \left(  \cos \frac{n \pi}{2} \right)\right) \cos \frac{n \pi t}{2} \right. \\ &\phantom{=========} \left.+ \left( (-1)^n -\frac 2{n\pi} \sin \frac{n \pi}{2} \right) \sin \frac{n \pi t}{2} \right]. \end{aligned}

This question was posed in one of my polytechnic’s final examinations.

—Joel Kindiak, 30 Aug 25, 2240H

,

Published by


Leave a comment