Tutorials › Real Analysis › The Integral Test

Infinite Series · Tutorial 517 of 1000

The Integral Test

Use the Integral Test to decide convergence by integrating a function that matches the terms, and learn how the same comparisons bound the tail.

Advanced 10 min read

What You'll Learn

  • State the hypotheses and conclusion of the Integral Test
  • Compare sums and integrals over adjacent intervals
  • Use an improper integral to classify logarithmic series
  • Check whether monotonicity holds on the relevant domain
  • Bound a convergent series remainder using an integral

From p-Series to Integrals

The p-Series Convergence Criterion classifies \(\sum 1/n^p\) by the exponent \(p\). The dyadic-block proof explains the threshold by grouping terms, but it is not the only way to relate a series to familiar quantities. When the terms are values of a positive, decreasing function, areas under its graph provide another comparison.

The key idea is that a decreasing function stays between its values at the endpoints of each unit interval. Consequently, the area over that interval is bounded by the heights of neighboring terms. These comparisons lead to the Integral Test and, when the series converges, to estimates of its remainder.

Definition (Decreasing Function): A function \(f\) on an interval is decreasing here if it is nonincreasing: whenever \(x\leq y\), \(f(x)\geq f(y)\).

The Integral Test applies when the terms are samples \(f(n)\) of a function that is positive, continuous, and decreasing on an unbounded interval. Positivity matters: it makes the partial sums and the corresponding integrals nondecreasing, so their boundedness can be used to decide convergence.

Theorem (Integral Test): Suppose \(f:[1,\infty)\to\mathbb{R}\) is continuous, positive, and decreasing, and let \(a_n=f(n)\) for every positive integer \(n\). Then $$ \sum_{n=1}^{\infty}a_n \text{ converges} \quad\Longleftrightarrow\quad \int_1^\infty f(x)\,dx \text{ converges}. $$

The improper integral is understood as the limit of \(\int_1^B f(x)\,dx\) as \(B\to\infty\); if these integrals grow without bound, the improper integral diverges. The theorem is stated here for use in applications. The next tutorial proves the Integral Test. We first establish the finite comparisons behind it, then prove a separate remainder estimate.

Comparing Each Term with an Area

If \(f\) is decreasing, then on \([k,k+1]\) its values lie between \(f(k)\) and \(f(k+1)\). Integrating those pointwise bounds gives

$$ f(k+1)\leq \int_k^{k+1}f(x)\,dx\leq f(k). $$

Adding these inequalities makes the pattern clear: the integral from \(1\) to \(N+1\) is trapped between two neighboring finite sums.

Theorem (Finite Sum–Integral Comparison): If \(f:[1,\infty)\to\mathbb{R}\) is continuous and decreasing, then for every positive integer \(N\), $$ \sum_{n=2}^{N+1} f(n) \leq \int_1^{N+1} f(x)\,dx \leq \sum_{n=1}^{N} f(n). $$

Proof. For each integer \(k\) with \(1\leq k\leq N\), decreasingness gives \(f(k+1)\leq f(x)\leq f(k)\) for every \(x\in[k,k+1]\). Since \(f\) is continuous, it is Riemann integrable on each such interval. Order Preservation for the Riemann Integral therefore gives

$$ f(k+1) = \int_k^{k+1} f(k+1)\,dx \leq \int_k^{k+1} f(x)\,dx \leq \int_k^{k+1} f(k)\,dx = f(k). $$

Add these inequalities for \(k=1,\ldots,N\). Additivity of the Riemann Integral Across Adjacent Intervals gives \(\sum_{k=1}^{N}\int_k^{k+1}f(x)\,dx=\int_1^{N+1}f(x)\,dx\). The left endpoint values sum to \(\sum_{k=1}^{N}f(k+1)=\sum_{n=2}^{N+1}f(n)\), and the right endpoint values sum to \(\sum_{k=1}^{N}f(k)\). This proves both inequalities. \(\square\)

