# The Unapologetic Mathematician

## The Integral Test

Sorry for the delay. Students are panicking on the last day of classes and I have to write up a make-up exam for one who has a conflict at the scheduled time…

We can forge a direct connection between the sum of an infinite series and the improper integral of a function using the famed integral test for convergence.

I’ve spent a goodly amount of time last week trying to craft a proof hinging on converting the infinite sum to an improper integral using the integrator $\lfloor x\rfloor$, and comparing that one to those using the integrators $x$ and $x-1$. But it doesn’t seem to be working. If you can make a go of it, I’ll be glad to hear it. Instead, here’s a proof adapted from Apostol.

We let $f$ be a positive decreasing function defined on some ray. For our purposes, let’s let it be $\left[1,\infty\right)$, but we could use any other and adapt the proof accordingly. What we require in any case, though, is that the limit $\lim\limits_{x\rightarrow\infty}f(x)=0$. We define three sequences:

$\displaystyle s_n=\sum\limits_{k=1}^nf(k)$
$\displaystyle t_n=\int\limits_1^nf(x)dx$
$d_n=s_n-t_n$

First off, I assert that $d_n$ is nonincreasing, and sits between $f(n)$ and $f(1)$. That is, we have the inequalities

$0

To see this, first let’s write the integral defining $t_{n+1}$ as a sum of integrals over unit steps and notice that $f(k)$ gives an upper bound to the size of $f$ on the interval $\left[k,k+1\right]$. Thus we see:

$t_{n+1}\displaystyle\sum\limits_{k=1}^n\int\limits_k^{k+1}f(x)dx\leq\sum\limits_{k=1}^n\int\limits_k^{k+1}f(k)dx=\sum\limits_{k=1}^nf(k)=s_n$

From here we find that $f(n+1)=s_{n+1}-s_n\leq s_{n+1}-t_{n+1}=d_{n+1}$.

On the other hand, we see that $d_n-d_{n+1}=t_{n+1}-t_n-(s_{n+1}-s_n)$. Reusing some pieces from before, we see that this is

$\displaystyle\int\limits_n^{n+1}f(x)dx-f(n+1)\geq\int\limits_n^{n+1}f(n+1)dx-f(n+1)=0$

which verifies that the sequence $d_n$ is decreasing. And it’s easy to check that $d_1=f(1)$, which completes our verification of these inequalities.

Now $d_n$ is a monotonically decreasing sequence, which is bounded below by ${0}$, and so it must converge to some finite limit $D$. This $D$ is the difference between the sum of the infinite series and the improper integral. Thus if either the sum or the integral converges, then the other one must as well.

We can actually do a little better, even, than simply showing that the sum and integral either both converge or both diverge. We can get some control on how fast the sequence $d_n$ converges to $D$. Specifically, we have the inequalities $0\leq d_k-D\leq f(k)$, so the difference converges as fast as the function goes to zero.

To get here, we look back at the difference of two terms in the sequence:

$\displaystyle0\leq d_n-d_{n+1}\leq\int\limits_n^{n+1}f(n)dx-f(n+1)=f(n)-f(n+1)$

So take this inequality for $n=k$ and add it to that for $n=k+1$. We see then that $0\leq d_k-d_{k+2}\leq f(k)-f(k+2)$. Then add the inequality for $n=k+2$, and so on. At each step we find $0\leq d_k-d_{k+l}\leq f(k)-f(k+l)$. So as $l$ goes to infinity, we get the asserted inequalities.