## Section6.3Integral Test

It is generally quite difficult, often impossible, to determine the value of a series exactly. In many cases it is possible at least to determine whether or not the series converges, and so we will spend most of our time on this problem.

If all of the terms $\ds a_n$ in a series are non-negative, then clearly the sequence of partial sums $\ds s_n$ is non-decreasing. This means that if we can show that the sequence of partial sums is bounded, the series must converge. Many useful and interesting series have this property, and they are among the easiest to understand. Let's look at an example.

###### Example6.35. Exploring Convergence Using an Integral.

Show that $\ds\sum_{n=1}^\infty {1\over n^2}$ converges.

Solution

The terms $\ds 1/n^2$ are positive and decreasing, and since $\ds\lim_{x\to\infty} 1/x^2=0\text{,}$ the terms $\ds 1/n^2$ approach zero. This means that the Divergence Test does not provide any information and we must find a different method to deal with this series. We seek an upper bound for all the partial sums, that is, we want to find a number $N$ so that $s_n\le N$ for every $n\text{.}$ The upper bound is provided courtesy of integration, and is illustrated in Figure 6.2.

The figure shows the graph of $\ds y=1/x^2$ together with some rectangles that lie completely below the curve and that all have base length one. Because the heights of the rectangles are determined by the height of the curve, the areas of the rectangles are $\ds 1/1^2\text{,}$ $\ds 1/2^2\text{,}$ $\ds 1/3^2\text{,}$ and so on—in other words, exactly the terms of the series. The partial sum $\ds s_n$ is simply the sum of the areas of the first $n$ rectangles. Because the rectangles all lie between the curve and the $x$-axis, any sum of rectangle areas is less than the corresponding area under the curve, and so of course any sum of rectangle areas is less than the area under the entire curve. Unfortunately, because of the asymptote at $x=0\text{,}$ the integral $\int_0^{\infty}\frac{1}{x^2}$ is infinite, but we can deal with this by separating the first term from the series and integrating from 1:

\begin{equation*} \ds s_n=\sum_{i=1}^{n}\frac{1}{i^2}=1+\sum_{i=2}^{n}\frac{1}{i^2}\lt 1+\int_1^n\frac{1}{x^2}\,dx\lt 1+\int_1^{\infty}\frac{1}{x^2}\,dx=1+1=2\text{,} \end{equation*}

recalling that we computed this improper integral in Section 2.7. Since the sequence of partial sums $\ds s_n$ is increasing and bounded above by 2, we know that $\ds\lim_{n\to\infty}s_n=L\lt 2\text{,}$ and so the series converges to some number less than 2. In fact, it is possible, though difficult, to show that $\ds L=\pi^2/6\approx 1.6\text{.}$

###### Example6.36. Exploring Divergence Using an Integral.

Why can the integral technique from Example 6.35 not be used with the series

\begin{equation*} \sum_{n=1}^{\infty} \frac{1}{n} ? \end{equation*}
Solution

We already know that $\sum 1/n$ diverges. What goes wrong if we try to apply the integral technique to it? Here's the calculation:

\begin{equation*} s_n={1\over 1}+{1\over 2}+{1\over 3}+\cdots+{1\over n} \lt 1 + \int_1^n {1\over x}\,dx \lt 1+\int_1^\infty {1\over x}\,dx =1+\infty\text{.} \end{equation*}

The problem is that the improper integral doesn't converge. Note that this does not prove that $\sum 1/n$ diverges, just that this particular technique fails to prove that it converges.

A slight modification, however, allows us to prove in a second way that $\sum 1/n$ diverges.

###### Example6.37. Alternate Method for Divergence of Harmonic Series.

Use the idea of areas from Example 6.35 to show that the series

\begin{equation*} \sum_{n=1}^{\infty} \frac{1}{n} \end{equation*}

diverges.

Solution

Consider a slightly altered version of Figure 6.2, shown in Figure 6.3.

This time the rectangles are above the curve, that is, each rectangle completely contains the corresponding area under the curve. This means that

