Skip to content

Fourier Transform: 14 Practice Problems with Solutions

Type
Practice problems
Problems
14
Levels
Easy · Medium · Hard

The Fourier transform turns a function of xx into a function of frequency ω\omega. Below are 14 practice problems: the standard transform pairs, the shift and modulation properties, inverse transforms, Parseval’s theorem, convolution and the heat equation. Each problem has a hint and a full step-by-step solution.

Contents6 sections

The definition and the properties you need

This page uses the convention common in engineering and differential equations:

F(ω)=∫−∞∞f(x) e−iωx dx,f(x)=12π∫−∞∞F(ω) eiωx dω.F(\omega)=\int_{-\infty}^{\infty} f(x)\,e^{-i\omega x}\,dx,\qquad f(x)=\frac{1}{2\pi}\int_{-\infty}^{\infty} F(\omega)\,e^{i\omega x}\,d\omega.
  • Shift: f(x−c) → e−icωF(ω)f(x-c)\ \to\ e^{-ic\omega}F(\omega)
  • Modulation: f(x)cos⁡(ω0x) → 12[F(ω−ω0)+F(ω+ω0)]f(x)\cos(\omega_0x)\ \to\ \frac12\left[F(\omega-\omega_0)+F(\omega+\omega_0)\right]
  • Scaling: f(ax) → 1∣a∣F ⁣(ωa)f(ax)\ \to\ \frac{1}{|a|}F\!\left(\frac{\omega}{a}\right)
  • Derivatives: f′(x)→iωF(ω)f'(x)\to i\omega F(\omega) and xf(x)→iF′(ω)x f(x)\to iF'(\omega)
  • Convolution: (f∗g)(x)=∫f(s)g(x−s) ds → F(ω)G(ω)(f*g)(x)=\int f(s)g(x-s)\,ds\ \to\ F(\omega)G(\omega)
  • Parseval: ∫−∞∞∣f(x)∣2dx=12π∫−∞∞∣F(ω)∣2dω\displaystyle\int_{-\infty}^{\infty}|f(x)|^2dx=\frac{1}{2\pi}\int_{-\infty}^{\infty}|F(\omega)|^2d\omega

If your course puts 12π\frac{1}{\sqrt{2\pi}} in front of both integrals, or uses e−2πiξxe^{-2\pi i\xi x}, the answers below change only by constant factors (see the FAQ). Transforms of periodic functions on a finite interval are Fourier series instead.

Easy problems

Problem 1: Rectangular pulse

Easy

Find the Fourier transform of f(x)=1f(x)=1 for ∣x∣<a|x|<a and f(x)=0f(x)=0 for ∣x∣>a|x|>a, where a>0a>0.

Hint

The integral runs only over (−a,a)(-a,a). Combine eiaω−e−iaωe^{ia\omega}-e^{-ia\omega} into a sine.

View Solution
F(ω)=∫−aae−iωx dx=[e−iωx−iω]−aa=eiaω−e−iaωiω=2sin⁡aωω.F(\omega)=\int_{-a}^{a}e^{-i\omega x}\,dx=\left[\frac{e^{-i\omega x}}{-i\omega}\right]_{-a}^{a}=\frac{e^{ia\omega}-e^{-ia\omega}}{i\omega}=\frac{2\sin a\omega}{\omega}.

At ω=0\omega=0 the value is the limit 2a2a, the area under the pulse.

Answer: F(ω)=2sin⁡aωω\displaystyle F(\omega)=\frac{2\sin a\omega}{\omega}

Problem 2: Two-sided exponential

Easy

Find the Fourier transform of f(x)=e−a∣x∣f(x)=e^{-a|x|}, where a>0a>0.

Hint

Split at x=0x=0: use eaxe^{ax} on (−∞,0)(-\infty,0) and e−axe^{-ax} on (0,∞)(0,\infty).

