Chapter 7

Fourier Series and Transforms

7.1Even and Odd Functions

Definition - Even and Odd Functions
  • A function \( f(x) \) is said to be even if

    \begin{equation} f(-x) = f(x). \end{equation}
  • A function \( f(x) \) is said to be odd if

    \begin{equation} f(-x) = -f(x). \end{equation}

Properties of Integrals over Symmetric Limits:

\begin{equation} \boxed{ \begin{aligned} &\text{If } f(x) \text{ is even:} && \int_{-L/2}^{L/2} f(x)\,dx = 2\int_{0}^{L/2} f(x)\,dx, \\[6pt] &\text{If } f(x) \text{ is odd:} && \int_{-L/2}^{L/2} f(x)\,dx = 0. \end{aligned} } \end{equation}
Remark

In general, any function \( f(x) \) can be expressed as the sum of an even and an odd function:

\begin{equation} \boxed{ f(x) = \frac{1}{2}\big[f(x) + f(-x)\big] + \frac{1}{2}\big[f(x) - f(-x)\big]. } \end{equation}

The first term is the even part of \( f(x) \), and the second term is the odd part.

7.2Periodic Functions and Fourier Series

Definition - Periodic Function

A function \( f(x) \) is said to be periodic with period \(L>0\) if

\begin{equation} \boxed{f(x+L) = f(x)} \quad \text{for all } x. \end{equation}

The smallest positive \(L\) satisfying this relation is called the fundamental period.

A periodic function of period L: the same shape repeats on every interval of length L.
Figure 7.1. A periodic function of period \(L\): the same shape repeats on every interval of length \(L\).
Remark

Common periodic functions include

\begin{equation} \sin\!\left(\tfrac{2\pi x}{L}\right), \quad \cos\!\left(\tfrac{2\pi x}{L}\right), \quad e^{\,i\,\tfrac{2\pi x}{L}}, \end{equation}

all sharing the same fundamental period \(L\).

Definition - Average Value of a Function

For a periodic function \( f(x) \) of period \( L \), the average value (or mean value) of the function over one period is defined as

\begin{equation} \boxed{ \langle f \rangle = \frac{1}{L}\int_{-L/2}^{L/2} f(x)\,dx. } \end{equation}

7.2.1Fundamental Periodic Basis

For the exponential function \( e^{ikx} \) to have period \(L\),

\begin{equation} e^{ik(x+L)} = e^{ikx} \quad \Rightarrow \quad e^{ikL} = 1. \end{equation}

Since \( e^{i2\pi n}=1 \) for integers \(n\), we have

\begin{equation} \boxed{k_n = \frac{2\pi n}{L}}, \qquad n=0,\pm1,\pm2,\ldots \end{equation}

Thus, the functions

\begin{equation} \boxed{e^{i k_n x} = e^{i \frac{2\pi n x}{L}}} \end{equation}

form a complete orthogonal set over one period.

Remark - Orthogonality
\begin{equation} \int_{-L/2}^{L/2} e^{i k_m x}\, e^{-i k_n x}\,dx = L\,\delta_{mn}. \end{equation}

7.2.2Complex Fourier Series

Definition - Complex Fourier Series

A periodic function \( f(x) \) of period \(L\) can be represented as

\begin{equation} \boxed{ f(x) = \sum_{n=-\infty}^{\infty} c_n\, e^{i k_n x}}, \qquad k_n = \frac{2\pi n}{L}, \end{equation}

where the coefficients are

\begin{equation} \boxed{ c_n = \frac{1}{L}\int_{-L/2}^{L/2} f(x)\,e^{-i k_n x}\,dx.} \end{equation}

Starting from \( f(x) = \sum c_n e^{i k_n x} \), multiply by \( e^{-i k_m x} \) and integrate:

\begin{equation} \int_{-L/2}^{L/2} f(x)e^{-i k_m x}\,dx = \sum_n c_n \!\int_{-L/2}^{L/2} e^{i(k_n-k_m)x}\,dx = L\,c_m, \end{equation}

by orthogonality. Hence,

\begin{equation} \boxed{c_m = \frac{1}{L}\int_{-L/2}^{L/2} f(x)\,e^{-i k_m x}\,dx.} \end{equation}
Remark

For a real-valued function \( f(x) \), the complex coefficients satisfy

\begin{equation} c_{-n} = c_n^*. \end{equation}

7.2.3Real Form of the Fourier Series

Theorem - Real Form of the Fourier Series
\begin{equation} \boxed{ f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} \Big[ a_n\cos\!\left(\frac{2\pi n x}{L}\right) + b_n\sin\!\left(\frac{2\pi n x}{L}\right) \Big]. } \end{equation}

Starting from the complex Fourier series.

We begin with the complex form of the Fourier series for a periodic function \( f(x) \) of period \( L \):

\begin{equation} f(x) = \sum_{n=-\infty}^{\infty} c_n\, e^{i k_n x}, \qquad \text{where } k_n = \frac{2\pi n}{L}. \end{equation}

We separate the \( n=0 \) term and rearrange positive and negative indices:

\begin{equation} f(x) = c_0 + \sum_{n=1}^{\infty} \left( c_n e^{i k_n x} + c_{-n} e^{-i k_n x} \right). \end{equation}

Using \( c_{-n} = c_n^* \), we have

\begin{equation} f(x) = c_0 + \sum_{n=1}^{\infty} \left( c_n e^{i k_n x} + c_n^* e^{-i k_n x} \right). \end{equation}

