When the terms of a series come from a nice function, $a_n = f(n)$, you can compare the series with an improper integral. That settles the most useful family of all, the $p$-series $\sum\frac{1}{n^{p}}$, in cases where the The Divergence Test says nothing.
Why it works
Let $f$ be positive, continuous and decreasing for $x \ge 1$. Draw rectangles of width 1 under the graph, using right endpoints: their heights are $a_2, a_3, \ldots$, and they fit under the curve, so $a_2 + \cdots + a_N \le \int_1^{N} f(x)\,dx$. Rectangles with left endpoints stick out above the curve: $\int_1^{N+1} f(x)\,dx \le a_1 + \cdots + a_N$. So if the integral is finite, the partial sums are increasing and bounded, hence convergent; if the integral is infinite, the partial sums are too.
Key idea
Integral test: if $f$ is positive, continuous and decreasing on $[1, \infty)$ and $a_n = f(n)$, then $\sum a_n$ and $\int_1^{\infty} f(x)\,dx$ both converge or both diverge. $p$-series: $\sum\frac{1}{n^{p}}$ converges when $p > 1$ and diverges when $p \le 1$.
Worked example: p-series
For which $p$ does $\sum_{n=1}^{\infty}\frac{1}{n^{p}}$ converge?
- For $p \le 0$ the terms do not go to 0, so it diverges. For $p > 0$, $f(x) = x^{-p}$ is positive and decreasing.
- $\int_1^{\infty}x^{-p}\,dx$ converges exactly when $p > 1$ (it is $\frac{1}{p - 1}$ then).
- So the series converges exactly when $p > 1$. For example $\sum\frac{1}{n^{2}}$ converges and $\sum\frac{1}{\sqrt{n}}$ diverges.
Answer: $p > 1$
Worked example: A log in the denominator
Does $\sum_{n=2}^{\infty}\frac{1}{n\ln n}$ converge?
- $f(x) = \frac{1}{x\ln x}$ is positive and decreasing for $x \ge 2$.
- With $u = \ln x$: $\int_2^{t}\frac{dx}{x\ln x} = \ln(\ln t) - \ln(\ln 2)$, which grows without bound.
- So the series diverges, though very slowly.
Answer: It diverges.
Common mistake
Thinking the series equals the integral. $\int_1^{\infty}\frac{dx}{x^{2}} = 1$, but $\sum_{n=1}^{\infty}\frac{1}{n^{2}} = \frac{\pi^{2}}{6} \approx 1.645$. The rectangles are not the region under the curve, so the test only tells you whether the series converges. The two numbers do bound each other: here $1 \le \sum\frac{1}{n^{2}} \le 1 + 1 = 2$.
Worked example: An integral you can evaluate
Does $\sum_{n=1}^{\infty} n e^{-n^{2}}$ converge?
- $f(x) = xe^{-x^{2}}$ is positive, and $f'(x) = e^{-x^{2}}(1 - 2x^{2}) < 0$ for $x \ge 1$, so it is decreasing.
- $\int_1^{\infty}xe^{-x^{2}}dx = \left[-\frac{1}{2}e^{-x^{2}}\right]_1^{\infty} = \frac{1}{2e}$, finite.
- So the series converges.
Answer: It converges.