Fourier series

A Fourier series is a mathematical tool that represents a function, which is periodic on a specific interval, as a linear combination of cosine and sine waves.

Consider the trigonometric functions \(\small{g(x)=cos\biggr(\frac{2\pi nx}{L}\biggr)}\) and \(\small{h(x)=sin\biggr(\frac{2\pi nx}{L}\biggr)}\) that are periodic on the interval \(0\leq x\leq L\):

$$g(x)=cos\biggr[\frac{2\pi n(x+L)}{L}\biggr]=cos\biggr(\frac{2\pi nx}{L}+2\pi n\biggr)=cos\biggr(\frac{2\pi nx}{L}\biggr)$$

$$h(x)=sin\biggr[\frac{2\pi n(x+L)}{L}\biggr]=sin\biggr(\frac{2\pi nx}{L}+2\pi n\biggr)=sin\biggr(\frac{2\pi nx}{L}\biggr)$$

 

Question

i) What is the period of \(h(x)=sin(bx)\)?

ii) Show that the sum of two periodic functions produces another periodic function if the ratio of the periods of the component functions is a rational number.

Answer

i) The period is the interval after which the range of the function repeats itself. The sine wave completes one full cycle when \(bx=2\pi\), which happens when \(\small{x=\frac{2\pi}{b}}\). Hence, the period of \(h(x)\) is \(\small{\frac{2\pi}{b}}\).

ii) Let \(p(x)=cos(ax)\) and \(q(x)=sin(bx)\) with periods \(\small{\frac{2\pi}{a}}\) and \(\small{\frac{2\pi}{b}}\), respectively, where \(a,b\neq 0\). For all \(x\) , the output of the function \(f(x)=Acos(ax)+Bsin(bx)\) repeats itself when

$$\begin{align*}f(x)&=Acos\biggr[a\biggr(x+m\frac{2\pi }{a}\biggr)\biggr]+Bsin\biggr[b\biggr(x+n\frac{2\pi }{b}\biggr)\biggr]\\&=Acos(ax+m2\pi)+Bsin(bx+n2\pi)\\&=Acos(ax)+Bsin(bx)\end{align*}$$

where \(m,n\in \mathbb{Z}\).

In other words, the period of \(f(x)\) is \(\small{T=m\frac{2\pi}{a}=n\frac{2\pi}{b}}\), which implies that \(\small{\frac{m}{n}=\frac{a}{b}}\). Therefore, \(\small{\frac{a}{b}}\) and hence \(\small{\frac{2\pi}{b}/\frac{2\pi}{a}}\) must be a rational number.

 

The linear combination \(\small{f(x)=Ag(x)+Bh(x)=Acos\biggr(\frac{2\pi nx}{L}\biggr)+Bsin\biggr(\frac{2\pi nx}{L}\biggr)}\) is a periodic function since the ratio of the periods of the cosine and sine functions is a rational number. It follows that \(\small{f(x)+Ccos\biggr(\frac{2\pi nx}{L}\biggr)}\) is also a periodic function. Therefore, we can express a function that is periodic on the interval \(0\leq x\leq L\) as an infinite sum of cosine and sine functions:

$$\begin{align*}f(x)&=\sum_{n=0}^{\infty}\biggr[a_ncos\biggr(\frac{2\pi nx}{L}\biggr)+b_nsin\biggr(\frac{2\pi nx}{L}\biggr)\biggr]\\&=a_0+\sum_{n=1}^{\infty}\biggr[a_ncos\biggr(\frac{2\pi nx}{L}\biggr)+b_nsin\biggr(\frac{2\pi nx}{L}\biggr)\biggr]\;\;\;\;\;\;\;\;105\end{align*}$$

Eq105 is known as a Fourier series. Many periodic waveforms, such as rectangular waves, can be represented by it (see diagram below).

To find \(a_0\), we integrate eq105 with respect to \(x\) over the interval \(L\):

$$\int_0^Lf(x)dx=\int_0^L\biggr\{a_0+\sum_{n=1}^{\infty}\biggr[a_ncos\biggr(\frac{2\pi nx}{L}\biggr)+b_nsin\biggr(\frac{2\pi nx}{L}\biggr)\biggr]\biggr\}dx$$

The cosine and sine functions have the period of \(L/n\). As we are integrating over \(n\) multiples of \(L/n\), we have \(\small{a_n\int_0^Lcos\biggr(\frac{2\pi nx}{L}\biggr)dx=b_n\int_0^Lsin\biggr(\frac{2\pi nx}{L}\biggr)dx=0}\). Hence, \(\small{\int_0^Lf(x)dx=a_0L}\) or