\begin{equation*} s_n = {1\over 1}+{1\over 2}+{1\over 3}+\cdots+{1\over n} > \int_1^{n+1} {1\over x}\,dx = \ln x\Big|_1^{n+1}=\ln(n+1)\text{.} \end{equation*}

As $n$ gets bigger, $\ln(n+1)$ goes to infinity, so the sequence of partial sums $\ds s_n$ must also go to infinity, so the harmonic series diverges.

The key fact in this example is that

\begin{equation*} \ds\lim_{n\to\infty}\int_1^{n+1}\frac{1}{x}\,dx=\int_1^{\infty}\frac{1}{x}\,dx=\infty\text{.} \end{equation*}

So these two examples taken together indicate that we can prove that a series converges or prove that it diverges with a single calculation of an improper integral. This is known as the Integral Test, which we state as a theorem.

Note: The lower bound in the Integral Test is arbitrary. We could have chosen any positive integer $N$ as the lower bound, since — as mentioned before — the first few (e.g. any finite number of) terms in a series are irrelevant when determining whether it will converge.

The two examples we have seen are called $p$-series. A $p$-series is any series of the form $\ds \sum 1/n^p\text{.}$

###### Definition6.39. $p$-Series.

A series of the form $\ds{\sum_{n=1}^{\infty} \frac{1}{n^p} = 1 + \frac{1}{2^p} + \frac{1}{3^p} + \dots + \frac{1}{n^p} + \dots}\text{,}$ where $p$ is a constant, is called a $p$-series .

We split the proof into three cases:

\begin{equation*} \int_1^{\infty} {1\over x^p}\,dx=\lim_{R\to\infty} \left.{x^{1-p}\over 1-p}\right|_{1}^R=\lim_{R\to\infty} {R^{1-p}\over 1-p}-{1\over 1-p}\text{.} \end{equation*}
1. If $p>1$ then $1-p\lt 0$ and $\ds\lim_{R\to\infty}R^{1-p}=0\text{,}$ so the integral converges.

2. If $p\lt 1$ then $1-p>0$ and $\ds\lim_{R\to\infty}R^{1-p}=\infty\text{,}$ so the integral diverges.

3. If $p=1\text{,}$ we have the harmonic series, which we have already shown in two ways to be divergent.

###### Example6.41. $p$-Series Power of Three.

Show that $\ds\sum_{n=1}^\infty {1\over {n^3}}$ converges.

Solution

We could of course use the Integral Test, but now that we have the theorem we may simply note that this is a $p$-series with $p>1\text{.}$

###### Example6.42. $p$-Series Power of Four.

Show that $\ds\sum_{n=1}^\infty {5\over n^4}$ converges.

Solution

We know that if $\ds \sum_{n=1}^\infty 1/n^4$ converges then $\ds \sum_{n=1}^\infty 5/n^4$ also converges, by Theorem 6.29. Since $p=4 >1$ we have that $\ds \sum_{n=1}^\infty 1/n^4$ is a convergent $p$-series, and so $\ds \sum_{n=1}^\infty 5/n^4$ converges also.

###### Example6.43. $p$-Series Square Root.

Show that $\ds\sum_{n=1}^\infty {5\over \sqrt{n}}$ diverges.

Solution

This also follows from Theorem 6.29: Since $\ds\sum_{n=1}^\infty {1\over \sqrt{n}}$ is a $p$-series with $p=1/2\lt 1\text{,}$ it diverges, and so does $\ds\sum_{n=1}^\infty {5\over \sqrt{n}}\text{.}$

Since it is typically difficult to compute the value of a series exactly, a good approximation is frequently required. In a real sense, a good approximation is only as good as we know it is. That is, while an approximation may in fact be good, it is only valuable in practice if we can guarantee its accuracy to some degree. This guarantee is usually easy to come by for series with decreasing positive terms.

###### Example6.44. Approximating a $p$-Series.

Approximate $\ds \sum_{n=1}^{\infty} 1/n^2$ to within 0.01.

Solution