Expressing in terms of sine and cosine.

Let

\begin{equation} c_0 = \frac{a_0}{2} \qquad c_n = \frac{1}{2}\left( a_n - i b_n \right), \qquad c_n^* = \frac{1}{2}\left( a_n + i b_n \right), \end{equation}

where \( a_n \) and \( b_n \) are real numbers.

Then

\begin{equation} \begin{aligned} c_n e^{i k_n x} + c_n^* e^{-i k_n x} &= \frac{1}{2}\big[(a_n - i b_n)(\cos k_n x + i\sin k_n x) + (a_n + i b_n)(\cos k_n x - i\sin k_n x)\big] \\[4pt] &= a_n \cos k_n x + b_n \sin k_n x. \end{aligned} \end{equation}

Hence the series becomes

\begin{equation} f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} \left( a_n \cos k_n x + b_n \sin k_n x \right). \end{equation}

Thus the final real form of the Fourier series is

\begin{equation} \boxed{ f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} \left[ a_n \cos\left(\frac{2\pi n x}{L}\right) + b_n \sin\left(\frac{2\pi n x}{L}\right) \right]. } \end{equation}
Remark
  • \( \tfrac{a_0}{2} \): average (DC component) of \(f(x)\),

  • \( a_n \): amplitude of the cosine component,

  • \( b_n \): amplitude of the sine component,

  • frequency of the \(n\)-th harmonic: \( f_n = \tfrac{n}{L}. \)

Theorem - Fourier Coefficients

For \(f(x)\) of period \(L\):

\begin{equation} \boxed{ \begin{aligned} a_0 &= \frac{2}{L}\!\int_{-L/2}^{L/2} f(x)\,dx, \\[4pt] a_n &= \frac{2}{L}\!\int_{-L/2}^{L/2} f(x)\cos\!\left(\frac{2\pi n x}{L}\right)\!dx, \\[4pt] b_n &= \frac{2}{L}\!\int_{-L/2}^{L/2} f(x)\sin\!\left(\frac{2\pi n x}{L}\right)\!dx. \end{aligned}} \end{equation}

Multiply both sides of the Fourier expansion by \( \cos\!\left(\frac{2\pi m x}{L}\right) \) and integrate over one period:

\begin{equation} \int_{-L/2}^{L/2} f(x)\cos\!\left(\frac{2\pi m x}{L}\right)dx = \int_{-L/2}^{L/2} \Big[a_0 + \sum_{n=1}^{\infty}\big(a_n\cos\!\tfrac{2\pi n x}{L} + b_n\sin\!\tfrac{2\pi n x}{L}\big)\Big] \cos\!\left(\frac{2\pi m x}{L}\right)dx. \end{equation}

Using the orthogonality relations:

\begin{equation} \begin{aligned} \int_{-L/2}^{L/2}\cos\!\left(\frac{2\pi m x}{L}\right)\!dx &= 0, \\[3pt] \int_{-L/2}^{L/2} \cos\!\left(\frac{2\pi n x}{L}\right)\cos\!\left(\frac{2\pi m x}{L}\right)\!dx &= \frac{L}{2}\delta_{mn}, \\[3pt] \int_{-L/2}^{L/2} \sin\!\left(\frac{2\pi n x}{L}\right)\cos\!\left(\frac{2\pi m x}{L}\right)\!dx &= 0, \end{aligned} \end{equation}

all terms vanish except the one where \( n = m \):

\begin{equation} \int_{-L/2}^{L/2} f(x)\cos\!\left(\frac{2\pi m x}{L}\right)\!dx = a_m\,\frac{L}{2}. \end{equation}

Hence,

\begin{equation} \boxed{a_m = \frac{2}{L}\int_{-L/2}^{L/2} f(x)\cos\!\left(\frac{2\pi m x}{L}\right)\!dx.} \end{equation}

Similarly, multiplying the Fourier series by \( \sin\!\left(\frac{2\pi m x}{L}\right) \) and integrating gives

\begin{equation} \boxed{b_m = \frac{2}{L}\int_{-L/2}^{L/2} f(x)\sin\!\left(\frac{2\pi m x}{L}\right)\!dx.} \end{equation}

Finally, integrating both sides of the Fourier expansion over one period. Since the integrals of all sine and cosine terms vanish over a full period, only the constant term \(\tfrac{a_0}{2}\) survives:

\begin{equation} \int_{-L/2}^{L/2} f(x)\,dx = \int_{-L/2}^{L/2}\frac{a_0}{2}\,dx = \frac{a_0}{2}\,L . \end{equation}

Hence,

\begin{equation} \boxed{a_0 = \frac{2}{L}\int_{-L/2}^{L/2} f(x)\,dx,} \end{equation}

consistent with the general formula for \(a_n\) at \(n=0\). Note that it is \(\tfrac{a_0}{2}\), not \(a_0\), that equals the average value (mean) of \(f(x)\) over one period; writing the constant term as \(\tfrac{a_0}{2}\) is precisely what lets the single formula \(a_n = \tfrac{2}{L}\int f\cos(2\pi n x/L)\,dx\) cover the case \(n=0\).

7.2.4Dirichlet Conditions and Convergence of Fourier Series

Definition - Dirichlet Conditions

