Calculus · Integrals with a Parameter

The Fourier Integral: Building Any Function out of Waves

A Fourier series writes a periodic function as a sum of sines and cosines. But most signals in real life, like a single clap or a single pulse, are not periodic. The Fourier integral handles them by replacing the sum with an integral over all frequencies. This post explains how it works, and how it leads to the Fourier transform.

1. From Fourier series to the Fourier integral

Recall that a function with period \(2\ell\) can be written as a Fourier series

\[ f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\Big(a_n\cos\frac{n\pi x}{\ell} + b_n\sin\frac{n\pi x}{\ell}\Big). \]

Only the frequencies \( \lambda_n = \frac{n\pi}{\ell} \) appear, spaced \( \Delta\lambda = \frac{\pi}{\ell} \) apart. Now imagine stretching the period: let \(\ell \to \infty\). The function no longer repeats, the allowed frequencies crowd closer and closer together, and in the limit every frequency \(\lambda \ge 0\) is present. The sum over \(n\) becomes an integral over \(\lambda\) (a Riemann sum with step \(\Delta\lambda\) turning into \(\int d\lambda\)).

That is the Fourier integral: instead of a discrete list of amplitudes \(a_n, b_n\), we get amplitude functions \(a(\lambda), b(\lambda)\) that tell us how much of each frequency the function contains. This is the mathematical idea behind the spectrum of a sound, or the frequency display of an equaliser.

2. The Fourier integral theorem

Theorem · Representation by the Fourier integral Suppose \(f(x)\) is absolutely integrable on the whole real line, \[ \int_{-\infty}^{\infty} |f(x)|\,dx < \infty, \] and satisfies the Dirichlet conditions on every finite interval. Then at every point of continuity \[ f(x) = \int_0^{\infty}\big[a(\lambda)\cos\lambda x + b(\lambda)\sin\lambda x\big]\,d\lambda, \tag{1} \] where \[ a(\lambda) = \frac1\pi\int_{-\infty}^{\infty} f(t)\cos\lambda t\,dt, \qquad b(\lambda) = \frac1\pi\int_{-\infty}^{\infty} f(t)\sin\lambda t\,dt. \] At a point of discontinuity, the integral (1) equals the average of the one-sided limits: \[ \frac12\big[f(x + 0) + f(x - 0)\big]. \]

A few comments on the hypotheses:

Example 1 · The rectangular pulse Let \( f(x) = 1 \) for \( |x| < 1 \) and \( f(x) = 0 \) for \( |x| > 1 \). It is even, so \( b(\lambda) = 0 \), and \[ a(\lambda) = \frac1\pi\int_{-1}^{1}\cos\lambda t\,dt = \frac{2\sin\lambda}{\pi\lambda}. \] Therefore \[ \frac2\pi\int_0^\infty \frac{\sin\lambda\cos\lambda x}{\lambda}\,d\lambda = \begin{cases} 1, & |x| < 1,\\[2pt] \tfrac12, & |x| = 1,\\[2pt] 0, & |x| > 1. \end{cases} \] At \(x = 0\) this says \( \int_0^\infty \frac{\sin\lambda}{\lambda}\,d\lambda = \frac\pi2 \), the Dirichlet integral we computed in an earlier post with a completely different method. At the jumps \(x = \pm1\) we get the average \(\frac12\).

Notice what happened: a function with sharp corners is built from perfectly smooth waves, but it needs all frequencies to do it, with amplitudes decaying only like \(\frac1\lambda\). Sharp features in \(f\) mean slow decay of the spectrum. Smooth functions have spectra that decay fast.

3. Even and odd functions

As with Fourier series, symmetry cuts the work in half. If \(f\) is even, then \(f(t)\sin\lambda t\) is odd and \(b(\lambda) = 0\); if \(f\) is odd, \(a(\lambda) = 0\).

