Practice / Calculus

Improper integrals: infinite limits, infinite integrands and comparison

Ten improper integrals: 1/x³ to infinity, the p-test at infinity and at zero, an integrand that blows up inside the interval, ln x on (0, 1], 1/(1 + x²) over the whole line, x e^(−x²), a comparison that proves convergence, a partial-fraction limit that gives ln 2, and the Cauchy distribution whose mean does not exist, with worked solutions and the mistakes of integrating straight through a singularity, canceling ∞ − ∞ and comparing in the wrong direction.

Before you start

Probability lives on improper integrals: a density has to integrate to 11 over an infinite range, and a mean or a variance exists only if another improper integral converges. The definition is always the same: replace the infinite limit, or the point where the integrand blows up, with a variable, integrate, and take a limit. When no antiderivative is available, a comparison with 1xp\tfrac{1}{x^p} often settles convergence. The work goes wrong in a few places: a singularity inside the interval integrated straight through, two divergent pieces subtracted as if ∞−∞=0\infty - \infty = 0, a symmetric limit taken as the value of a two-sided integral, a comparison made in the direction that proves nothing, and the pp-test used with the wrong threshold near 00. These ten problems cover each of them.

  • Infinite limit. ∫a∞f(x) dx=lim⁡b→∞∫abf(x) dx\displaystyle\int_a^\infty f(x)\,dx = \lim_{b\to\infty}\int_a^b f(x)\,dx. It converges if the limit is a finite number and diverges otherwise.
  • Infinite integrand. If ff blows up at aa, then ∫abf(x) dx=lim⁡ε→0+∫a+εbf(x) dx\displaystyle\int_a^b f(x)\,dx = \lim_{\varepsilon\to0^+}\int_{a+\varepsilon}^b f(x)\,dx. If it blows up at a point cc inside [a,b][a, b], split at cc; the integral converges only if both pieces do.
  • Both ends infinite. ∫−∞∞f=∫−∞0f+∫0∞f\displaystyle\int_{-\infty}^\infty f = \int_{-\infty}^0 f + \int_0^\infty f, with each piece a separate limit. Both must converge.
  • The pp-test. ∫1∞dxxp\displaystyle\int_1^\infty \frac{dx}{x^p} converges exactly when p>1p > 1, and ∫01dxxp\displaystyle\int_0^1 \frac{dx}{x^p} converges exactly when p<1p < 1. At p=1p = 1 both diverge.
  • Comparison. If 0≤f(x)≤g(x)0 \le f(x) \le g(x) for x≥ax \ge a: if ∫a∞g\int_a^\infty g converges, so does ∫a∞f\int_a^\infty f; if ∫a∞f\int_a^\infty f diverges, so does ∫a∞g\int_a^\infty g. Being smaller than something divergent, or larger than something convergent, proves nothing.

Builds on: Integration: substitution and parts, Partial fractions and integrating rational functions, L'Hôpital's rule and indeterminate forms

Problems

  1. ·

    Evaluate ∫1∞dxx3\displaystyle\int_1^\infty \frac{dx}{x^3}.

  2. ··

    Show that ∫1∞dxxp\displaystyle\int_1^\infty \frac{dx}{x^p} converges exactly when p>1p > 1, and find its value. Use the result on p=32p = \tfrac32 and p=1p = 1.

  3. ··

    Evaluate ∫01dxx\displaystyle\int_0^1 \frac{dx}{\sqrt x}, then say for which pp the integral ∫01dxxp\displaystyle\int_0^1 \frac{dx}{x^p} converges.

  4. ··

    Does ∫−12dxx2\displaystyle\int_{-1}^2 \frac{dx}{x^2} converge?

  5. ··

    Evaluate ∫01ln⁡x dx\displaystyle\int_0^1 \ln x\,dx.

  6. ··

    Evaluate ∫−∞∞dx1+x2\displaystyle\int_{-\infty}^{\infty} \frac{dx}{1 + x^2}.

  7. ··

    Evaluate ∫0∞xe−x2 dx\displaystyle\int_0^\infty xe^{-x^2}\,dx.

  8. ···

    Show that ∫1∞dxx3+1\displaystyle\int_1^\infty \frac{dx}{\sqrt{x^3 + 1}} converges, and give an upper bound for it.

  9. ···

    Evaluate ∫1∞dxx(x+1)\displaystyle\int_1^\infty \frac{dx}{x(x + 1)}.

  10. ···

    Does ∫−∞∞x1+x2 dx\displaystyle\int_{-\infty}^{\infty} \frac{x}{1 + x^2}\,dx converge? What does the answer say about the mean of the Cauchy distribution, whose density is 1π(1+x2)\dfrac{1}{\pi(1 + x^2)}?