A periodic function \( f(x) \) of period \( L \) can be represented by a Fourier series (without modification) on the interval \( \big[-\tfrac{L}{2}, \tfrac{L}{2}\big] \) if it satisfies the following conditions:

  1. \( f(x) \) is single-valued and piecewise continuous within one period.

  2. \( f(x) \) has a finite number of finite discontinuities.

  3. \( f(x) \) has a finite number of maxima and minima within one period.

  4. The integral of its absolute value over one period is finite:

    \begin{equation} \int_{-L/2}^{L/2} |f(x)|\,dx < \infty. \end{equation}
Example of a function satisfying Dirichlet conditions over one period.
Figure 7.2. Example of a function satisfying Dirichlet conditions over one period.
Theorem - Convergence of the Fourier Series

If \( f(x) \) satisfies the Dirichlet conditions and has period \( L \), then its Fourier series

\begin{equation} f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} \Big[a_n\cos\!\Big(\frac{2\pi n x}{L}\Big) + b_n\sin\!\Big(\frac{2\pi n x}{L}\Big)\Big] \end{equation}

converges as follows:

  • At every point where \( f(x) \) is continuous, the Fourier series converges to \( f(x) \).

  • At each point of discontinuity \( x_0 \), the Fourier series converges to the midpoint of the jump:

    \begin{equation} f_{\text{series}}(x_0) = \frac{1}{2}\Big[f(x_0^+) + f(x_0^-)\Big]. \end{equation}

7.2.5Meaning and Interpretation of the Fourier Series

The Fourier series allows us to express any sufficiently smooth periodic function \( f(x) \) (with period \(L\)) as a sum of simple oscillatory components — sine and cosine waves. Mathematically,

\begin{equation} \boxed{ f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} \big[ a_n \cos(k_n x) + b_n \sin(k_n x) \big], } \qquad k_n = \frac{2\pi n}{L}. \end{equation}

Each term in the sum represents a harmonic component (or mode) of the signal.

Definition - Harmonic Component

The \(n\)-th term in the Fourier series,

\begin{equation} \boxed{ \phi_n(x) = a_n \cos(k_n x) + b_n \sin(k_n x), } \end{equation}

is called the \(n\)-th harmonic. It corresponds to a wave of frequency

\begin{equation} \nu_n = \frac{n}{L} \quad \text{or angular frequency} \quad \omega_n = k_n = \frac{2\pi n}{L}. \end{equation}

Thus,

\begin{equation} \begin{aligned} \phi_0(x) &= \frac{a_0}{2}, && \text{(average or DC component)} \\[4pt] \phi_1(x) &= a_1 \cos(k_1 x) + b_1 \sin(k_1 x), && \text{(fundamental harmonic)} \\[4pt] \phi_2(x) &= a_2 \cos(2k_1 x) + b_2 \sin(2k_1 x), && \text{(second harmonic)} \\[4pt] \phi_N(x) &= a_N \cos(Nk_1 x) + b_N \sin(Nk_1 x), && \text{($N$-th harmonic)}. \end{aligned} \end{equation}

Each harmonic contributes a specific frequency, amplitude, and phase to the total waveform. The original function \( f(x) \) is reconstructed by summing all harmonic components:

\begin{equation} \boxed{ f(x) = \phi_0(x) + \phi_1(x) + \phi_2(x) + \cdots = \sum_{n=0}^{\infty} \phi_n(x). } \end{equation}

As more harmonics are included, the approximation of \( f(x) \) becomes more accurate. Lower harmonics (\(n=0,1,2\)) describe the overall shape, while higher harmonics capture finer details and sharp transitions.

Applications in Signal Processing

Definition - Low-Pass Filter

A low-pass filter removes high-frequency (large \(n\)) components from a signal, keeping only low-frequency terms:

\begin{equation} f_{\text{filtered}}(x) = \sum_{n=0}^{N} \phi_n(x), \end{equation}

where \(N\) sets the cutoff frequency.

Remark - Applications
  • Signal processing: Decompose and reconstruct signals by frequency content.

  • Noise reduction: Remove unwanted high-frequency components using low-pass filtering.

  • Data compression: Approximate a signal using only the dominant harmonics.

  • Physics: Analyze normal modes in vibrating strings, membranes, and quantum systems.

Example - Square step on \(\lbrack{}-\pi,\pi\rbrack{}\)

Find the Fourier series of

\begin{equation} f(x)=\begin{cases} 0,& -\pi<x<0,\\[2pt] 1,& 0<x<\pi, \end{cases} \qquad\text{(period }2\pi\text{)}. \end{equation}
The square step on [-,] with the partial sums S1, S3 and S9 of its Fourier series. Each added term follows the step more closely, except near the jumps, where the overshoot persists.
Figure 7.3. The square step on \([-\pi,\pi]\) with the partial sums \(S_1\), \(S_3\) and \(S_9\) of its Fourier series. Each added term follows the step more closely, except near the jumps, where the overshoot persists.

Fourier form on \([-\pi,\pi]\). With period \(L=2\pi\), the series is

\begin{equation} f(x)=\frac{a_0}{2}+\sum_{n=1}^{\infty}\big[a_n\cos(nx)+b_n\sin(nx)\big], \end{equation}

where, from the coefficient formulas with \(L=2\pi\) so that \(\tfrac{2}{L}=\tfrac1\pi\),

\begin{equation} a_0=\frac{1}{\pi}\!\int_{-\pi}^{\pi}\!f(x)\,dx,\quad a_n=\frac{1}{\pi}\!\int_{-\pi}^{\pi}\!f(x)\cos(nx)\,dx,\quad b_n=\frac{1}{\pi}\!\int_{-\pi}^{\pi}\!f(x)\sin(nx)\,dx. \end{equation}