Even function: cosine integral \[ f(x) = \int_0^\infty a(\lambda)\cos\lambda x\,d\lambda, \qquad a(\lambda) = \frac2\pi\int_0^\infty f(t)\cos\lambda t\,dt. \tag{2} \]
Odd function: sine integral \[ f(x) = \int_0^\infty b(\lambda)\sin\lambda x\,d\lambda, \qquad b(\lambda) = \frac2\pi\int_0^\infty f(t)\sin\lambda t\,dt. \tag{3} \]
Example 2 · Laplace's integral \( f(x) = e^{-|x|} \) is even and absolutely integrable. Using \( \int_0^\infty e^{-t}\cos\lambda t\,dt = \frac{1}{1 + \lambda^2} \), \[ a(\lambda) = \frac{2}{\pi}\cdot\frac{1}{1 + \lambda^2}, \qquad e^{-|x|} = \frac2\pi\int_0^\infty \frac{\cos\lambda x}{1 + \lambda^2}\,d\lambda. \] Read backwards, this evaluates an integral that is hard to do directly: \[ \int_0^\infty \frac{\cos\lambda x}{1 + \lambda^2}\,d\lambda = \frac\pi2e^{-|x|}. \] (This is the formula mentioned in the post on uniform convergence, now proved.)

4. Functions on a half-line

Often \(f\) is only given for \(x > 0\), for instance a signal that starts at time zero, or the temperature along a semi-infinite rod. We can then choose how to extend it to negative \(x\).

Representation on \((0, \infty)\) If \(f(x)\) is defined on \((0, \infty)\), absolutely integrable there, and satisfies the Dirichlet conditions on every finite interval \((a, b) \subset (0, \infty)\), then \(f\) can be represented
  • by the cosine integral (2), using its even extension \(f(-x) = f(x)\), or
  • by the sine integral (3), using its odd extension \(f(-x) = -f(x)\).
Both represent the same \(f\) for \(x > 0\); they differ only on the negative half-axis and at \(x = 0\).
Example 3 · Two representations of \(e^{-x}\) For \(x > 0\), let \(f(x) = e^{-x}\).

Even extension gives \(e^{-|x|}\), which leads back to Example 2:

\[ e^{-x} = \frac2\pi\int_0^\infty \frac{\cos\lambda x}{1 + \lambda^2}\,d\lambda \qquad (x \ge 0). \]

Odd extension: with \( \int_0^\infty e^{-t}\sin\lambda t\,dt = \frac{\lambda}{1 + \lambda^2} \),

\[ e^{-x} = \frac2\pi\int_0^\infty \frac{\lambda\sin\lambda x}{1 + \lambda^2}\,d\lambda \qquad (x > 0). \] At \(x = 0\) the sine integral gives \(0\): the odd extension jumps from \(-1\) to \(1\) there, and \(0\) is the average. Which extension to use depends on the problem; in physical problems it is often dictated by the boundary condition at \(x = 0\) (a prescribed value usually calls for the sine form, a prescribed derivative for the cosine form).

5. The Fourier transform

The real form (1) needs two amplitude functions. Using Euler's formula \( e^{i\theta} = \cos\theta + i\sin\theta \), the cosines and sines combine into one complex exponential, and the two functions \(a, b\) combine into one complex function. The result is the Fourier transform.

Fourier transform If \(f\) can be represented by the Fourier integral at every \(x \in (-\infty, \infty)\), except possibly at finitely many points, then the function \[ F(z) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} f(u)\,e^{izu}\,du \qquad (i = \sqrt{-1}) \tag{5} \] is called the Fourier transform of \(f\), and \(f\) is recovered from it by the inverse transform \[ f(x) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} F(z)\,e^{-ixz}\,dz. \tag{4} \] In other words, \(f\) is the solution of the integral equation (4) with the known function \(F\).

Interpretation: \(F(z)\) measures "how much" of the frequency \(z\) is present in \(f\). The transform takes you from the time (or space) domain to the frequency domain; the inverse transform takes you back. The two formulas are almost symmetric: only the sign in the exponent changes.

