Ma · Mathematics

Swapping a Limit and an Integral: A Counterexample

Published By the 9to5Science editorial team

At a glance

  1. 1. Write both quantities

    Compare the limit of the integrals with the integral of the pointwise limit.

  2. 2. Choose concentrating spikes

    Use functions whose mass stays equal to one while their support shrinks toward a point.

  3. 3. Compute the pointwise limit

    At every fixed point, the spike eventually disappears, so the pointwise limit is zero.

  4. 4. Compare results

    The integral of the limit is zero, but every integral is one; the interchange fails.

A common mistake in analysis is to assume that pointwise convergence allows you to interchange a limit and an integral. In general, it does not.

The basic comparison is

lim⁡n→∞∫fn dμversus∫(lim⁡n→∞fn) dμ.\lim_{n\to\infty}\int f_n\,d\mu \qquad\text{versus}\qquad \int\left(\lim_{n\to\infty} f_n\right)\,d\mu.

These expressions are equal under useful hypotheses such as the dominated convergence theorem or the monotone convergence theorem. Without such a condition, they can be different.

A counterexample on [0,1]

Define

fn(x)={n,0<x<1n,0,otherwise,0≤x≤1.f_n(x)= \begin{cases} n, & 0<x<\frac{1}{n},\\ 0, & \text{otherwise}, \end{cases} \qquad 0\le x\le 1.

Each fnf_n is a narrow spike with height nn and width 1/n1/n. Its area remains constant.

Step 1: Find the pointwise limit

Fix any x∈[0,1]x\in[0,1].

If x=0x=0, then fn(0)=0f_n(0)=0 for every nn. If x>0x>0, choose N>1/xN>1/x. For every n≥Nn\ge N, we have 1/n<x1/n<x, so xx is outside the interval (0,1/n)(0,1/n) and therefore fn(x)=0f_n(x)=0.

Thus, for every fixed xx,

lim⁡n→∞fn(x)=0.\lim_{n\to\infty}f_n(x)=0.

Consequently,

∫01lim⁡n→∞fn(x) dx=∫010 dx=0.\int_0^1\lim_{n\to\infty}f_n(x)\,dx =\int_0^1 0\,dx =0.

Step 2: Integrate before taking the limit

For each nn,

∫01fn(x) dx=∫01/nn dx=n(1n)=1.\int_0^1 f_n(x)\,dx =\int_0^{1/n}n\,dx =n\left(\frac{1}{n}\right)=1.

Therefore,

lim⁡n→∞∫01fn(x) dx=lim⁡n→∞1=1.\lim_{n\to\infty}\int_0^1f_n(x)\,dx =\lim_{n\to\infty}1 =1.

The two results are different:

lim⁡n→∞∫01fn(x) dx=1≠0=∫01lim⁡n→∞fn(x) dx.\boxed{ \lim_{n\to\infty}\int_0^1 f_n(x)\,dx=1 \ne 0=\int_0^1\lim_{n\to\infty}f_n(x)\,dx }.

This is a complete example showing that pointwise convergence alone is insufficient.

Why the example works

The mass of fnf_n does not disappear; it moves into a smaller and smaller neighborhood of 00. At any fixed point, the spike eventually vanishes, which produces the pointwise limit zero. However, the total area under the spike is always one.

The sequence is not dominated by a single integrable function. Indeed, if an integrable function gg satisfied fn(x)≤g(x)f_n(x)\le g(x) almost everywhere for every nn, then gg would need to accommodate arbitrarily high values near 00. The concentration of the mass is precisely what prevents the usual dominated-convergence argument.

The convergence is pointwise everywhere, and even almost everywhere, but it is not uniform: the maximum of fnf_n is nn, so the functions do not become uniformly small.

When the interchange is valid

Dominated convergence theorem

Suppose the fnf_n are measurable, fn→ff_n\to f almost everywhere and there is an integrable function gg such that

∣fn(x)∣≤g(x)|f_n(x)|\le g(x)

for every nn and almost every xx. Then

lim⁡n→∞∫fn dμ=∫f dμ.\lim_{n\to\infty}\int f_n\,d\mu =\int f\,d\mu.

For example, let fn(x)=xnf_n(x)=x^n on [0,1][0,1]. For every x<1x<1, xn→0x^n\to0, and the exceptional point x=1x=1 does not affect the integral. Also, 0≤xn≤10\le x^n\le1, and the constant function 11 is integrable on [0,1][0,1]. Hence dominated convergence gives

lim⁡n→∞∫01xn dx=∫01lim⁡n→∞xn dx=0.\lim_{n\to\infty}\int_0^1x^n\,dx =\int_0^1\lim_{n\to\infty}x^n\,dx =0.

Directly, the left-hand side is

lim⁡n→∞1n+1=0.\lim_{n\to\infty}\frac{1}{n+1}=0.

Monotone convergence theorem

If fnf_n are measurable, 0≤fn≤fn+10\le f_n\le f_{n+1} and fn→ff_n\to f pointwise, then

lim⁡n→∞∫fn dμ=∫f dμ,\lim_{n\to\infty}\int f_n\,d\mu =\int f\,d\mu,

even if the integral is infinite. The nonnegative, increasing assumption is essential; the spike sequence above is nonnegative but not increasing in nn at each point.

Uniform convergence on a finite interval

For Riemann integrals, if fn→ff_n\to f uniformly on [a,b][a,b] and each function is integrable, then

lim⁡n→∞∫abfn(x) dx=∫abf(x) dx.\lim_{n\to\infty}\int_a^b f_n(x)\,dx =\int_a^b f(x)\,dx.

A direct estimate explains this:

∣∫abfn(x) dx−∫abf(x) dx∣≤(b−a)sup⁡x∈[a,b]∣fn(x)−f(x)∣,\left|\int_a^b f_n(x)\,dx-\int_a^b f(x)\,dx\right| \le (b-a)\sup_{x\in[a,b]}|f_n(x)-f(x)|,

and the right-hand side tends to zero.

Common mistakes

  • Confusing pointwise and uniform convergence: Pointwise convergence controls one fixed point at a time. Uniform convergence controls all points simultaneously.
  • Checking only that each integral exists: The existence of every ∫fn\int f_n does not guarantee that the limiting operation is interchangeable.
  • Using dominated convergence without a dominator: The bound must come from one fixed integrable function, not a function gng_n that changes with nn.
  • Ignoring the measure space: A constant bound is integrable on a finite-measure interval, but generally not on an infinite-measure space.
  • Forgetting cancellation: For signed functions, large positive and negative values can cancel. The dominated convergence theorem controls the absolute values and avoids this problem.

The safe procedure is to identify the convergence mode and verify a theorem’s hypotheses before swapping the limit and the integral.

References

  1. Real Analysis: Modern Techniques and Their Applications, Gerald B. Folland
  2. Real Analysis, H. L. Royden and P. M. Fitzpatrick

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.