Solution.

Step 1: \(a_0\). The constant term of the series is \(\tfrac{a_0}{2}\), so we expect it to equal the average of \(f\), namely \(\tfrac12\).

\begin{equation} a_0=\frac{1}{\pi}\!\int_{-\pi}^{\pi}\!f(x)\,dx = \frac{1}{\pi}\!\int_{0}^{\pi}\!1\,dx =1 \quad\Rightarrow\quad \frac{a_0}{2}=\frac{1}{2}. \end{equation}

Step 2: \(a_n\) (all \(n\ge1\)).

\begin{equation} a_n=\frac{1}{\pi}\!\int_{0}^{\pi}\!\cos(nx)\,dx =\frac{1}{\pi}\cdot\frac{\sin(nx)}{n}\Big|_{0}^{\pi}=0. \end{equation}

Step 3: \(b_n\) (all \(n\ge1\)).

\begin{equation} b_n=\frac{1}{\pi}\!\int_{0}^{\pi}\!\sin(nx)\,dx =\frac{1}{\pi}\cdot\frac{-\cos(nx)}{n}\Big|_{0}^{\pi} =\frac{1}{n\pi}\big(1-\cos(n\pi)\big) =\frac{1-(-1)^n}{n\pi}. \end{equation}

Hence

\begin{equation} b_n= \begin{cases} 0,& n\ \text{even},\\[4pt] \displaystyle \frac{2}{n\pi},& n\ \text{odd}. \end{cases} \end{equation}

Result.

\begin{equation} \boxed{ f(x)=\frac{1}{2}+\frac{2}{\pi}\!\left(\sin x+\frac{\sin 3x}{3}+\frac{\sin 5x}{5}+\cdots\right) } \end{equation}

(i.e., the sum runs over odd \(n\)). At the jump points \(x\equiv 0,\pi\ (\mathrm{mod}\ 2\pi)\), the series converges to the average \(\tfrac{1}{2}\) (Dirichlet’s theorem).

Example - Periodic ramp on \((0,\pi)\) (period \(2\pi\))
The periodic ramp of period 2 with the partial sums S0, S1, S2 and S8 of its Fourier series.
Figure 7.4. The periodic ramp of period \(2\pi\) with the partial sums \(S_0\), \(S_1\), \(S_2\) and \(S_8\) of its Fourier series.

Fourier form on \([-\pi,\pi]\) (period \(2\pi\)).

\begin{equation} f(x)=\frac{a_0}{2}+\sum_{n=1}^{\infty}\big[a_n\cos(nx)+b_n\sin(nx)\big], \quad \begin{aligned} a_0&=\frac{1}{\pi}\!\int_{-\pi}^{\pi} f(x)\,dx,\\ a_n&=\frac{1}{\pi}\!\int_{-\pi}^{\pi} f(x)\cos(nx)\,dx,\\ b_n&=\frac{1}{\pi}\!\int_{-\pi}^{\pi} f(x)\sin(nx)\,dx. \end{aligned} \end{equation}

Solution.

\begin{equation} a_0=\frac{1}{\pi}\int_{0}^{\pi}\!x\,dx =\frac{1}{\pi}\Big[\frac{x^{2}}{2}\Big]_0^{\pi} =\frac{\pi}{2} \quad\Rightarrow\quad \frac{a_0}{2}=\boxed{\frac{\pi}{4}}. \end{equation}

Step 2: Cosine coefficients (\(n\ge1\)).

\begin{equation} a_n=\frac{1}{\pi}\int_{0}^{\pi}\!x\cos(nx)\,dx \quad(\text{IBP: }u=x,\ dv=\cos nx\,dx \Rightarrow v=\tfrac{1}{n}\sin nx). \end{equation}
\begin{equation} a_n=\frac{1}{\pi}\Big[x\frac{\sin(nx)}{n}\Big]_{0}^{\pi} -\frac{1}{\pi}\int_{0}^{\pi}\frac{\sin(nx)}{n}\,dx =\frac{1}{\pi n^2}\big(\cos n\pi-1\big) =\boxed{\frac{(-1)^n-1}{\pi n^2}} = \begin{cases} 0,& n\ \text{even},\\[4pt] -\dfrac{2}{\pi n^2},& n\ \text{odd}. \end{cases} \end{equation}

Step 3: Sine coefficients (\(n\ge1\)).

\begin{equation} b_n=\frac{1}{\pi}\int_{0}^{\pi}\!x\sin(nx)\,dx \quad(\text{IBP: }u=x,\ dv=\sin nx\,dx \Rightarrow v=-\tfrac{1}{n}\cos nx). \end{equation}
\begin{equation} b_n=\frac{1}{\pi}\Big[-x\frac{\cos(nx)}{n}\Big]_{0}^{\pi} +\frac{1}{\pi}\int_{0}^{\pi}\frac{\cos(nx)}{n}\,dx =-\frac{(-1)^n}{n} =\boxed{\frac{(-1)^{n+1}}{n}}. \end{equation}

Final series.

\begin{equation} \boxed{ f(x)=\frac{\pi}{4} +\sum_{n=1}^{\infty}\left[ \frac{(-1)^n-1}{\pi n^2}\cos(nx) +\frac{(-1)^{n+1}}{n}\sin(nx) \right] } \end{equation}

or, separating even/odd indices,