Conventions differ Different books put the constant \( \frac{1}{2\pi} \) in different places: all of it in front of the inverse, all in front of the transform, or \( \frac{1}{\sqrt{2\pi}} \) in front of each (the symmetric choice used here). The sign in the exponent also varies. The only rule is that the product of the two constants must be \( \frac{1}{2\pi} \). When using a table of transforms, always check which convention it uses.
Example 4 · The Gaussian is its own transform Take \( f(u) = e^{-u^2/2} \). Since \(f\) is even, the sine part of \(e^{izu}\) integrates to zero, and \[ F(z) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-u^2/2}\cos(zu)\,du. \] In the post on differentiating improper integrals we showed \( \int_0^\infty e^{-s^2}\cos(ms)\,ds = \frac{\sqrt\pi}{2}e^{-m^2/4} \). Substituting \(u = \sqrt2\,s\): \[ \int_{-\infty}^{\infty} e^{-u^2/2}\cos(zu)\,du = 2\sqrt2\int_0^\infty e^{-s^2}\cos(\sqrt2\,zs)\,ds = \sqrt{2\pi}\,e^{-z^2/2}. \] Hence \[ F(z) = e^{-z^2/2}. \] The bell curve transforms into the same bell curve. This remarkable fact is one reason the Gaussian is so central in probability and physics.

6. The cosine and sine transforms

For even or odd functions, or for functions on a half-line, the complex transform reduces to a real one, exactly as the Fourier integral reduced to (2) and (3).

Fourier cosine transform For \(f\) even (or defined on \((0, \infty)\) and extended evenly), \[ F_c(z) = \sqrt{\frac2\pi}\int_0^\infty f(u)\cos(zu)\,du, \qquad f(x) = \sqrt{\frac2\pi}\int_0^\infty F_c(z)\cos(xz)\,dz. \]
Fourier sine transform For \(f\) odd (or defined on \((0, \infty)\) and extended oddly), \[ F_s(z) = \sqrt{\frac2\pi}\int_0^\infty f(u)\sin(zu)\,du, \qquad f(x) = \sqrt{\frac2\pi}\int_0^\infty F_s(z)\sin(xz)\,dz. \]

Note the beautiful symmetry: the transform and its inverse are the same formula. Applying the cosine (or sine) transform twice gives back the original function.

A function given on \((0, \infty)\) can be extended evenly or oddly, depending on whether the cosine or the sine transform is needed.

Example 5 For the rectangular pulse (\(f(u) = 1\) for \(0 < u < 1\), \(0\) for \(u > 1\)): \[ F_c(z) = \sqrt{\frac2\pi}\int_0^1 \cos(zu)\,du = \sqrt{\frac2\pi}\,\frac{\sin z}{z}, \qquad F_s(z) = \sqrt{\frac2\pi}\int_0^1 \sin(zu)\,du = \sqrt{\frac2\pi}\,\frac{1 - \cos z}{z}. \]

7. Solving integral equations

The inversion formulas say something very practical: if you know the transform, you know the function. This lets us solve equations where the unknown function sits inside an integral.

Example 6 Find \(f\) such that \( \displaystyle\int_0^\infty f(u)\cos(zu)\,du = e^{-z} \) for \(z \ge 0\).

The left side is \( \sqrt{\frac\pi2}\,F_c(z) \), so \( F_c(z) = \sqrt{\frac2\pi}\,e^{-z} \). Invert:

\[ f(x) = \sqrt{\frac2\pi}\int_0^\infty \sqrt{\frac2\pi}\,e^{-z}\cos(xz)\,dz = \frac2\pi\cdot\frac{1}{1 + x^2}. \] Check (Example 2): \( \int_0^\infty \frac{2}{\pi}\frac{\cos zu}{1 + u^2}\,du = \frac2\pi\cdot\frac\pi2e^{-z} = e^{-z} \). ✓

8. Summary

CaseRepresentationCoefficient / transform
General \(f\) on \(\mathbb R\)\( \int_0^\infty [a(\lambda)\cos\lambda x + b(\lambda)\sin\lambda x]\,d\lambda \)\( a, b = \frac1\pi\int_{-\infty}^\infty f(t)\cos\lambda t,\ \sin\lambda t\,dt \)
Even \(f\)\( \int_0^\infty a(\lambda)\cos\lambda x\,d\lambda \)\( a = \frac2\pi\int_0^\infty f(t)\cos\lambda t\,dt \)
Odd \(f\)\( \int_0^\infty b(\lambda)\sin\lambda x\,d\lambda \)\( b = \frac2\pi\int_0^\infty f(t)\sin\lambda t\,dt \)
Complex form\( f(x) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty F(z)e^{-ixz}dz \)\( F(z) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty f(u)e^{izu}du \)
Cosine transform\( f = \sqrt{\frac2\pi}\int_0^\infty F_c\cos(xz)\,dz \)\( F_c = \sqrt{\frac2\pi}\int_0^\infty f\cos(zu)\,du \)
Sine transform\( f = \sqrt{\frac2\pi}\int_0^\infty F_s\sin(xz)\,dz \)\( F_s = \sqrt{\frac2\pi}\int_0^\infty f\sin(zu)\,du \)