View Solution
F(ω)=∫−∞0e(a−iω)x dx+∫0∞e−(a+iω)x dx=1a−iω+1a+iω=2aa2+ω2.F(\omega)=\int_{-\infty}^{0}e^{(a-i\omega)x}\,dx+\int_{0}^{\infty}e^{-(a+i\omega)x}\,dx=\frac{1}{a-i\omega}+\frac{1}{a+i\omega}=\frac{2a}{a^2+\omega^2}.

The transform is real and even, as it must be for a real even function.

Answer: F(ω)=2aa2+ω2\displaystyle F(\omega)=\frac{2a}{a^2+\omega^2}

Problem 3: One-sided exponential

Easy

Find the Fourier transform of f(x)=e−axf(x)=e^{-ax} for x>0x>0 and f(x)=0f(x)=0 for x<0x<0, where a>0a>0.

Hint

It is the second half of Problem 2. The term e−(a+iω)xe^{-(a+i\omega)x} tends to 00 as x→∞x\to\infty because a>0a>0.

View Solution
F(ω)=∫0∞e−(a+iω)x dx=[e−(a+iω)x−(a+iω)]0∞=1a+iω.F(\omega)=\int_{0}^{\infty}e^{-(a+i\omega)x}\,dx=\left[\frac{e^{-(a+i\omega)x}}{-(a+i\omega)}\right]_0^\infty=\frac{1}{a+i\omega}.

In real and imaginary parts: F(ω)=a−iωa2+ω2F(\omega)=\dfrac{a-i\omega}{a^2+\omega^2}. The function is not even, so the transform is complex.

Answer: F(ω)=1a+iω\displaystyle F(\omega)=\frac{1}{a+i\omega}

Problem 4: Using the shift property

Easy

Find the Fourier transform of g(x)=e−∣x−3∣g(x)=e^{-|x-3|}.

Hint

g(x)=f(x−3)g(x)=f(x-3) with f(x)=e−∣x∣f(x)=e^{-|x|}. Use Problem 2 with a=1a=1.

View Solution

From Problem 2, f(x)=e−∣x∣f(x)=e^{-|x|} has F(ω)=21+ω2F(\omega)=\frac{2}{1+\omega^2}. Shifting by 33 multiplies the transform by e−3iωe^{-3i\omega}:

G(ω)=2 e−3iω1+ω2.G(\omega)=\frac{2\,e^{-3i\omega}}{1+\omega^2}.

A shift changes only the phase: ∣G(ω)∣=∣F(ω)∣|G(\omega)|=|F(\omega)|.

Answer: G(ω)=2e−3iω1+ω2\displaystyle G(\omega)=\frac{2e^{-3i\omega}}{1+\omega^2}

Medium problems

Problem 5: Gaussian

Medium

Find the Fourier transform of f(x)=e−ax2f(x)=e^{-ax^2}, where a>0a>0.

Hint

Complete the square: −ax2−iωx=−a(x+iω2a)2−ω24a-ax^2-i\omega x=-a\left(x+\frac{i\omega}{2a}\right)^2-\frac{\omega^2}{4a}. Then use ∫e−au2du=π/a\int e^{-au^2}du=\sqrt{\pi/a}.

View Solution

Completing the square in the exponent:

F(ω)=e−ω2/(4a)∫−∞∞e−a(x+iω2a)2dx=πa  e−ω2/(4a).F(\omega)=e^{-\omega^2/(4a)}\int_{-\infty}^{\infty}e^{-a\left(x+\frac{i\omega}{2a}\right)^2}dx=\sqrt{\frac{\pi}{a}}\;e^{-\omega^2/(4a)}.