\begin{equation} \boxed{ f(x)=\frac{\pi}{4} -\frac{2}{\pi}\sum_{k=0}^{\infty}\frac{\cos\big((2k+1)x\big)}{(2k+1)^2} +\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin(nx). } \end{equation}

At the jump points \(x\equiv 0,\pi\ (\mathrm{mod}\ 2\pi)\), the series converges to the midpoint value \(\tfrac{1}{2}(0+\pi)=\tfrac{\pi}{2}\).

Example - Periodic half-ramp

Let

\begin{equation} f(t)= \begin{cases} 0, & -\dfrac{T}{2}< t < 0,\\[4pt] t, & 0< t < \dfrac{T}{2}, \end{cases} \qquad \text{extended periodically with period }T. \end{equation}

We find its real Fourier series

The periodic half-ramp: f(t)=t on (0,T/2) and zero on (-T/2,0), extended with period T.
Figure 7.5. The periodic half-ramp: \(f(t)=t\) on \((0,T/2)\) and zero on \((-T/2,0)\), extended with period \(T\).
\begin{equation} f(t)=\dfrac{a_0}{2}+\sum_{n=1}^{\infty}\Big[ a_n\cos(\omega_n t)+ b_n\sin(\omega_n t)\Big], \qquad \omega_n=\dfrac{2\pi n}{T}. \end{equation}

Solution.

\begin{equation} a_0=\frac{2}{T}\int_{-T/2}^{T/2}f(t)\,dt =\frac{2}{T}\int_{0}^{T/2} t\,dt =\frac{2}{T}\cdot\frac{(T/2)^2}{2} =\boxed{\frac{T}{4}}. \end{equation}

Hence the DC term is \(a_0/2=\boxed{T/8}\).

Step 2: Cosine coefficients.

\begin{equation} a_n=\frac{2}{T}\int_{-T/2}^{T/2} f(t)\cos(\omega_n t)\,dt =\frac{2}{T}\int_{0}^{T/2} t\cos(\omega_n t)\,dt. \end{equation}

Integration by parts with \(u=t\), \(dv=\cos(\omega_n t)\,dt\) gives

\begin{equation} \int t\cos(\omega_n t)\,dt=\frac{t\sin(\omega_n t)}{\omega_n} +\frac{\cos(\omega_n t)}{\omega_n^2}. \end{equation}

Therefore

\begin{equation} \begin{aligned} a_n&=\frac{2}{T}\left[ \frac{t\sin(\omega_n t)}{\omega_n} +\frac{\cos(\omega_n t)}{\omega_n^2} \right]_{0}^{T/2} =\frac{2}{T}\left[ \frac{(T/2)\sin(\omega_n T/2)}{\omega_n} +\frac{\cos(\omega_n T/2)-1}{\omega_n^2} \right]. \end{aligned} \end{equation}

Using \(\sin(\omega_n T/2)=\sin(n\pi)=0\) and \(\cos(\omega_n T/2)=\cos(n\pi)=(-1)^n\),

\begin{equation} \boxed{\,a_n=\frac{2}{T}\cdot\frac{(-1)^n-1}{\omega_n^2}\,} =\boxed{\,\frac{T}{2\pi^2 n^2}\Big[(-1)^n-1\Big]\,}. \end{equation}

Hence

\begin{equation} \boxed{\,a_n=0\ \text{for even }n,\qquad a_n=-\frac{T}{\pi^2 n^2}\ \text{for odd }n.\,} \end{equation}

Step 3: Sine coefficients.

\begin{equation} b_n=\frac{2}{T}\int_{-T/2}^{T/2} f(t)\sin(\omega_n t)\,dt =\frac{2}{T}\int_{0}^{T/2} t\sin(\omega_n t)\,dt. \end{equation}

With \(u=t\), \(dv=\sin(\omega_n t)\,dt\),

\begin{equation} \int t\sin(\omega_n t)\,dt =-\frac{t\cos(\omega_n t)}{\omega_n} +\frac{\sin(\omega_n t)}{\omega_n^2}. \end{equation}

Thus

\begin{equation} b_n=\frac{2}{T}\left[ -\frac{t\cos(\omega_n t)}{\omega_n} +\frac{\sin(\omega_n t)}{\omega_n^2} \right]_{0}^{T/2} =-\frac{2}{T}\cdot\frac{(T/2)\cos(\omega_n T/2)}{\omega_n} =\boxed{\,\frac{(-1)^{n+1}}{\omega_n}\,} =\boxed{\,\frac{(-1)^{n+1}T}{2\pi n}\,}. \end{equation}

Result (real Fourier series).

\begin{equation} \boxed{ f(t)=\frac{T}{8} +\sum_{\substack{n=1\\ \text{odd }n}}^{\infty}\!\left(-\frac{T}{\pi^2 n^2}\right)\cos\!\left(\frac{2\pi n t}{T}\right) +\sum_{n=1}^{\infty}\frac{(-1)^{n+1}T}{2\pi n}\,\sin\!\left(\frac{2\pi n t}{T}\right) }. \end{equation}
  • \(a_n\) vanish for even \(n\); cosine terms appear only for odd harmonics and decay as \(1/n^2\).

  • \(b_n\) decay as \(1/n\) with alternating sign, reflecting the sharp corner at \(t=0\) (Gibbs effect upon truncation).

  • The average (DC) level over a period is \(T/8\).

Example - Complex Fourier Series of a Periodic Ramp Function \(f(x)=x\) (period \(L\))