$$a_0=\frac{1}{L}\int_0^Lf(x)dx\;\;\;\;\;\;\;\;106$$

To find \(a_n\), we multiply eq105 by \(\small{cos\biggr(\frac{2\pi mx}{L}\biggr)}\) and integrate with respect to \(x\) over the period \(L\):

$$\int_0^Lf(x)cos\biggr(\frac{2\pi mx}{L}\biggr)dx=\int_0^L\biggr\{a_0+\sum_{n=1}^{\infty}\biggr[a_ncos\biggr(\frac{2\pi nx}{L}\biggr)+b_nsin\biggr(\frac{2\pi nx}{L}\biggr)\biggr]\biggr\}cos\biggr(\frac{2\pi mx}{L}\biggr)dx$$

Since \(m\) is an integer, \(\small{a_0\int_0^Lcos\biggr(\frac{2\pi mx}{L}\biggr)dx=\frac{a_0L}{2\pi m}sin2\pi m=0}\). Using the trigonometric identity \(2sinAcosB=sin(A+B)+sin(A-B)\), we have \(\small{b_n\int_0^Lsin\biggr(\frac{2\pi nx}{L}\biggr)cos\biggr(\frac{2\pi mx}{L}\biggr)dx=\frac{b_n}{2}\int_0^L\biggr\{sin\biggr[(n+m)\frac{2\pi x}{L}\biggr]+sin\biggr[(n-m)\frac{2\pi x}{L}\biggr]\biggr\}dx=0}\) because we are again integrating over an integral number of complete periods for either sine function. Therefore,

$$\int_0^Lf(x)cos\biggr(\frac{2\pi mx}{L}\biggr)dx=\sum_{n=1}^{\infty}a_n\int_0^Lcos\biggr(\frac{2\pi nx}{L}\biggr)cos\biggr(\frac{2\pi mx}{L}\biggr)dx$$

Using the trigonometric identity of \(2cosAcosB=cos(A+B)+cos(A-B)\),

$$\int_0^Lf(x)cos\biggr(\frac{2\pi mx}{L}\biggr)dx=\sum_{n=1}^{\infty}\frac{a_n}{2}\int_0^L\biggr\{cos\biggr[(n+m)\frac{2\pi x}{L}\biggr]+cos\biggr[(n-m)\frac{2\pi x}{L}\biggr]\biggr\}dx\;\;\;\;\;\;\;\;107$$

Since we are again integrating over an integral number of complete periods for either cosine function, all the terms in the summation equals zero except when \(n=m\). We have \(\small{\int_0^Lf(x)cos\biggr(\frac{2\pi mx}{L}\biggr)dx=\frac{a_m}{2}\int_0^Ldx=\frac{a_m}{2}L}\) or

$$a_n=\frac{2}{L}\int_0^Lf(x)cos\biggr(\frac{2\pi nx}{L}\biggr)dx\;\;\;\;\;\;n=1,2,\cdots\;\;\;\;\;\;\;\;108$$

where we have relabelled the index from \(m\) to \(n\).

To find \(b_n\), we multiply eq105 by \(\small{sin\biggr(\frac{2\pi mx}{L}\biggr)}\) and integrate with respect to \(x\) over the period \(L\). Using the same logic as the derivation of eq108 and the trigonometric identity \(2sinAsinB=cos(A-B)-cos(A+B)\), we have

$$b_n=\frac{2}{L}\int_0^Lf(x)sin\biggr(\frac{2\pi nx}{L}\biggr)dx\;\;\;\;\;\;n=1,2,\cdots\;\;\;\;\;\;\;\;109$$

 

Question

i) Can a Fourier series be defined for a function that is periodic on the interval \(\small{-\frac{L}{2}\leq x\leq \frac{L}{2}}\) instead of \(0\leq x\leq L\)?

ii) Can we represent a periodic function of period \(L\) with a Fourier series on the interval \(0\leq x\leq 2L\) instead of \(0\leq x\leq L\)?

Answer

i) Yes, the representation is the same as eq105 but has slightly different formulae for the coefficients. Repeating the above steps in determining the coefficients, we have

$$a_0=\frac{1}{L}\int_{-L/2}^{L/2}f(x)dx\;\;\;\;\;\;\;\;109a$$

$$a_n=\frac{2}{L}\int_{-L/2}^{L/2}f(x)cos\biggr(\frac{2\pi nx}{L}\biggr)dx\;\;\;\;\;\;\;\;109b$$

$$b_n=\frac{2}{L}\int_{L/2}^{L/2}f(x)sin\biggr(\frac{2\pi nx}{L}\biggr)dx\;\;\;\;\;\;\;\;109c$$