Worked solutions

Problem 1

Evaluate ∫1∞dxx3\displaystyle\int_1^\infty \frac{dx}{x^3}.

  1. ∫1bx−3 dx=[−12x2]1b=12−12b2\displaystyle\int_1^b x^{-3}\,dx = \Big[-\frac{1}{2x^2}\Big]_1^b = \frac12 - \frac{1}{2b^2}Replace ∞\infty with bb and integrate.
  2. 12b2→0\dfrac{1}{2b^2} \to 0 as b→∞b \to \inftyTake the limit.
  3. 12\tfrac12The integral converges: the area under 1x3\tfrac1{x^3} from 11 out to infinity is finite.

Problem 2

Show that ∫1∞dxxp\displaystyle\int_1^\infty \frac{dx}{x^p} converges exactly when p>1p > 1, and find its value. Use the result on p=32p = \tfrac32 and p=1p = 1.

  1. For p≠1p \ne 1: ∫1bx−p dx=b1−p−11−p\displaystyle\int_1^b x^{-p}\,dx = \frac{b^{1-p} - 1}{1 - p}The power rule.
  2. If p>1p > 1, b1−p→0b^{1-p} \to 0 and the integral is −11−p=1p−1\dfrac{-1}{1 - p} = \dfrac{1}{p - 1}; if p<1p < 1, b1−p→∞b^{1-p} \to \inftyThe exponent 1−p1 - p is negative in the first case and positive in the second.
  3. For p=1p = 1: ∫1bdxx=ln⁡b→∞\displaystyle\int_1^b \frac{dx}x = \ln b \to \inftyThe borderline case diverges, slowly.
  4. Converges to 1p−1\tfrac{1}{p - 1} for p>1p > 1, diverges for p≤1p \le 1; p=32p = \tfrac32 gives 22, p=1p = 1 diverges1x\tfrac1x and 1x1.01\tfrac1{x^{1.01}} look almost the same, but only the second has a finite area.

Problem 3

Evaluate ∫01dxx\displaystyle\int_0^1 \frac{dx}{\sqrt x}, then say for which pp the integral ∫01dxxp\displaystyle\int_0^1 \frac{dx}{x^p} converges.

  1. 1x\dfrac{1}{\sqrt x} blows up at x=0x = 0, so ∫01dxx=lim⁡ε→0+[2x]ε1\displaystyle\int_0^1 \frac{dx}{\sqrt x} = \lim_{\varepsilon\to0^+}\Big[2\sqrt x\Big]_\varepsilon^1The problem is at the left end.
  2. =lim⁡ε→0+(2−2ε)=2= \lim_{\varepsilon\to0^+}\big(2 - 2\sqrt\varepsilon\big) = 2Converges.
  3. For p≠1p \ne 1: ∫ε1x−p dx=1−ε1−p1−p\displaystyle\int_\varepsilon^1 x^{-p}\,dx = \frac{1 - \varepsilon^{1-p}}{1 - p}The same power rule as Problem 2.
  4. ε1−p→0\varepsilon^{1-p} \to 0 when p<1p < 1 and →∞\to \infty when p>1p > 1; p=1p = 1 gives −ln⁡ε→∞-\ln\varepsilon \to \inftyNear 00 the roles of the exponents are reversed.
  5. 22; ∫01x−p dx\displaystyle\int_0^1 x^{-p}\,dx converges to 11−p\tfrac{1}{1 - p} exactly when p<1p < 1Near 00 a small power blows up slowly enough, and near ∞\infty a large power decays fast enough. p=1p = 1 fails at both ends.

Problem 4

