Skip to main content
✏️ Worked problems with full solutions

Fourier Transform Examples

Eight step-by-step worked problems — from basic transforms to intermediate signal processing tasks. Each includes full math, clear explanations, and links to hands-on tools.

A BISMUTH project by Bodhin Industries.

1

Fourier Transform of a Rectangular Pulse

Problem Statement

Find the Fourier Transform of the rectangular pulse defined as:

x(t) = \begin{cases} 1, & |t| \leq \frac{T}{2} \\ 0, & |t| > \frac{T}{2} \end{cases}

Solution

Step 1: Apply the Fourier Transform definition:

X(f) = \int_{-\infty}^{\infty} x(t)\,e^{-j2\pi f t}\,dt

Step 2: Since x(t) = 1 only for |t| \leq T/2, the integral becomes:

X(f) = \int_{-T/2}^{T/2} e^{-j2\pi f t}\,dt

Step 3: Evaluate the integral:

X(f) = \left[\frac{e^{-j2\pi f t}}{-j2\pi f}\right]_{-T/2}^{T/2} = \frac{e^{-j\pi f T} - e^{j\pi f T}}{-j2\pi f}

Step 4: Use Euler's formula \sin(\theta) = \frac{e^{j\theta} - e^{-j\theta}}{2j}:

X(f) = \frac{\sin(\pi f T)}{\pi f} = T\,\text{sinc}(fT)

Key Takeaway

The Fourier Transform of a rectangular pulse is a sinc function. Wider pulses in time produce narrower spectra in frequency, and vice versa — illustrating the time-frequency uncertainty principle.

Try it in the Visualizer →
2

Fourier Transform of a Cosine Signal

Problem Statement

Find the Fourier Transform of x(t) = A\cos(2\pi f_0 t).

Solution

Step 1: Rewrite the cosine using Euler's formula:

\cos(2\pi f_0 t) = \frac{1}{2}\left(e^{j2\pi f_0 t} + e^{-j2\pi f_0 t}\right)

Step 2: Apply the Fourier Transform. Since \mathcal{F}\{e^{j2\pi f_0 t}\} = \delta(f - f_0):

X(f) = \frac{A}{2}\left[\delta(f - f_0) + \delta(f + f_0)\right]

Key Takeaway

A pure cosine at frequency f_0 produces two delta spikes in the frequency domain — one at +f_0 and one at -f_0. The negative frequency is a mathematical consequence of representing real signals using complex exponentials.

Generate Cosines →
3

DFT of a 4-Point Sequence

Problem Statement

Compute the DFT of the sequence x[n] = \{1, 2, 3, 4\} with N = 4.

Solution

Step 1: The DFT formula is:

X[k] = \sum_{n=0}^{N-1} x[n]\,e^{-j2\pi k n / N}

With N = 4, the twiddle factor is W_4 = e^{-j\pi/2} = -j.

Step 2: Compute each bin:

X[0] = 1 + 2 + 3 + 4 = 10
X[1] = 1 + 2(-j) + 3(-1) + 4(j) = 1 - 2j - 3 + 4j = -2 + 2j
X[2] = 1 + 2(-1) + 3(1) + 4(-1) = 1 - 2 + 3 - 4 = -2
X[3] = 1 + 2(j) + 3(-1) + 4(-j) = 1 + 2j - 3 - 4j = -2 - 2j

Step 3: Compute magnitudes:

|X[0]| = 10,\quad |X[1]| = 2\sqrt{2},\quad |X[2]| = 2,\quad |X[3]| = 2\sqrt{2}

Key Takeaway

The DFT converts a time-domain sequence into frequency-domain coefficients. X[0] always equals the sum of all samples (the DC component). Notice that X[3] = X[1]^* — the conjugate symmetry property for real-valued inputs.

Verify with FFT Calculator →
4

Finding Frequency Components in a Sum of Sinusoids

Problem Statement

A signal is sampled at f_s = 1000 Hz for 1 second:

x(t) = 3\sin(2\pi \cdot 50t) + 1.5\sin(2\pi \cdot 120t) + 0.5\sin(2\pi \cdot 300t)

Identify the frequency components and their amplitudes from the FFT output.

Solution

Step 1: Sample the signal to get N = 1000 points. The frequency resolution is:

\Delta f = \frac{f_s}{N} = \frac{1000}{1000} = 1\text{ Hz}

Step 2: Compute the FFT and take the magnitude. Each frequency bin k corresponds to frequency f = k \cdot \Delta f.

Step 3: To recover amplitudes from the one-sided spectrum, scale the FFT magnitudes:

A_k = \frac{2|X[k]|}{N}

Step 4: Peaks appear at bins 50, 120, and 300:

Bin Frequency Amplitude
5050 Hz3.0
120120 Hz1.5
300300 Hz0.5

Key Takeaway

The FFT cleanly separates individual sinusoidal components, letting you read off their frequencies and amplitudes directly. The scaling factor 2/N converts the raw FFT magnitudes into physical amplitudes for a one-sided spectrum.

5

Convolution of Two Rectangular Pulses

Problem Statement

Compute the convolution of two rectangular pulses:

h(t) = \text{rect}\!\left(\frac{t}{T_1}\right), \quad g(t) = \text{rect}\!\left(\frac{t}{T_2}\right)

