Differential Equations for EngineersXYZ Homework Edition

⇩ Download ▾

4.3 More on the Fourier Series

Before reading the lecture, it may be good to first try Project IV (Fourier series) from the IODE website: https://conf.math.illinois.edu/iode/fsgui.html. After reading the lecture it may be good to continue with Project V (Fourier series again).

2L-Periodic Functions

We have computed the Fourier series for a 2π2 \pi-periodic function, but what about functions of different periods. Well, fear not, the computation is a simple case of change of variables. We can just rescale the independent axis. Suppose that we have a 2L2L-periodic function f(t)f(t) (LL is called the half period). Let S=πLtS= \dfrac{\pi}{L}t. Then the function

g ( s ) = f ( L π s ) g(s)=f \left( \dfrac{L}{\pi}s \right) \nonumber

is 2π2 \pi-periodic. We want to also rescale all our sines and cosines. We want to write

f ( t ) = a 0 2 + n = 1 a n cos ( n π L t ) + b n sin ( n π L t ) . f(t)= \dfrac{a_0}{2}+ \sum_{n=1}^{\infty}a_n \cos \left( \dfrac{n \pi}{L}t \right) + b_n \sin \left( \dfrac{n \pi}{L}t \right). \nonumber

If we change variables to ss we see that

g ( s ) = a 0 2 + n = 1 a n cos ( n s ) + b n sin ( n s ) . g(s)= \dfrac{a_0}{2}+ \sum_{n=1}^{\infty}a_n \cos(ns) + b_n \sin(ns). \nonumber

We compute ana_n and bnb_n as before. After we write down the integrals we change variables from ss back to tt.

a 0 = 1 π π π g ( s ) d s = 1 L L L f ( t ) d t , a n = 1 π π π g ( s ) cos ( n s ) d s = 1 L L L f ( t ) cos ( n π L t ) d t , b n = 1 π π π g ( s ) sin ( n s ) d s = 1 L L L f ( t ) sin ( n π L t ) d t . \begin{aligned} a_0 &= \dfrac{1}{\pi} \int_{-\pi}^{\pi}g(s)ds=\dfrac{1}{L} \int_{-L}^{L}f(t)dt, \\ a_n &= \dfrac{1}{\pi} \int_{-\pi}^{\pi}g(s) \cos(ns)ds=\dfrac{1}{L} \int_{-L}^{L}f(t) \cos \left( \dfrac{n \pi}{L}t \right)dt, \\ b_n &= \dfrac{1}{\pi} \int_{-\pi}^{\pi}g(s) \sin(ns)ds=\dfrac{1}{L} \int_{-L}^{L}f(t) \sin \left( \dfrac{n \pi}{L}t \right)dt. \end{aligned} \nonumber

The two most common half periods that show up in examples are π\pi and 11 because of the simplicity. We should stress that we have done no new mathematics, we have only changed variables. If you understand the Fourier series for 2π2 \pi-periodic functions, you understand it for 2L2L-periodic functions. All that we are doing is moving some constants around, but all the mathematics is the same.

Convergence

We will need the one sided limits of functions. We will use the following notation

f ( c ) = lim t c f ( t ) , and f ( c + ) = lim t c f ( t ) . f(c-) = \lim_{t \uparrow c} f(t), \qquad \text{and} \qquad f(c+) = \lim_{t \downarrow c} f(t). \nonumber

If you are unfamiliar with this notation, limtcf(t)\lim_{t \uparrow c} f(t) means we are taking a limit of f(t)f(t) as tt approaches cc from below (i.e. t<ct<c) and limtcf(t)\lim_{t \downarrow c} f(t) means we are taking a limit of f(t)f(t) as tt approaches cc from above (i.e. t>ct>c). For example, for the square wave function