Does ∫−12dxx2\displaystyle\int_{-1}^2 \frac{dx}{x^2} converge?

  1. 1x2\dfrac{1}{x^2} blows up at x=0x = 0, inside [−1,2][-1, 2]Check the interval for a zero in a denominator before integrating.
  2. ∫−12=∫−10+∫02\displaystyle\int_{-1}^2 = \int_{-1}^0 + \int_0^2, and both pieces must convergeSplit at the singularity.
  3. ∫ε2dxx2=1ε−12→∞\displaystyle\int_\varepsilon^2 \frac{dx}{x^2} = \frac1\varepsilon - \frac12 \to \inftyThe right piece diverges: this is p=2≥1p = 2 \ge 1 near 00.
  4. No: the integral divergesOne divergent piece is enough. The left piece diverges as well.

Problem 5

Evaluate ∫01ln⁡x dx\displaystyle\int_0^1 \ln x\,dx.

  1. ln⁡x→−∞\ln x \to -\infty as x→0+x \to 0^+, so take lim⁡ε→0+∫ε1ln⁡x dx\displaystyle\lim_{\varepsilon\to0^+}\int_\varepsilon^1 \ln x\,dxAn infinite integrand at the left end.
  2. ∫ln⁡x dx=xln⁡x−x\displaystyle\int \ln x\,dx = x\ln x - xBy parts with u=ln⁡xu = \ln x, dv=dxdv = dx.
  3. ∫ε1ln⁡x dx=(0−1)−(εln⁡ε−ε)\displaystyle\int_\varepsilon^1 \ln x\,dx = (0 - 1) - (\varepsilon\ln\varepsilon - \varepsilon)Evaluate at the limits.
  4. εln⁡ε=ln⁡ε1/ε→0\varepsilon\ln\varepsilon = \dfrac{\ln\varepsilon}{1/\varepsilon} \to 0L'Hôpital: 1/ε−1/ε2=−ε→0\dfrac{1/\varepsilon}{-1/\varepsilon^2} = -\varepsilon \to 0. The same limit justifies 0log⁡0=00\log0 = 0 in entropy.
  5. −1-1Negative, because ln⁡x<0\ln x < 0 on (0,1)(0, 1): the region lies below the axis.

Problem 6

Evaluate ∫−∞∞dx1+x2\displaystyle\int_{-\infty}^{\infty} \frac{dx}{1 + x^2}.

  1. ∫−∞∞=∫−∞0+∫0∞\displaystyle\int_{-\infty}^\infty = \int_{-\infty}^0 + \int_0^\inftyBoth ends are infinite, so split and take two separate limits.
  2. ∫0bdx1+x2=arctan⁡b→π2\displaystyle\int_0^b \frac{dx}{1 + x^2} = \arctan b \to \frac\pi2arctan⁡\arctan is the antiderivative, and it levels off at π2\tfrac\pi2.
  3. ∫a0dx1+x2=−arctan⁡a→π2\displaystyle\int_a^0 \frac{dx}{1 + x^2} = -\arctan a \to \frac\pi2 as a→−∞a \to -\inftyThe integrand is even, so the left half matches the right.
  4. π\piBoth pieces converge. Dividing by π\pi gives the Cauchy density 1π(1+x2)\tfrac{1}{\pi(1 + x^2)}, which integrates to 11 (see Problem 10).

Problem 7

Evaluate ∫0∞xe−x2 dx\displaystyle\int_0^\infty xe^{-x^2}\,dx.

  1. Let u=x2u = x^2, du=2x dxdu = 2x\,dxThe xx in front is exactly what the substitution needs.
  2. ∫0bxe−x2 dx=12∫0b2e−u du=12(1−e−b2)\displaystyle\int_0^b xe^{-x^2}\,dx = \frac12\int_0^{b^2} e^{-u}\,du = \frac12\big(1 - e^{-b^2}\big)Change the limits with the variable: uu runs from 00 to b2b^2.
  3. e−b2→0e^{-b^2} \to 0Take the limit.
  4. 12\tfrac12The Gaussian e−x2e^{-x^2} on its own has no elementary antiderivative; with the extra xx it does.

Problem 8