where T_1 = T_2 = T.

Solution

Step 1: Write the convolution integral:

(h * g)(t) = \int_{-\infty}^{\infty} h(\tau)\,g(t - \tau)\,d\tau

Step 2: Both pulses are non-zero only over [-T/2, T/2]. The overlap of h(\tau) and the shifted g(t - \tau) changes linearly with t.

Step 3: The result is a triangular pulse of width 2T and height T:

(h * g)(t) = T\,\text{tri}\!\left(\frac{t}{T}\right) = \begin{cases} T - |t|, & |t| \leq T \\ 0, & |t| > T \end{cases}

Step 4 (frequency domain check): Using the convolution theorem, \mathcal{F}\{h * g\} = H(f) \cdot G(f). Since both transforms are sinc functions:

\mathcal{F}\{h * g\} = T^2\,\text{sinc}^2(fT)

Key Takeaway

Convolving two identical rectangles produces a triangle — a smoother shape. The convolution theorem lets you verify this in the frequency domain: multiplication of two sinc functions gives sinc². Convolution always produces an output that is smoother (more spread out) than either input.

Try Convolution Tool →
6

Applying a Low-Pass Filter in the Frequency Domain

Problem Statement

A signal contains a 100 Hz tone plus high-frequency noise above 200 Hz. Remove the noise using an ideal low-pass filter with cutoff f_c = 150 Hz. The signal is sampled at f_s = 1000 Hz with N = 1024 samples.

Solution

Step 1: Compute the FFT of the signal:

X[k] = \text{FFT}\{x[n]\}

Step 2: Determine the bin index for the cutoff frequency:

k_c = \frac{f_c}{f_s} \cdot N = \frac{150}{1000} \cdot 1024 \approx 154

Step 3: Create an ideal low-pass filter in the frequency domain:

H[k] = \begin{cases} 1, & k \leq k_c \text{ or } k \geq N - k_c \\ 0, & \text{otherwise} \end{cases}

Step 4: Multiply and take the inverse FFT:

Y[k] = X[k] \cdot H[k] \quad\Rightarrow\quad y[n] = \text{IFFT}\{Y[k]\}

The output y[n] retains the 100 Hz tone with the high-frequency noise removed.

Key Takeaway

Filtering in the frequency domain is conceptually simple: take the FFT, zero out unwanted frequencies, and inverse-FFT back. The mirror symmetry of H[k] around N/2 preserves the real-valued nature of the output signal.

7

Sampling a Signal and Observing Aliasing

Problem Statement

A 900 Hz sine wave is sampled at f_s = 1000 Hz. What frequency does the sampled signal appear to have?

Solution

Step 1: The Nyquist frequency is:

f_{\text{Nyquist}} = \frac{f_s}{2} = 500\text{ Hz}

Step 2: Since 900 Hz > 500 Hz, the signal violates the Nyquist criterion. The aliased frequency is:

f_{\text{alias}} = |f_s - f_{\text{signal}}| = |1000 - 900| = 100\text{ Hz}

Step 3: Verification — when you compute the FFT of the sampled data, you will see a peak at 100 Hz, not 900 Hz. The original frequency is irrecoverably lost.

General formula: For any frequency above Nyquist, the aliased frequency is:

f_{\text{alias}} = \left| f_{\text{signal}} - \text{round}\!\left(\frac{f_{\text{signal}}}{f_s}\right) \cdot f_s \right|

Key Takeaway

Aliasing folds high-frequency content below the Nyquist frequency, creating phantom frequencies that are indistinguishable from legitimate signals. The only prevention is an anti-aliasing filter before sampling, or sampling at a rate at least twice the highest frequency present.

See Aliasing in the Visualizer →
8

Computing Power Spectrum from FFT Output

Problem Statement

Given a signal x[n] of length N = 512 sampled at f_s = 8000 Hz, compute its power spectral density (PSD) and express the result in decibels.

Solution

Step 1: Compute the FFT:

X[k] = \text{FFT}\{x[n]\}, \quad k = 0, 1, \ldots, N-1

Step 2: Compute the power spectrum (periodogram estimate):

P[k] = \frac{|X[k]|^2}{N}

Step 3: For a one-sided spectrum (real signals only), keep bins k = 0, 1, \ldots, N/2 and double the non-DC, non-Nyquist bins:

P_{\text{one-sided}}[k] = \begin{cases} P[0], & k = 0 \\ 2P[k], & 1 \leq k < N/2 \\ P[N/2], & k = N/2 \end{cases}

Step 4: Convert to decibels:

P_{\text{dB}}[k] = 10\log_{10}\!\left(P_{\text{one-sided}}[k]\right)

Step 5: The frequency axis maps each bin to:

f_k = k \cdot \frac{f_s}{N} = k \cdot \frac{8000}{512} \approx k \cdot 15.625\text{ Hz}

Key Takeaway

The power spectrum shows how signal energy is distributed across frequencies. Squaring the magnitude removes phase information and gives you energy (power per bin). Expressing in decibels compresses the dynamic range so you can see both strong and weak components. For real signals, the spectrum is symmetric, so you only need to plot the one-sided version.

Compute Power Spectrum →

Keep Exploring

Ready to try these concepts hands-on? Jump into one of our interactive tools or continue learning with our free lessons.