ii) Yes. However, the Fourier series representation is \(f(x)=a_0+\sum_{n=1}^{\infty}\biggr[a_ncos\biggr(\frac{\pi nx}{L}\biggr)+b_nsin\biggr(\frac{\pi nx}{L}\biggr)\biggr]\), which is slightly different from eq105. The corresponding coefficients are \(\small{a_0=\frac{1}{2L}\int_0^{2L}f(x)dx}\), \(\small{a_n=\frac{1}{L}\int_0^{2L}f(x)cos\biggr(\frac{\pi nx}{L}\biggr)dx}\) and \(\small{b_n=\frac{1}{L}\int_0^{2L}f(x)sin\biggr(\frac{\pi nx}{L}\biggr)dx}\). The function in this representation now repeats every \(2L\) instead of every \(L\).

 

The fourier series can also be expressed in the complex form. Substituting the identities \(\small{cosy=\frac{e^{iy}+e^{-iy}}{2}}\) and \(\small{siny=\frac{e^{iy}-e^{-iy}}{2i}}\), where \(\small{y=\frac{2\pi nx}{L}}\) in eq105, we have

$$f(x)=a_0+\sum_{n=1}^{\infty}\biggr[\biggr(\frac{a_n-ib_n}{2}\biggr)e^{iy}+\biggr(\frac{a_n+ib_n}{2}\biggr)e^{-iy}\biggr]\;\;\;\;\;\;\;\;110$$

Let \(\small{c_n=\frac{a_n-ib_n}{2}}\) and \(\small{c_{-n}=\frac{a_{-n}-ib_{-n}}{2}}\), where \(n=1,2,\cdots\). From eq108, \(a_{-n}=\frac{2}{L}\int_0^Lf(x)cos(-y)dx=\frac{2}{L}\int_0^Lf(x)cos(y)dx=a_n\). Similarly, from eq109, \(b_{-n}=-b_n\). Therefore, \(\small{c_{-n}=\frac{a_{n}+ib_{n}}{2}}\) and eq110 becomes

$$f(x)=c_0+\sum_{n=1}^{\infty}c_ne^{i\frac{2\pi nx}{L}}+\sum_{n=1}^{\infty}c_{-n}e^{-i\frac{2\pi nx}{L}}\;\;\;\;\;\;\;\;111$$

where we have relabelled the constant \(a_0\) as \(c_0\) without loss of generality (see Q&A below).

If we let the dummy index \(n=-k\) for the second summation and subsequently relabel \(k\) as \(n\), we have

$$f(x)=c_0+\sum_{n=1}^{\infty}c_ne^{i\frac{2\pi nx}{L}}+\sum_{k=-1}^{-\infty}c_{k}e^{i\frac{2\pi kx}{L}}=c_0+\sum_{n=1}^{\infty}c_ne^{i\frac{2\pi nx}{L}}+\sum_{n=-1}^{-\infty}c_{n}e^{i\frac{2\pi nx}{L}}$$

Therefore, \(f(x)\) can be expressed as

$$f(x)=\sum_{n=-\infty}^{\infty}c_{n}e^{i\frac{2\pi nx}{L}}\;\;\;\;\;\;\;\;112$$

To find \(c_n\), we substitute eq108 and eq109 in \(\small{c_n=\frac{a_n-ib_n}{2}}\) to give

$$c_n=\frac{1}{L}\int_0^Lf(x)e^{-i\frac{2\pi nx}{L}}dx\;\;\;\;\;\;\;\;113$$

 

Question

i) Show that \(c_0=a_0\).

ii) What is the corresponding equation for eq113 if \(f(x)\) is periodic on the interval \(\small{-\frac{L}{2}\leq x\leq \frac{L}{2}}\) instead of \(0\leq x\leq L\)?

Answer

i) From eq113, \(c_0=\frac{1}{L}\int_0^Lf(x)dx\). Comparing this equation with eq106, \(c_0=a_0\). This implies that eq113 is valid for all \(n\), including \(n=0\) even though the derivation involves \(\small{c_n=\frac{a_n-ib_n}{2}}\), which is for \(n=1,2,\cdots\).

ii) Repeating the above steps for the derivation of the complex form of a Fourier series using eq109a, eq109b and eq109c, we have

$$c_n=\frac{1}{L}\int_{-L/2}^{L/2}f(x)e^{-i\frac{2\pi nx}{L}}dx\;\;\;\;\;\;\;\;114$$

 

Next article: Fourier transform
Previous article: Vibrational selection rules for molecules
Content page of vibrational spectroscopy
Content page of advanced chemistry

Leave a Reply

Your email address will not be published. Required fields are marked *

Mono Quiz