Show that ∫1∞dxx3+1\displaystyle\int_1^\infty \frac{dx}{\sqrt{x^3 + 1}} converges, and give an upper bound for it.

  1. x3+1>x3x^3 + 1 > x^3, so x3+1>x3/2\sqrt{x^3 + 1} > x^{3/2} and 1x3+1<1x3/2\dfrac{1}{\sqrt{x^3 + 1}} < \dfrac{1}{x^{3/2}} for x≥1x \ge 1A bigger denominator makes a smaller fraction.
  2. ∫1∞dxx3/2=13/2−1=2\displaystyle\int_1^\infty \frac{dx}{x^{3/2}} = \frac{1}{3/2 - 1} = 2The pp-test with p=32>1p = \tfrac32 > 1 (Problem 2).
  3. The integrand is positive and below a function whose integral convergesComparison in the direction that proves convergence.
  4. It converges, and its value is less than 22Numerically it is about 1.8951.895. There is no elementary antiderivative, so the comparison is the proof.

Problem 9

Evaluate ∫1∞dxx(x+1)\displaystyle\int_1^\infty \frac{dx}{x(x + 1)}.

  1. 1x(x+1)=1x−1x+1\dfrac{1}{x(x + 1)} = \dfrac1x - \dfrac{1}{x + 1}Partial fractions, by the cover-up rule.
  2. ∫1b(1x−1x+1) dx=[ln⁡xx+1]1b=ln⁡bb+1−ln⁡12\displaystyle\int_1^b \Big(\frac1x - \frac1{x + 1}\Big)\,dx = \Big[\ln\frac{x}{x + 1}\Big]_1^b = \ln\frac{b}{b + 1} - \ln\frac12Combine the logs before taking any limit.
  3. bb+1→1\dfrac{b}{b + 1} \to 1, so ln⁡bb+1→0\ln\dfrac{b}{b + 1} \to 0The two logs grow together and their difference settles down.
  4. ln⁡2≈0.693\ln2 \approx 0.693The integrand behaves like 1x2\tfrac1{x^2} for large xx, so convergence was expected; the split pieces 1x\tfrac1x and 1x+1\tfrac1{x + 1} each diverge on their own.

Problem 10

Does ∫−∞∞x1+x2 dx\displaystyle\int_{-\infty}^{\infty} \frac{x}{1 + x^2}\,dx converge? What does the answer say about the mean of the Cauchy distribution, whose density is 1π(1+x2)\dfrac{1}{\pi(1 + x^2)}?

  1. Split at 00: ∫0bx1+x2 dx=12ln⁡(1+b2)\displaystyle\int_0^b \frac{x}{1 + x^2}\,dx = \frac12\ln(1 + b^2)Substitute u=1+x2u = 1 + x^2.
  2. 12ln⁡(1+b2)→∞\tfrac12\ln(1 + b^2) \to \infty as b→∞b \to \inftyThe right half diverges, and by symmetry the left half goes to −∞-\infty.
  3. The integral divergesA two-sided integral needs both halves to converge on their own.
  4. A symmetric cutoff gives ∫−bbx1+x2 dx=0\displaystyle\int_{-b}^{b} \frac{x}{1 + x^2}\,dx = 0, but ∫−b2bx1+x2 dx=12ln⁡1+4b21+b2→ln⁡2\displaystyle\int_{-b}^{2b} \frac{x}{1 + x^2}\,dx = \frac12\ln\frac{1 + 4b^2}{1 + b^2} \to \ln2Different ways of letting the limits go to infinity give different answers, which is why neither one is the value.
  5. It diverges, so the Cauchy distribution has no meanThe mean would be 1π∫x⋅11+x2 dx\tfrac1\pi\int x\cdot\tfrac{1}{1 + x^2}\,dx, this integral divided by π\pi. Sample averages of Cauchy draws never settle down.

Where this goes wrong

1. Integrating straight through a singularity

The antiderivative exists on both sides of the problem point, so the formula F(b)−F(a)F(b) - F(a) seems to apply.

  1. ∫−12dxx2\displaystyle\int_{-1}^2 \frac{dx}{x^2}, with antiderivative −1x-\dfrac1xRight so far: Problem 4.
  2. “Evaluate the antiderivative at the limits.”The habit that causes the mistake: the fundamental theorem used without checking that the integrand is continuous on [−1,2][-1, 2].
  3. [−1x]−12=−12−1=−32\Big[-\dfrac1x\Big]_{-1}^2 = -\dfrac12 - 1 = -\dfrac32A positive integrand cannot have a negative integral. 1x2\tfrac1{x^2} blows up at 00, inside the interval, and the integral diverges: ∫ε2dxx2=1ε−12\int_\varepsilon^2 \tfrac{dx}{x^2} = \tfrac1\varepsilon - \tfrac12, which is 99.599.5 at ε=0.01\varepsilon = 0.01 and keeps growing.