The two sides do not use exactly the same indices. In particular, the integral is bounded above by a sum that includes \(f(1)\), and bounded below by a sum that begins with \(f(2)\). That one-term offset is harmless for convergence, but it matters when writing precise tail estimates.

Applying the Integral Test

To use the test, identify a function whose values at the integers are the series terms, and check all three hypotheses: positivity, continuity, and decreasingness on the interval in question. Then evaluate or classify the improper integral. A finite number of starting terms does not affect convergence, by the earlier Theorem (Finite Changes Preserve Series Convergence).

Worked Example: A Logarithmic Series That Converges

Consider

$$ \sum_{n=3}^{\infty}\frac{1}{n(\log n)^2}. $$

Set \(f(x)=1/[x(\log x)^2]\) for \(x\geq3\). It is positive and continuous there. Differentiating gives

$$ f'(x)=-\frac{\log x+2}{x^2(\log x)^3}. $$

For \(x\geq3\), both \(\log x\) and \(\log x+2\) are positive, so \(f'(x)<0\); hence \(f\) is decreasing. An antiderivative is \(-1/\log x\), since

$$ \frac{d}{dx}\left(-\frac{1}{\log x}\right) = \frac{1}{x(\log x)^2}. $$

Thus, for \(B\geq3\),

$$ \int_3^B \frac{dx}{x(\log x)^2} = \frac{1}{\log 3}-\frac{1}{\log B} \longrightarrow \frac{1}{\log 3} \quad\text{as }B\to\infty. $$

The improper integral converges, so the Integral Test shows that the series converges.

Worked Example: A Logarithmic Series That Diverges

Now consider

$$ \sum_{n=2}^{\infty}\frac{1}{n\log n}. $$

Take \(g(x)=1/(x\log x)\) for \(x\geq2\). This function is positive and continuous, and

$$ g'(x)=-\frac{\log x+1}{x^2(\log x)^2}<0 $$

because \(\log x>0\) on this domain. An antiderivative is \(\log(\log x)\), since its derivative is \(1/(x\log x)\). Therefore,

$$ \int_2^B\frac{dx}{x\log x} = \log(\log B)-\log(\log 2) \longrightarrow\infty \quad\text{as }B\to\infty. $$

The integral diverges, so the series diverges by the Integral Test. Notice that the terms do tend to zero: that necessary condition for convergence is not sufficient to establish convergence.

Worked Example: A Decreasing Rational Function

Determine the behavior of

$$ \sum_{n=1}^{\infty}\frac{n}{n^2+1}. $$

Let \(h(x)=x/(x^2+1)\) for \(x\geq1\). It is positive and continuous, and

$$ h'(x)=\frac{1-x^2}{(x^2+1)^2}\leq0 \quad (x\geq1), $$

so it is decreasing. Direct differentiation verifies the antiderivative \(\tfrac12\log(x^2+1)\). Hence

$$ \int_1^B\frac{x}{x^2+1}\,dx = \frac12\log(B^2+1)-\frac12\log 2. $$

As \(B\to\infty\), this expression tends to infinity. The Integral Test therefore shows that the series diverges. The non-strict inequality \(h'(1)=0\) causes no problem: the required condition is decreasingness, not strictly decreasing behavior at every point.

Estimating the Remainder

When the series converges, the same interval comparisons also estimate how much remains after a partial sum. Let \(S_N=\sum_{n=1}^{N}f(n)\), and write \(R_N=\sum_{n=N+1}^{\infty}f(n)\). For a positive decreasing \(f\), the tail is bounded by integrals beginning at adjacent integers.

Theorem (Integral Bounds for a Series Remainder): Suppose \(f:[1,\infty)\to\mathbb{R}\) is continuous, positive, and decreasing, and suppose \(\sum_{n=1}^{\infty}f(n)\) converges. Then, for every positive integer \(N\), $$ \int_{N+1}^{\infty}f(x)\,dx \leq R_N \leq \int_N^{\infty}f(x)\,dx. $$

Proof. For each integer \(n\geq N+1\), decreasingness gives \(f(x)\leq f(n)\) on \([n,n+1]\). Integrating and adding from \(n=N+1\) through \(M\) yields

$$ \int_{N+1}^{M+1} f(x)\,dx \leq \sum_{n=N+1}^{M}f(n). $$

In the other direction, \(f(n)\leq f(x)\) on \([n-1,n]\), so

$$ \sum_{n=N+1}^{M}f(n) \leq \int_N^M f(x)\,dx. $$

As \(M\to\infty\), the finite sums increase to \(R_N\), since all terms are positive and the series converges. The improper integrals on the two sides tend to \(\int_{N+1}^{\infty}f(x)\,dx\) and \(\int_N^\infty f(x)\,dx\), respectively. Taking limits in the inequalities proves the stated bounds. \(\square\)

Worked Example: Bounding a Remainder

For the convergent series \(\sum_{n=3}^{\infty}1/[n(\log n)^2]\), let \(R_N=\sum_{n=N+1}^{\infty}1/[n(\log n)^2]\), where \(N\geq3\). The remainder bounds apply to \(f(x)=1/[x(\log x)^2]\). Since

$$ \int_A^\infty\frac{dx}{x(\log x)^2} = \frac{1}{\log A} \quad (A\geq3), $$

we obtain

$$ \frac{1}{\log(N+1)} \leq R_N \leq \frac{1}{\log N}. $$

For example, after summing through \(N=9\), the remaining tail lies between \(1/\log 10\) and \(1/\log 9\). These are bounds, not an exact formula for the remainder.

Hypotheses and Common Pitfalls

The Integral Test is not a general rule for replacing a sum by an integral. Its hypotheses ensure that neighboring terms and the area between them are ordered in a consistent way. Before applying it, check the function on the entire interval used for the improper integral, not only at integer inputs.

  • Positivity: The standard test concerns positive terms \(f(n)\). Sign-changing series require other tools.
  • Continuity: Continuity ensures the ordinary Riemann integrals on bounded intervals are available.
  • Decreasingness: The area comparisons rely on values not increasing as \(x\) grows. If the function is not decreasing near its starting point but is decreasing after some point, discard the finite initial segment and begin the test later.

A common mistake is to infer convergence from the fact that \(f(x)\to0\). The series with terms \(1/(n\log n)\) illustrates why that conclusion is invalid: its terms tend to zero, but its associated integral and series both diverge. Another mistake is to demand strict decrease everywhere. The rational-function example has derivative zero at its initial endpoint, yet it is nonincreasing on the full domain and meets the stated condition.

1
Build the function.
Choose \(f\) so that the series terms equal \(f(n)\), at least after a finite number of terms.
2
Check the hypotheses.
Verify positivity, continuity, and decreasingness on the interval where the integral is evaluated.
3
Evaluate the improper integral.
A finite limit gives convergence; unbounded growth gives divergence of the series by the Integral Test.
4
Estimate the tail if useful.
For a convergent series, place \(R_N\) between the integrals beginning at \(N+1\) and \(N\).
Takeaway: For positive terms obtained from a continuous decreasing function, the Integral Test transfers convergence or divergence between the series and its improper integral. The same interval comparisons give upper and lower bounds for the remainder of a convergent series.

Check Your Understanding

Use the interval comparisons and the Integral Test to answer the following questions.

  1. Why does decreasingness give \(f(k+1)\leq\int_k^{k+1}f(x)\,dx\leq f(k)\)?
  2. What three hypotheses on \(f\) are required for the Integral Test as stated here?
  3. For \(f(x)=1/[x(\log x)^2]\), what is the value of \(\int_A^\infty f(x)\,dx\) when \(A>1\)?
  4. Why does the fact that the terms of \(\sum 1/(n\log n)\) tend to zero not establish convergence?
  5. For a convergent series \(\sum f(n)\), which two improper integrals bound \(R_N\)?