Referring to Figure 6.2, if we approximate the sum by $\ds \sum_{n=1}^N 1/n^2\text{,}$ the size of the error we make is the total area of the remaining rectangles, all of which lie under the curve $\ds 1/x^2$ from $x=N$ to infinity. So we know the true value of the series is larger than the approximation, and no bigger than the approximation plus the area under the curve from $N$ to infinity. Roughly, then, we need to find $N$ so that

\begin{equation*} \int_N^\infty {1\over x^2}\,dx \lt 1/100\text{.} \end{equation*}

We can compute the integral:

\begin{equation*} \int_N^\infty {1\over x^2}\,dx = {1\over N}\text{,} \end{equation*}

so if we choose $N=100$ the error will be less than 0.01. Adding up the first 100 terms gives approximately $1.634983900\text{.}$ In fact, we can do a bit better. Since we know that the correct value is between our approximation and our approximation plus the error (not minus), we can cut our error bound in half by taking the value midway between these two values. If we take $N=50\text{,}$ we get a sum of 1.6251327 with an error of at most 0.02, so the correct value is between 1.6251327 and 1.6451327, and therefore the value halfway between these, 1.6351327, is within 0.01 of the correct value. We have mentioned that the true value of this series can be shown to be $\pi^2/6\approx 1.644934068$ which is 0.0098 more than our approximation, and so (just barely) within the required error. Frequently approximations will be even better than the “guaranteed” accuracy, but not always, as this example demonstrates.

##### Exercises for Section 6.3.

Determine whether each series converges or diverges.

1. $\ds\sum_{n=1}^\infty {1\over n^{\pi/4}}$

diverges
Solution

$\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^{\pi/4}}$ is a $p$-series with $p=\pi/4 \lt 1\text{,}$ and so the series diverges.

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

diverges
Solution

We compute

\begin{equation*} \int_1^{\infty} \frac{x}{x^2+1}\,dx\text{.} \end{equation*}

Let $u=x^2+1, \ du=2x\,dx\text{.}$ Then

\begin{equation*} \int_1^{\infty} \frac{x}{x^2+1}\,dx = \int_2^{\infty} \frac{1}{2}\frac{du}{u} = \frac{1}{2}\lim_{a\to\infty} \ln (u) \bigg\vert_2^a = \infty\text{.} \end{equation*}

Thus, by the integral test, the series $\displaystyle\sum_{n=1}^{\infty} \frac{n}{n^2+1}$ diverges.

3. $\ds\sum_{n=1}^\infty {\ln n\over n^2}$

converges
Solution

We use the integral test. To compute $\displaystyle\int_1^{\infty} \frac{\ln x}{x^2}\,dx\text{,}$ use integration by parts with

\begin{equation*} \begin{array}{cc} u = \ln x \amp dv = \frac{dx}{x^2} \\ du = \frac{1}{x}\,dx \amp v = -\frac{1}{x} \end{array} \end{equation*}

Therefore,

\begin{equation*} \int \frac{\ln x}{x^2} = -\frac{\ln x}{x} + \int \frac{1}{x^2}\,dx = -\frac{1}{x}\left(\ln x + 1\right) + C\text{.} \end{equation*}

Since

\begin{equation*} \lim_{x\to\infty} \left(\frac{\ln x + 1}{x}\right) = \lim_{x\to\infty} \frac{1}{x} = 0\text{,} \end{equation*}

we see that the integral converges. Thus, the series $\displaystyle\sum_{n=1}^{\infty} \frac{\ln n}{n^2}$ converges.

4. $\ds\sum_{n=1}^\infty {1\over n^2+1}$

converges
Solution
We use the integral test.
\begin{equation*} \int_{1}^{\infty} \frac{1}{x^2+1}\,dx = \lim_{a\to\infty} \tan^{-1}(x) \big\vert_1^{a} = \frac{\pi}{4}. \end{equation*}
Hence, the series converges.
5. $\ds\sum_{n=1}^\infty {1\over e^n}$