f ( t ) = { 0 i f π < t 0 , π i f 0 < t π , \label{eq:12} f(t)= \left\{ \begin{array}{ccc} 0 & \rm{if}& - \pi < t \leq 0, \\ \pi & \rm{if} & 0 < t \leq \pi, \end{array} \right.

(4.3.1)

we have f(0)=0f(0-)=0 and f(0+)=πf(0+)= \pi.

Let f(t)f(t) be a function defined on an interval [a,b][a,b]. Suppose that we find finitely many points a=t0,t1,t2,,tk=ba=t_0, t_1, t_2, \ldots, t_k=b in the interval, such that f(t)f(t) is continuous on the intervals (t0,t1),(t1,t2),,(tk1,tk)(t_0,t_1), (t_1,t_2), \ldots, (t_{k-1},t_k). Also suppose that all the one sided limits exist, that is, all of f(t0+),f(t1),f(t1+),f(t2),f(t2+),,f(tk)f(t_0+), f(t_1-), f(t_1+), f(t_2-), f(t_2+), \ldots, f(t_k-) exist and are finite. Then we say f(t)f(t) is piecewise continuous.

If moreover, f(t)f(t) is differentiable at all but finitely many points, and f(t)f'(t) is piecewise continuous, then f(t)f(t) is said to be piecewise smooth.

If we happen to have that f(t)=f(t)+f(t+)2f(t)= \dfrac{f(t-)+f(t+)}{2} at all the discontinuities, the Fourier series converges to f(t)f(t) everywhere. We can always just redefine f(t)f(t) by changing the value at each discontinuity appropriately. Then we can write an equals sign between f(t)f(t) and the series without any worry. We mentioned this fact briefly at the end last section.

Note that the theorem does not say how fast the series converges. Think back to the discussion of the Gibbs phenomenon in the last section. The closer you get to the discontinuity, the more terms you need to take to get an accurate approximation to the function.

Differentiation and Integration of Fourier Series

Not only does Fourier series converge nicely, but it is easy to differentiate and integrate the series. We can do this just by differentiating or integrating term by term.

It is important that the function is continuous. It can have corners, but no jumps. Otherwise the differentiated series will fail to converge. For an exercise, take the series obtained for the square wave and try to differentiate the series. Similarly, we can also integrate a Fourier series.

Note that the series for F(t)F(t) is no longer a Fourier series as it contains the a0t2\dfrac{a_0 t}{2} term. The antiderivative of a periodic function need no longer be periodic and so we should not expect a Fourier series.

Rates of Convergence and Smoothness

Let us do an example of a periodic function with one derivative everywhere.

Let us compute the Fourier series coefficients. The actual computation involves several integration by parts and is left to student.

a 0 = 1 1 f ( t ) d t = 1 0 ( t + 1 ) t d t + 0 1 ( 1 t ) t d t = 0 , a n = 1 1 f ( t ) cos ( n π t ) d t = 1 0 ( t + 1 ) t cos ( n π t ) d t + 0 1 ( 1 t ) t cos ( n π t ) d t = 0 b n = 1 1 f ( t ) sin ( n π t ) d t = 1 0 ( t + 1 ) t sin ( n π t ) d t + 0 1 ( 1 t ) t sin ( n π t ) d t = 4 ( 1 ( 1 ) n ) π 3 n 3 = { 8 π 3 n 3 i f n i s o d d , 0 i f n i s e v e n . \begin{align}\begin{aligned} a_0 &= \int_{-1}^1 f(t)dt= \int_{-1}^0 (t+1)tdt+ \int_{0}^1 (1-t)tdt=0, \\ a_n &= \int_{-1}^1 f(t) \cos(n \pi t)dt= \int_{-1}^0 (t+1)t \cos(n \pi t)dt+ \int_{0}^1 (1-t)t \cos(n \pi t)dt=0 \\ b_n &= \int_{-1}^1 f(t) \sin(n \pi t)dt= \int_{-1}^0 (t+1)t \sin(n \pi t)dt+ \int_{0}^1 (1-t)t \sin(n \pi t)dt \\ &= \dfrac{4(1-(-1)^n)}{\pi^3 n^3}= \left\{ \begin{array}{cc} \dfrac{8}{\pi^3 n^3} & {\rm{~if~}} {\it{n}} {\rm{~is~odd,}}\\ 0 & {\rm{~if~}} {\it{n}} {\rm{~is~even.}} \end{array} \right.\end{aligned}\end{align} \nonumber

That is, the series is

n = 1 n o d d 8 π 3 n 3 sin ( n π t ) . \sum_{\underset{n~ \rm{odd}}{n=1}}^{\infty} \dfrac{8}{\pi^3 n^3} \sin(n \pi t). \nonumber

This series converges very fast. If you plot up to the third harmonic, that is the function

8 π 3 sin ( π t ) + 8 27 π 3 sin ( 3 π t ) , \dfrac{8}{\pi^3} \sin(\pi t)+ \dfrac{8}{27 \pi^3} \sin(3 \pi t), \nonumber

it is almost indistinguishable from the plot of f(t)f(t) in Figure 3\PageIndex{3}. In fact, the coefficient 827π3\dfrac{8}{27 \pi^3} is already just 0.0096 (approximately). The reason for this behavior is the n3n^3 term in the denominator. The coefficients bnb_n in this case go to zero as fast as 1n3\dfrac{1}{n^3} goes to zero.

For functions constructed piecewise from polynomials as above, it is generally true that if you have one derivative, the Fourier coefficients will go to zero approximately like 1n3\dfrac{1}{n^3}. If you have only a continuous function, then the Fourier coefficients will go to zero as 1n2\dfrac{1}{n^2}. If you have discontinuities, then the Fourier coefficients will go to zero approximately as 1n\dfrac{1}{n}. For more general functions the story is somewhat more complicated but the same idea holds, the more derivatives you have, the faster the coefficients go to zero. Similar reasoning works in reverse. If the coefficients go to zero like 1n2\dfrac{1}{n^2} you always obtain a continuous function. If they go to zero like 1n3\dfrac{1}{n^3} you obtain an everywhere differentiable function.

To justify this behavior, take for example the function defined by the Fourier series

f ( t ) = n = 1 1 n 3 sin ( n t ) . f(t)= \sum_{n=1}^{\infty} \dfrac{1}{n^3} \sin(nt). \nonumber

When we differentiate term by term we notice

f ( t ) = n = 1 1 n 2 cos ( n t ) . f'(t)= \sum_{n=1}^{\infty} \dfrac{1}{n^2} \cos(nt). \nonumber

Therefore, the coefficients now go down like 1n2\dfrac{1}{n^2}, which means that we have a continuous function. The derivative of f(t)f'(t) is defined at most points, but there are points where f(t)f'(t) is not differentiable. It has corners, but no jumps. If we differentiate again (where we can) we find that the function f(t)f''(t), now fails to be continuous (has jumps)

f ( t ) = n = 1 1 n sin ( n t ) . f''(t)= \sum_{n=1}^{\infty} \dfrac{-1}{n} \sin(nt). \nonumber

This function is similar to the sawtooth. If we tried to differentiate the series again we would obtain

n=1cos(nt),\sum_{n=1}^{\infty} - \cos(nt), \nonumber

 which does not converge!

Adapted from Differential Equations for Engineers by Jiří Lebl (https://www.jirka.org/diffyqs/), © Jiří Lebl, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.