Consider a spatially periodic function

\begin{equation} f(x) = x, \qquad -\frac{L}{2} < x < \frac{L}{2}, \end{equation}

which repeats every interval of length \(L\). This represents a periodic ramp waveform, analogous to a sawtooth pattern in signal processing.

Periodic ramp function f(x)=x on [-L/2,L/2], repeated with period L.
Figure 7.6. Periodic ramp function \(f(x)=x\) on \([-L/2,L/2]\), repeated with period \(L\).

Solution.

For a periodic function \(f(x)\) of period \(L\), the complex Fourier coefficients are

\begin{equation} c_n = \frac{1}{L}\int_{-L/2}^{L/2} f(x)\, e^{-i\,k_n x}\,dx, \qquad \text{where } k_n = \frac{2\pi n}{L}. \end{equation}

Substitute \(f(x)=x\):

\begin{equation} \boxed{ c_n = \frac{1}{L}\int_{-L/2}^{L/2} x\, e^{-i k_n x}\,dx. } \end{equation}

Step 2. Integration by parts.

Let

\begin{equation} u = x, \quad dv = e^{-i k_n x}\,dx \quad\Rightarrow\quad du = dx, \quad v = \frac{e^{-i k_n x}}{-i k_n} = \frac{i}{k_n} e^{-i k_n x}. \end{equation}

Then

\begin{equation} \begin{aligned} c_n &= \frac{1}{L}\Big[u v\Big]_{-L/2}^{L/2} - \frac{1}{L}\int_{-L/2}^{L/2} v\,du \\[4pt] &= \frac{i}{L k_n}\Big[x\,e^{-i k_n x}\Big]_{-L/2}^{L/2} - \frac{i}{L k_n}\int_{-L/2}^{L/2} e^{-i k_n x}\,dx. \end{aligned} \end{equation}

Step 3. Simplify the second term.

The exponential integral gives

\begin{equation} \int_{-L/2}^{L/2} e^{-i k_n x}\,dx = \frac{2\sin(k_n L/2)}{k_n} = \frac{2\sin(\pi n)}{k_n} = 0, \end{equation}

since \(\sin(\pi n)=0\) for all integer \(n\). Hence, only the boundary term contributes.

Step 4. Evaluate the boundary term.

\begin{equation} \begin{aligned} c_n &= \frac{i}{L k_n} \Big[\frac{L}{2} e^{-i k_n L/2} - \left(-\frac{L}{2}\right)e^{i k_n L/2}\Big] \\[4pt] &= \frac{i}{2 k_n}\Big(e^{-i\pi n} + e^{i\pi n}\Big) = \frac{i}{k_n}\cos(\pi n). \end{aligned} \end{equation}

Using \(\cos(\pi n)=(-1)^n\), we have

\begin{equation} \boxed{ c_n = \frac{i}{k_n}(-1)^n = \frac{iL}{2\pi n}(-1)^n, \qquad n\neq 0. } \end{equation}

Step 5. DC (zero-frequency) coefficient.

\begin{equation} c_0 = \frac{1}{L}\int_{-L/2}^{L/2} x\,dx = 0, \end{equation}

since \(f(x)=x\) is an odd function and its average over one period is zero.

Step 6. Complete complex Fourier series.

\begin{equation} \boxed{ f(x) = \sum_{\substack{n=-\infty \\ n\neq 0}}^{\infty} \frac{iL}{2\pi n}(-1)^n\, e^{i\,k_n x}, \qquad k_n = \frac{2\pi n}{L}. } \end{equation}

Interpretation.

  • The amplitude of each harmonic decreases as \(1/n\), meaning higher-frequency components contribute less to the total waveform.

  • Because \(f(x)\) is an odd function, the coefficients \(c_n\) are purely imaginary (\(c_{-n}=c_n^*\)), corresponding to a sine-only spectrum.

  • Truncating the series to a few terms yields a smooth approximation of the ramp—analogous to applying a low-pass filter that removes sharp discontinuities.

7.3Fourier Transform

The Fourier transform can be viewed as the limiting case of the complex Fourier series when the period \(L \to \infty\). In this limit, the function \( f(x) \) becomes nonperiodic, and the discrete spectrum of wave numbers becomes continuous.

Transition from Discrete to Continuous Spectrum

Consider a periodic function \(f(x)\) with period \(L\):

\begin{equation} f(x) = \sum_{n=-\infty}^{\infty} c_n\, e^{i k_n x}, \qquad k_n = \frac{2\pi n}{L}. \end{equation}

When \(L \to \infty\), the spacing between successive wave numbers becomes infinitesimal:

\begin{equation} \Delta k = k_{n+1} - k_n = \frac{2\pi}{L} \;\;\Rightarrow\;\; \Delta k \to 0. \end{equation}

The discrete index \(n\) is replaced by a continuous variable \(k\):

\begin{equation} \sum_{n=-\infty}^{\infty} \longrightarrow \frac{L}{2\pi}\int_{-\infty}^{\infty} dk. \end{equation}
Definition - Fourier Coefficient in Continuous Limit

Let

\begin{equation} \boxed{ g(k) = \frac{L}{2\pi}\, c_n \qquad \text{with} \quad k = k_n. } \end{equation}

Then \(g(k)\) becomes a continuous function that represents the spectral amplitude density of \(f(x)\).

Substituting into the series and taking the limit \(L \to \infty\):