At points of discontinuity, every representation gives \( \frac12[f(x + 0) + f(x - 0)] \).

9. Practice problems

Try these before opening the solution. More solved problems are in Definite Integrals and Series.

Problem 1: Write the Fourier integral of \( f(x) = 1 \) for \(0 < x < 1\), \(f(x) = -1\) for \(-1 < x < 0\), and \(0\) otherwise.

\(f\) is odd, so \( b(\lambda) = \frac2\pi\int_0^1 \sin\lambda t\,dt = \frac{2(1 - \cos\lambda)}{\pi\lambda} \), and \[ f(x) = \frac2\pi\int_0^\infty \frac{1 - \cos\lambda}{\lambda}\sin\lambda x\,d\lambda. \] At \(x = 0\) and \(x = \pm1\) the integral gives the averages \(0\) and \(\pm\frac12\).

Problem 2: Find the cosine and sine transforms of \( f(u) = e^{-au} \), \(a > 0\).

Using \( \int_0^\infty e^{-au}\cos zu\,du = \frac{a}{a^2 + z^2} \) and \( \int_0^\infty e^{-au}\sin zu\,du = \frac{z}{a^2 + z^2} \): \[ F_c(z) = \sqrt{\frac2\pi}\,\frac{a}{a^2 + z^2}, \qquad F_s(z) = \sqrt{\frac2\pi}\,\frac{z}{a^2 + z^2}. \]

Problem 3: Using Example 1, compute \( \displaystyle\int_0^\infty \frac{\sin\lambda\cos\lambda x}{\lambda}\,d\lambda \) for all real \(x\).

Multiply the result of Example 1 by \(\frac\pi2\): the integral equals \(\frac\pi2\) for \(|x| < 1\), \(\frac\pi4\) for \(|x| = 1\), and \(0\) for \(|x| > 1\).

Problem 4: Solve \( \displaystyle\int_0^\infty f(u)\sin(zu)\,du = e^{-z} \) for \(z > 0\).

\( F_s(z) = \sqrt{\frac2\pi}\,e^{-z} \), so \[ f(x) = \frac2\pi\int_0^\infty e^{-z}\sin(xz)\,dz = \frac2\pi\cdot\frac{x}{1 + x^2}. \]

Problem 5: Find the Fourier transform (5) of \( f(u) = e^{-|u|} \).

\(f\) is even, so \( F(z) = \frac{1}{\sqrt{2\pi}}\cdot 2\int_0^\infty e^{-u}\cos(zu)\,du = \sqrt{\frac2\pi}\,\frac{1}{1 + z^2} \).

Problem 6: Why can't \( f(x) = \cos x \) be represented by a Fourier integral?

It is not absolutely integrable on \(\mathbb R\): \( \int_{-\infty}^\infty |\cos x|\,dx = \infty \), and the coefficient integrals \( \int_{-\infty}^\infty \cos t\cos\lambda t\,dt \) do not converge. A pure wave contains only one frequency, so it belongs to the world of Fourier series, not integrals. (In more advanced courses it is handled with generalized functions, such as the Dirac delta.)

Final thoughts

The Fourier integral completes the picture of Fourier analysis: periodic functions are sums of discrete frequencies, non-periodic functions are integrals over a continuum of frequencies. Behind the formulas sits one idea, decompose a function into waves, work with the waves, and put the function back together. That idea powers signal processing, image compression, quantum mechanics and the solution of differential equations, and the tools you've learned in this series (improper integrals, uniform convergence, integrals with a parameter) are exactly what make it rigorous.

This post concludes the series on functions defined by integrals.