2. Canceling ∞ − ∞

After partial fractions the integral looks like two simpler ones.

  1. 1x(x+1)=1x−1x+1\dfrac{1}{x(x + 1)} = \dfrac1x - \dfrac1{x + 1}Right so far: Problem 9, step 1.
  2. “Integrate each term from 11 to ∞\infty separately.”The habit that causes the mistake: splitting an improper integral into pieces that are themselves improper.
  3. ∫1∞dxx−∫1∞dxx+1=∞−∞\displaystyle\int_1^\infty \frac{dx}{x} - \int_1^\infty \frac{dx}{x + 1} = \infty - \infty, so the integral diverges∞−∞\infty - \infty has no value, so it decides nothing. Keep the pieces together up to a finite bb: ln⁡bb+1+ln⁡2→ln⁡2≈0.693\ln\tfrac{b}{b + 1} + \ln2 \to \ln2 \approx 0.693. The integral converges.

3. Taking a symmetric limit as the value

For an odd integrand, cutting off at −b-b and bb gives 00 every time, which looks like the answer.

  1. ∫−∞∞x1+x2 dx\displaystyle\int_{-\infty}^\infty \frac{x}{1 + x^2}\,dx, and ∫−bbx1+x2 dx=0\displaystyle\int_{-b}^{b} \frac{x}{1 + x^2}\,dx = 0 for every bbRight so far: Problem 10, step 4.
  2. “So the limit as b→∞b \to \infty is 00.”The habit that causes the mistake: one particular way of going to infinity treated as the definition.
  3. The integral is 00, so the Cauchy distribution has mean 00The definition takes the two ends separately, and ∫0b\int_0^b already goes to ∞\infty. Cutting off at −b-b and 2b2b gives ln⁡2≈0.693\ln2 \approx 0.693 instead of 00. The integral diverges, and the Cauchy distribution has no mean at all, though its median is 00.

4. Comparing in the wrong direction

Comparison only works one way in each case, and the wrong way still looks like an argument.

  1. 11+x2≤1x\dfrac{1}{1 + x^2} \le \dfrac1x for x≥1x \ge 1Right so far: x≤1+x2x \le 1 + x^2 for every xx.
  2. “∫1∞dxx\int_1^\infty \tfrac{dx}{x} diverges.”The habit that causes the mistake: knowing only that the bigger function's integral diverges.
  3. So ∫1∞dx1+x2\displaystyle\int_1^\infty \frac{dx}{1 + x^2} divergesBeing below something infinite says nothing: the smaller function's area could still be finite, and here it is, π2−arctan⁡1=π4≈0.785\tfrac\pi2 - \arctan 1 = \tfrac\pi4 \approx 0.785 (Problem 6). To prove divergence, show the integrand is above a divergent one; to prove convergence, below a convergent one, as 11+x2≤1x2\tfrac1{1 + x^2} \le \tfrac1{x^2} does.

5. Using the p > 1 rule near zero

The pp-test is usually learned on [1,∞)[1, \infty), and the threshold gets carried over unchanged.

  1. ∫01dxx2\displaystyle\int_0^1 \frac{dx}{x^2}, which is improper at 00Right so far: the setting of Problem 3.
  2. “p=2>1p = 2 > 1, so it converges, to 1p−1\tfrac{1}{p - 1}.”The habit that causes the mistake: the rule for [1,∞)[1, \infty) used on (0,1](0, 1].
  3. ∫01dxx2=1\displaystyle\int_0^1 \frac{dx}{x^2} = 1Near 00 the test is reversed: it converges only for p<1p < 1. Here ∫ε1dxx2=1ε−1\int_\varepsilon^1 \tfrac{dx}{x^2} = \tfrac1\varepsilon - 1, which is 9999 at ε=0.01\varepsilon = 0.01 and 999999 at ε=0.001\varepsilon = 0.001: it diverges. A larger power decays faster at infinity but blows up faster at 00.

Print this set: improper-integrals.pdf (problems, answers, and worked solutions on separate pages).

Read the guide: Improper integrals: replace infinity with a limit, and check for blow-ups inside