\begin{equation} \begin{aligned} f(x) &= \sum_{n=-\infty}^{\infty} c_n e^{i k_n x} = \frac{L}{2\pi} \sum_{n=-\infty}^{\infty} g(k_n) e^{i k_n x} \Delta k \;\;\xrightarrow[L\to\infty]{}\;\; \int_{-\infty}^{\infty} g(k)\, e^{i k x}\, dk. \end{aligned} \end{equation}
Definition - Fourier Transform (F.T.) and Inverse Transform
\begin{equation} \boxed{ \begin{aligned} f(x) &= \int_{-\infty}^{\infty} g(k)\, e^{i k x}\, dk, && \text{(Inverse Fourier Transform)}\\[6pt] g(k) &= \frac{1}{2\pi}\int_{-\infty}^{\infty} f(x)\, e^{-i k x}\, dx, && \text{(Fourier Transform).} \end{aligned} } \end{equation}
Remark
  • \(f(x)\): function in the spatial (time) domain.

  • \(g(k)\): its representation in the frequency (wave number) domain.

  • The transform pair is symmetric up to the normalization factor \(1/2\pi\).

Definition - Fourier Transform (F.T.) and Inverse Transform in the Time Domain
\begin{equation} \boxed{ \begin{aligned} f(t) &= \frac{1}{2\pi}\int_{-\infty}^{\infty} g(\omega)\, e^{i \omega t}\, d\omega, && \text{(Inverse Fourier Transform)} \\[6pt] g(\omega) &= \int_{-\infty}^{\infty} f(t)\, e^{-i \omega t}\, dt, && \text{(Fourier Transform).} \end{aligned} } \end{equation}
Example - Rectangular pulse of width \(2a\)

Let

\begin{equation} f(x)= \begin{cases} 1, & -a<x<a,\\[2pt] 0, & \text{otherwise}, \end{cases} \qquad a>0. \end{equation}

This is a nonperiodic rectangular pulse centered at the origin with total width \(2a\) and unit height.

The rectangular pulse of total width 2a and unit height, centred at the origin.
Figure 7.7. The rectangular pulse of total width \(2a\) and unit height, centred at the origin.

We use the transform pair

\begin{equation} g(k)=\frac{1}{2\pi}\!\int_{-\infty}^{\infty} f(x)\,e^{-ikx}\,dx, \qquad f(x)=\int_{-\infty}^{\infty} g(k)\,e^{ikx}\,dk. \end{equation}

Solution.

\begin{equation} g(k)=\frac{1}{2\pi}\int_{-a}^{a} e^{-ikx}\,dx. \end{equation}

Step 2. Evaluate the integral.

\begin{equation} \int e^{-ikx}\,dx = \frac{e^{-ikx}}{-ik} \quad\Rightarrow\quad \int_{-a}^{a} e^{-ikx}\,dx = \frac{e^{-ika}-e^{ika}}{-ik} = \frac{2\sin(ka)}{k}. \end{equation}

Step 3. Simplify and express the result.

\begin{equation} \boxed{ g(k) = \frac{1}{2\pi}\cdot\frac{2\sin(ka)}{k} = \frac{1}{\pi}\,\frac{\sin(ka)}{k} = \frac{a}{\pi}\,\mathrm{sinc}(ak), } \qquad \mathrm{sinc}(u)=\frac{\sin u}{u}. \end{equation}

At \(k=0\), we take the limit \(\displaystyle g(0)=\lim_{k\to0}\frac{a}{\pi}\,\mathrm{sinc}(ak)=\frac{a}{\pi}.\)

Key features.

  • \(g(k)\) is real, even, and has zeros at \(k=\pm n\pi/a\) for \(n=1,2,3,\ldots\).

  • The main lobe width \(\Delta k \sim 2\pi/a\) — increasing \(a\) (wider pulse) narrows the spectrum.

  • The transform pair summarizes the width–bandwidth tradeoff: a narrow function in \(k\)-space corresponds to a wide function in \(x\)-space and vice versa.

Rectangular pulse in x-space and its sinc-shaped spectrum in k-space. A wider pulse (larger a) gives a narrower main lobe in k.
Figure 7.8. Rectangular pulse in \(x\)-space and its sinc-shaped spectrum in \(k\)-space. A wider pulse (larger \(a\)) gives a narrower main lobe in \(k\).
Example - Fourier Transform of \( f(t) = e^{-a|t|} \)

Let

\begin{equation} f(t) = e^{-a|t|}, \qquad a > 0. \end{equation}

This function decays exponentially on both sides of \(t=0\):

The two-sided exponential f(t)=e^-a|t|, which decays on both sides of t=0.
Figure 7.9. The two-sided exponential \(f(t)=e^{-a|t|}\), which decays on both sides of \(t=0\).

We use the Fourier transform convention:

\begin{equation} f(t) = \int_{-\infty}^{\infty} g(\omega)e^{i\omega t}\,d\omega, \qquad g(\omega) = \frac{1}{2\pi}\int_{-\infty}^{\infty} f(t)e^{-i\omega t}\,dt. \end{equation}

Solution.

\begin{equation} g(\omega) = \frac{1}{2\pi}\!\left[ \int_{-\infty}^{0} e^{at} e^{-i\omega t}\,dt + \int_{0}^{\infty} e^{-at} e^{-i\omega t}\,dt \right]. \end{equation}

Step 2. Evaluate each integral.