The shift of the integration line by iω2a\frac{i\omega}{2a} does not change the integral (Cauchy’s theorem, or differentiate FF in ω\omega and solve F′=−ω2aFF'=-\frac{\omega}{2a}F).

A Gaussian transforms into a Gaussian: narrow in xx (large aa) means wide in ω\omega.

Answer: F(ω)=πa e−ω2/(4a)\displaystyle F(\omega)=\sqrt{\frac{\pi}{a}}\,e^{-\omega^2/(4a)}

Problem 6: Triangle function

Medium

Find the Fourier transform of f(x)=1−∣x∣f(x)=1-|x| for ∣x∣<1|x|<1 and f(x)=0f(x)=0 for ∣x∣≥1|x|\ge1.

Hint

ff is even, so F(ω)=2∫01(1−x)cos⁡ωx dxF(\omega)=2\int_0^1(1-x)\cos\omega x\,dx. Integrate by parts once.

View Solution

Because ff is even, the sine part cancels:

F(ω)=2∫01(1−x)cos⁡ωx dx=2([(1−x)sin⁡ωxω]01+1ω∫01sin⁡ωx dx)=2(1−cos⁡ω)ω2.F(\omega)=2\int_0^1(1-x)\cos\omega x\,dx=2\left(\left[\frac{(1-x)\sin\omega x}{\omega}\right]_0^1+\frac{1}{\omega}\int_0^1\sin\omega x\,dx\right)=\frac{2(1-\cos\omega)}{\omega^2}.

With 1−cos⁡ω=2sin⁡2ω21-\cos\omega=2\sin^2\frac{\omega}{2}, this is F(ω)=4sin⁡2(ω/2)ω2F(\omega)=\dfrac{4\sin^2(\omega/2)}{\omega^2}, which is never negative. Problem 13 explains why.

Answer: F(ω)=2(1−cos⁡ω)ω2=4sin⁡2(ω/2)ω2\displaystyle F(\omega)=\frac{2(1-\cos\omega)}{\omega^2}=\frac{4\sin^2(\omega/2)}{\omega^2}

Problem 7: An inverse transform

Medium

Find the function f(x)f(x) whose Fourier transform is F(ω)=11+ω2F(\omega)=\dfrac{1}{1+\omega^2}.

Hint

Look at Problem 2 with a=1a=1. Uniqueness of the transform lets you read the answer off a known pair.

View Solution

Problem 2 with a=1a=1 gives e−∣x∣→21+ω2e^{-|x|}\to\dfrac{2}{1+\omega^2}. Dividing by 22 (the transform is linear):

12e−∣x∣ → 11+ω2.\frac12e^{-|x|}\ \to\ \frac{1}{1+\omega^2}.

Check at x=0x=0: f(0)=12π∫dω1+ω2=12π⋅π=12f(0)=\frac{1}{2\pi}\int\frac{d\omega}{1+\omega^2}=\frac{1}{2\pi}\cdot\pi=\frac12. It matches.

Answer: f(x)=12e−∣x∣f(x)=\frac12e^{-|x|}

Problem 8: Multiplying by x

Medium

Find the Fourier transform of g(x)=x e−x2g(x)=x\,e^{-x^2}.

Hint

Use xf(x)→iF′(ω)x f(x)\to iF'(\omega) with f(x)=e−x2f(x)=e^{-x^2} from Problem 5 (a=1a=1).

View Solution

From Problem 5, F(ω)=π e−ω2/4F(\omega)=\sqrt{\pi}\,e^{-\omega^2/4}. Differentiating under the integral, F′(ω)=∫(−ix)f(x)e−iωxdxF'(\omega)=\int(-ix)f(x)e^{-i\omega x}dx, so the transform of xf(x)xf(x) is iF′(ω)iF'(\omega):

G(ω)=i⋅π(−ω2)e−ω2/4=−iπ ω2 e−ω2/4.G(\omega)=i\cdot\sqrt{\pi}\left(-\frac{\omega}{2}\right)e^{-\omega^2/4}=-\frac{i\sqrt{\pi}\,\omega}{2}\,e^{-\omega^2/4}.

gg is real and odd, so its transform is purely imaginary and odd, as found.

Answer: G(ω)=−iπ2 ω e−ω2/4\displaystyle G(\omega)=-\frac{i\sqrt{\pi}}{2}\,\omega\,e^{-\omega^2/4}

Problem 9: Modulation

Medium

Find the Fourier transform of g(x)=e−∣x∣cos⁡2xg(x)=e^{-|x|}\cos 2x.

Hint

Write cos⁡2x=12(e2ix+e−2ix)\cos 2x=\frac12(e^{2ix}+e^{-2ix}). Multiplying by e2ixe^{2ix} shifts the transform by 22.

View Solution

Multiplying by eiω0xe^{i\omega_0x} turns F(ω)F(\omega) into F(ω−ω0)F(\omega-\omega_0). With F(ω)=21+ω2F(\omega)=\frac{2}{1+\omega^2}:

G(ω)=12[F(ω−2)+F(ω+2)]=11+(ω−2)2+11+(ω+2)2.G(\omega)=\frac12\left[F(\omega-2)+F(\omega+2)\right]=\frac{1}{1+(\omega-2)^2}+\frac{1}{1+(\omega+2)^2}.

The peak at ω=0\omega=0 splits into two peaks at ω=±2\omega=\pm2, the frequency of the cosine.

Answer: G(ω)=11+(ω−2)2+11+(ω+2)2\displaystyle G(\omega)=\frac{1}{1+(\omega-2)^2}+\frac{1}{1+(\omega+2)^2}

Problem 10: The Dirichlet integral

Medium

Use the inverse transform of the pulse in Problem 1 to evaluate ∫0∞sin⁡xx dx\displaystyle\int_0^{\infty}\frac{\sin x}{x}\,dx.

Hint

Take a=1a=1 and write the inversion formula at x=0x=0, where f(0)=1f(0)=1.

View Solution

With a=1a=1, F(ω)=2sin⁡ωωF(\omega)=\frac{2\sin\omega}{\omega}. The inversion formula at x=0x=0, a point of continuity, gives

1=f(0)=12π∫−∞∞2sin⁡ωω dω⟹∫−∞∞sin⁡ωω dω=π.1=f(0)=\frac{1}{2\pi}\int_{-\infty}^{\infty}\frac{2\sin\omega}{\omega}\,d\omega\quad\Longrightarrow\quad\int_{-\infty}^{\infty}\frac{\sin\omega}{\omega}\,d\omega=\pi.

The integrand is even, so half of that comes from (0,∞)(0,\infty).

Answer: ∫0∞sin⁡xx dx=π2\displaystyle\int_0^{\infty}\frac{\sin x}{x}\,dx=\frac{\pi}{2}

Hard problems

Problem 11: Parseval with the pulse

Hard

Use Parseval’s theorem and Problem 1 to evaluate ∫−∞∞sin⁡2xx2 dx\displaystyle\int_{-\infty}^{\infty}\frac{\sin^2x}{x^2}\,dx.

Hint

With a=1a=1, ∫∣f∣2dx=2\int|f|^2dx=2 and ∣F(ω)∣2=4sin⁡2ωω2|F(\omega)|^2=\frac{4\sin^2\omega}{\omega^2}.

View Solution

For the pulse with a=1a=1, ∫−∞∞∣f∣2dx=∫−111 dx=2\int_{-\infty}^{\infty}|f|^2dx=\int_{-1}^{1}1\,dx=2. Parseval’s theorem gives

2=12π∫−∞∞4sin⁡2ωω2 dω⟹∫−∞∞sin⁡2ωω2 dω=π.2=\frac{1}{2\pi}\int_{-\infty}^{\infty}\frac{4\sin^2\omega}{\omega^2}\,d\omega\quad\Longrightarrow\quad\int_{-\infty}^{\infty}\frac{\sin^2\omega}{\omega^2}\,d\omega=\pi.

Answer: π\pi

Problem 12: Parseval with the two-sided exponential

Hard

Use Parseval’s theorem with f(x)=e−∣x∣f(x)=e^{-|x|} to evaluate ∫−∞∞dx(1+x2)2\displaystyle\int_{-\infty}^{\infty}\frac{dx}{(1+x^2)^2}.

Hint

F(ω)=21+ω2F(\omega)=\frac{2}{1+\omega^2}, and ∫e−2∣x∣dx=1\int e^{-2|x|}dx=1.

View Solution

The left side of Parseval is ∫−∞∞e−2∣x∣dx=2⋅12=1\int_{-\infty}^{\infty}e^{-2|x|}dx=2\cdot\frac12=1. The right side is 12π∫4(1+ω2)2dω\frac{1}{2\pi}\int\frac{4}{(1+\omega^2)^2}d\omega. So

1=2π∫−∞∞dω(1+ω2)2⟹∫−∞∞dω(1+ω2)2=π2.1=\frac{2}{\pi}\int_{-\infty}^{\infty}\frac{d\omega}{(1+\omega^2)^2}\quad\Longrightarrow\quad\int_{-\infty}^{\infty}\frac{d\omega}{(1+\omega^2)^2}=\frac{\pi}{2}.

The same value comes from the substitution x=tan⁡θx=\tan\theta, which turns the integral into ∫−π/2π/2cos⁡2θ dθ=π2\int_{-\pi/2}^{\pi/2}\cos^2\theta\,d\theta=\frac{\pi}{2}.

Answer: π2\frac{\pi}{2}

Problem 13: Convolution of two pulses

Hard

Let p(x)=1p(x)=1 for ∣x∣<12|x|<\frac12 and 00 otherwise.

(a) Compute the convolution (p∗p)(x)(p*p)(x).

(b) Check your answer with the convolution theorem and Problem 6.

Hint

(p∗p)(x)(p*p)(x) is the length of the overlap of the intervals (−12,12)(-\frac12,\frac12) and (x−12,x+12)(x-\frac12,x+\frac12).

View Solution

(a) (p∗p)(x)=∫p(s)p(x−s) ds(p*p)(x)=\int p(s)p(x-s)\,ds counts the overlap of two unit intervals whose centers are xx apart. The overlap is 1−∣x∣1-|x| when ∣x∣<1|x|<1 and 00 otherwise: the triangle function of Problem 6.

(b) Problem 1 with a=12a=\frac12 gives P(ω)=2sin⁡(ω/2)ωP(\omega)=\frac{2\sin(\omega/2)}{\omega}. The convolution theorem says

F{p∗p}=P(ω)2=4sin⁡2(ω/2)ω2,\mathcal{F}\{p*p\}=P(\omega)^2=\frac{4\sin^2(\omega/2)}{\omega^2},

which is exactly the transform found in Problem 6. This also explains why that transform is never negative: it is a square.

Answer: (a) (p∗p)(x)=1−∣x∣(p*p)(x)=1-|x| for ∣x∣<1|x|<1, 00 otherwise  (b) P(ω)2=4sin⁡2(ω/2)ω2P(\omega)^2=\frac{4\sin^2(\omega/2)}{\omega^2}, matching Problem 6

Problem 14: Heat equation on the whole line

Hard

Solve ut=uxxu_t=u_{xx} for −∞<x<∞-\infty<x<\infty, t>0t>0, with u(x,0)=e−x2u(x,0)=e^{-x^2}.

Hint

Transform in xx: uxx→−ω2u^u_{xx}\to-\omega^2\hat u, so u^t=−ω2u^\hat u_t=-\omega^2\hat u. Then read the inverse off the Gaussian pair of Problem 5.

View Solution

Let u^(ω,t)\hat u(\omega,t) be the transform of uu in xx. The equation becomes u^t=−ω2u^\hat u_t=-\omega^2\hat u, so u^(ω,t)=u^(ω,0) e−ω2t\hat u(\omega,t)=\hat u(\omega,0)\,e^{-\omega^2t}. By Problem 5 with a=1a=1:

u^(ω,t)=π e−ω2/4 e−ω2t=π e−ω2(1+4t)/4.\hat u(\omega,t)=\sqrt{\pi}\,e^{-\omega^2/4}\,e^{-\omega^2t}=\sqrt{\pi}\,e^{-\omega^2(1+4t)/4}.

Problem 5 with aa replaced by bb says e−bx2→π/b e−ω2/(4b)e^{-bx^2}\to\sqrt{\pi/b}\,e^{-\omega^2/(4b)}. Here b=11+4tb=\frac{1}{1+4t}, so e−x2/(1+4t)→π(1+4t) e−ω2(1+4t)/4e^{-x^2/(1+4t)}\to\sqrt{\pi(1+4t)}\,e^{-\omega^2(1+4t)/4}. Dividing by 1+4t\sqrt{1+4t}:

u(x,t)=11+4t e−x2/(1+4t).u(x,t)=\frac{1}{\sqrt{1+4t}}\,e^{-x^2/(1+4t)}.

The bump spreads out and its height falls like 1/1+4t1/\sqrt{1+4t}, while its area π\sqrt{\pi} stays constant.

Answer: u(x,t)=e−x2/(1+4t)1+4t\displaystyle u(x,t)=\frac{e^{-x^2/(1+4t)}}{\sqrt{1+4t}}

Table of the transform pairs found above

f(x)f(x)F(ω)F(\omega)Problem
11 for ∣x∣<a|x|<a2sin⁡aωω\frac{2\sin a\omega}{\omega}1
e−a∣x∣e^{-a|x|}2aa2+ω2\frac{2a}{a^2+\omega^2}2
e−axe^{-ax} for x>0x>01a+iω\frac{1}{a+i\omega}3
e−ax2e^{-ax^2}π/a e−ω2/(4a)\sqrt{\pi/a}\,e^{-\omega^2/(4a)}5
1−∣x∣1-|x| for ∣x∣<1|x|<14sin⁡2(ω/2)ω2\frac{4\sin^2(\omega/2)}{\omega^2}6
x e−x2x\,e^{-x^2}−iπ2ωe−ω2/4-\frac{i\sqrt{\pi}}{2}\omega e^{-\omega^2/4}8

Frequently asked questions

Why do different books give different answers for the same transform?

They use different conventions. With F(ω)=12π∫f(x)e−iωxdxF(\omega)=\frac{1}{\sqrt{2\pi}}\int f(x)e^{-i\omega x}dx, every answer here is divided by 2π\sqrt{2\pi}. With f^(ξ)=∫f(x)e−2πiξxdx\hat f(\xi)=\int f(x)e^{-2\pi i\xi x}dx, replace ω\omega by 2πξ2\pi\xi. Some books also use e+iωxe^{+i\omega x} in the forward transform, which replaces ω\omega by −ω-\omega.

What is the difference between a Fourier series and a Fourier transform?

A Fourier series writes a periodic function (or one given on a finite interval) as a sum over discrete frequencies nn. The Fourier transform handles functions on the whole real line that are not periodic, and the sum becomes an integral over all frequencies ω\omega.

When does the Fourier transform exist?

A simple sufficient condition is ∫−∞∞∣f(x)∣ dx<∞\int_{-\infty}^{\infty}|f(x)|\,dx<\infty. Functions such as 11, sin⁡x\sin x or xx do not satisfy it; their transforms exist only as generalized functions (delta functions).

How is the Fourier transform related to the Laplace transform?

For a function that is zero for x<0x<0, the Fourier transform is the Laplace transform evaluated at s=iωs=i\omega. Problem 3 shows this: L{e−ax}=1s+a\mathcal{L}\{e^{-ax}\}=\frac{1}{s+a} becomes 1a+iω\frac{1}{a+i\omega}.