converges
Solution
We use the integral test:
\begin{equation*} \int_1^{\infty} e^{-x} \,dx = \lim_{a\to\infty} -e^{-x} \big\vert_1^a = e^{-1}. \end{equation*}
Therefore, the series converges.
6. $\ds\sum_{n=1}^\infty {n\over e^n}$

converges
Solution
We first compute the following indefinite integral using integration by parts:
\begin{equation*} \int xe^{-x} \,dx = -xe^{-x} + \int e^{-x}\,dx = -xe^{-x}-e^{-x}. \end{equation*}
Therefore,
\begin{equation*} \int_1^{\infty} xe^{-x} \,dx = -\lim_{a\to\infty} xe^{-x}\big\vert_1^a - \lim_{a\to\infty} e^{-x}\big\vert_1^a = 2e^{-1}. \end{equation*}
Therefore, by the integral test, the series converges.
7. $\ds\sum_{n=2}^\infty {1\over n\ln n}$

diverges
Solution
We first compute the following indefinite integral using the substitution $u=\ln x\text{,}$ $du=1/x\text{:}$
\begin{equation*} \int \frac{1}{x\ln x}\,dx = \int \frac{1}{u}\,du = \ln |u| = \ln \ln (x). \end{equation*}
Since
\begin{equation*} \lim_{a \to \infty} \ln (\ln a)) = \infty, \end{equation*}
the integral
\begin{equation*} \int_2^{\infty} \frac{1}{x\ln x}\,dx \end{equation*}
diverges. Hence, by the integral test, the series diverges.
8. $\ds\sum_{n=2}^\infty {1\over n(\ln n)^2}$

converges
Solution
We first compute the following indefinite integral using the substitution $u=\ln x\text{,}$ $du=1/x\text{:}$
\begin{equation*} \int \frac{1}{x(\ln x)^2}\,dx = \int \frac{1}{u^2}\,du = -\frac{1}{u} = -\frac{1}{\ln x} \end{equation*}
Since
\begin{equation*} \lim_{a \to \infty} 1/\ln x = 0, \end{equation*}
the integral
\begin{equation*} \int_2^{\infty} \frac{1}{x(\ln x)^2}\,dx \end{equation*}
converges. Hence, by the integral test, the series converges.

Find an $N$ so that each series is approximated to within the given error.

1. $\ds\sum_{n=1}^\infty {1\over n^4}\text{,}$ $0.005$

$N=5$
Solution

We wish to approximate the series $\displaystyle{\sum_{n=1}^{\infty} \frac{1}{n^4}}$ with error $E \leq 0.005\text{.}$ We first compute an upper bound for the error which results from using $N$ terms:

\begin{equation*} E \leq \int_N^\infty \frac{1}{x^4}\,dx = \lim_{a\to\infty} \left[-\frac{1}{3x^3}\right]_N^a = \frac{1}{3N^3}\text{.} \end{equation*}

Since

\begin{equation*} \frac{1}{3N^3} \lt 0.005 \implies N > 4.0548\text{,} \end{equation*}

we should take $N=5$ terms in our approximation.

2. $\ds\sum_{n=0}^\infty {1\over e^n}\text{,}$ $10^{-4}$

$N=10$
Solution
We wish to approximate the series $\displaystyle{\sum_{n=0}^{\infty} \frac{1}{e^n}}$ with an error $E \leq 0.0001\text{.}$ We first compute an upper bound for the error which results from using $N$ terms:
\begin{equation*} E \leq \int_N^\infty \frac{1}{e^x} \,dx = \lim_{a\to\infty} -e^{-x} \big\vert_N^a = \frac{1}{e^N}. \end{equation*}
Since
\begin{equation*} e^{-N} \lt 0.0001 \implies N > \log(10,000) \approx 9.21, \end{equation*}
this means we should take $N=10$ terms in our approximation.
3. $\ds\sum_{n=1}^\infty {\ln n\over n^2}\text{,}$ $0.005$

$N=1687$
4. $\ds\sum_{n=2}^\infty {1\over n(\ln n)^2}\text{,}$ $0.005$
any integer greater than $\ds e^{200}$