\begin{equation} \int_{0}^{\infty} e^{-at} e^{-i\omega t}\,dt = \frac{1}{a+i\omega}, \qquad \int_{-\infty}^{0} e^{at} e^{-i\omega t}\,dt = \frac{1}{a-i\omega}. \end{equation}

Step 3. Combine the results:

\begin{equation} g(\omega) = \frac{1}{2\pi}\left(\frac{1}{a+i\omega} + \frac{1}{a-i\omega}\right) = \frac{1}{\pi}\,\frac{a}{a^2+\omega^2}. \end{equation}

Thus, the Fourier transform of \( e^{-a|t|} \) is

\begin{equation} \boxed{ g(\omega) = \frac{1}{\pi}\,\frac{a}{a^2+\omega^2} } \end{equation}

which is known as the Lorentzian function.

Shape of \( g(\omega) \):

The Lorentzian spectrum g() a/(a^2+^2), the Fourier transform of the two-sided exponential.
Figure 7.10. The Lorentzian spectrum \(g(\omega)\propto a/(a^{2}+\omega^{2})\), the Fourier transform of the two-sided exponential.

As \(a\) increases, \(g(\omega)\) becomes broader and shorter; as \(a\) decreases, it becomes narrower and taller.

7.4Where Fourier Analysis Is Used

The single idea of this chapter — that a function can be rebuilt from sines and cosines, or from complex exponentials — is one of the most widely used in all of physics and engineering. The reason is that the basis functions \(e^{ikx}\) are the natural language of anything that oscillates, and of the linear equations that govern waves, heat and quantum systems.

Remark

The width–bandwidth tradeoff deserves a second mention because it recurs under so many names. A pulse of duration \(\Delta t\) has a spectrum of width \(\Delta\omega \sim 1/\Delta t\). In signal processing this limits how sharply a filter can act; in spectroscopy it is the natural linewidth; in quantum mechanics it is \(\Delta x\,\Delta p \gtrsim \hbar\). They are all one statement about Fourier pairs: you cannot make a function narrow in both domains at once.

Summary Table

ObjectFormulaNotes
Complex series\(f(x) = \sum_{n=-\infty}^{\infty} c_n e^{i k_n x}\)\(k_n = 2\pi n/L\); the compact form.
Complex coefficient\(c_n = \frac{1}{L}\int_{-L/2}^{L/2} f\,e^{-i k_n x}\,dx\)For real \(f\), \(c_{-n}=c_n^*\).
Real series\(f(x) = \frac{a_0}{2} + \sum_{n\ge1}\big[a_n\cos k_n x + b_n\sin k_n x\big]\)\(\tfrac{a_0}{2}\) is the average of \(f\).
Real coefficients\(a_n,b_n = \frac{2}{L}\int_{-L/2}^{L/2} f\,\{\cos,\sin\}(k_n x)\,dx\)The \(\tfrac{2}{L}\) gives \(a_0\) at \(n=0\).
Even / oddeven \(\Rightarrow b_n=0\); odd \(\Rightarrow a_n=0\)Halves the work when \(f\) has symmetry.
Dirichlet / jumpsseries \(\to \tfrac12[f(x^+)+f(x^-)]\)Converges to the midpoint at a jump.
Fourier transform\(g(k) = \frac{1}{2\pi}\int_{-\infty}^{\infty} f\,e^{-ikx}\,dx\)The \(L\to\infty\) limit of the series.
Inverse transform\(f(x) = \int_{-\infty}^{\infty} g(k)\,e^{ikx}\,dk\)Rebuilds \(f\) from its spectrum.
Width–bandwidth\(\Delta x\,\Delta k \gtrsim 1\)Narrow in \(x\) \(\Leftrightarrow\) wide in \(k\).
Remark - A caution on conventions

Fourier transforms are defined with several different placements of the \(2\pi\): all on the inverse transform (as here), split symmetrically as \(1/\sqrt{2\pi}\) on each, or attached to the frequency variable \(\nu = k/2\pi\) instead of \(k\). Every choice is self-consistent, but formulas from two sources cannot be mixed without checking. Whenever you quote a transform, note which convention it assumes.

For the Interested Reader

Fourier analysis is a subject where a single good picture replaces pages of algebra: once you see a Fourier series as a sum of rotating vectors, the coefficient formulas stop looking arbitrary. The videos below are the best route to that picture. Everything listed is free.

The idea, seen

3Blue1Brown builds the Fourier series and then the transform from the geometry of rotating vectors, motivated — as Fourier himself was — by heat flow:

Video

But what is a Fourier series? From heat flow to drawing with circles — 3Blue1Brown

Video thumbnail for But what is a Fourier series? From heat flow to drawing with circles — 3Blue1BrownWatch on YouTube

Open video on YouTube

Video

But what is the Fourier transform? A visual introduction — 3Blue1Brown

Video thumbnail for But what is the Fourier transform? A visual introduction — 3Blue1BrownWatch on YouTube

Open video on YouTube

A complementary take, arriving at the transform from the physics rather than the geometry:

Video

To Understand the Fourier Transform, Start From Quantum Mechanics — Physics with Elliot

Video thumbnail for To Understand the Fourier Transform, Start From Quantum Mechanics — Physics with ElliotWatch on YouTube

Open video on YouTube

Worked technique and practice

Remark

If only one of these fits your time, watch the two 3Blue1Brown videos before rereading the chapter. Most of what makes Fourier analysis feel abstract — why complex exponentials, why the integral extracts a coefficient, what a negative frequency means — becomes obvious once the series is seen as vectors adding tip to tail.