For a decreasing positive function the rectangles lock above and below the curve: ∫1N+1f≤∑1Nf(n)≤f(1)+∫1N+1f — series and improper integral share one fate. Move p to see the p-series fork.
∫1N+1f≤n=1∑Nf(n)≤f(1)+∫1N+1f
∑np1 converges⟺p>1
Examples & Exercises
Prove the integral test completely: if f is positive and decreasing on [1,∞), then on each [n,n+1] we have f(n+1)≤∫nn+1f≤f(n); summing gives ∫1N+1f≤∑n=1Nf(n)≤f(1)+∫1N+1f, so ∑f(n) converges iff ∫1∞f converges.
f(n+1)≤∫nn+1f≤f(n)(f decreasing)
∫1N+1f≤n=1∑Nf(n)≤f(1)+∫1N+1f
p=2,N=12: ∫113x−2dx=12/13≈0.9231≤∑k=112k−2≈1.5650≤1+0.9231 — the sandwich, numerically.Show proof
Since f is decreasing, f(n+1)≤f(x)≤f(n) for x∈[n,n+1]. Integrating over [n,n+1] (length 1) gives f(n+1)≤∫nn+1f≤f(n) by monotonicity of the integral.
Sum over n=1,…,N. The left inequalities sum to ∑n=1Nf(n+1)=∑k=2N+1f(k)≤∫1N+1f; the right ones to ∫1N+1f≤∑n=1Nf(n). Chaining gives ∑k=2N+1f(k)≤∫1N+1f≤∑n=1Nf(n), and since ∑k=2N+1f(k)=∑n=1Nf(n)−f(1), we get ∫1N+1f≤∑n=1Nf(n)≤f(1)+∫1N+1f.
If ∫1∞f converges (i.e. ∫1Rf has a finite limit as R→∞), then the partial sums ∑n=1Nf(n) are bounded above by f(1)+∫1∞f and, the terms being nonnegative, converge by the monotone convergence theorem.
Conversely, if ∫1∞f diverges (to +∞, the integrand being positive), then ∑n=1Nf(n)≥∫1N+1f→∞, so the series diverges too. Hence ∑f(n) converges ⟺∫1∞f converges. QED.
Prove the p-series ∑n=1∞n−p converges for p>1 and diverges for p≤1, completely: compute ∫1Rx−pdx directly (p=1 gives lnR) and apply the integral test.
∫1Rx−pdx=⎩⎨⎧lnR1−pR1−p−1p=1p=1
n=1∑∞n−p converges ⟺p>1
p=1,N=12: the harmonic partial sum H12≈3.1032 keeps growing like ln, and ∫113xdx=ln13≈2.5649 — both diverge.Show proof
f(x)=x−p is positive and decreasing on [1,∞), so the integral test applies. Compute: for p=1, ∫1Rx−1dx=lnR; for p=1, ∫1Rx−pdx=[1−px1−p]1R=1−pR1−p−1.
p>1: 1−p<0, so R1−p→0 as R→∞. Hence ∫1∞x−pdx=p−11<∞ — the integral converges, so by the integral test ∑n−p converges.
p=1: lnR→∞, so the integral diverges, and hence the harmonic series ∑1/n diverges. p<1: 1−p>0, so 1−pR1−p−1→∞ — the integral diverges and so does the series.
In summary: ∑n−p converges ⟺∫1∞x−pdx<∞⟺p>1. QED.
Prove the remainder estimate completely: if f is positive, decreasing, and ∑f(n) converges, the tail RN=∑n>Nf(n) satisfies ∫N+1∞f≤RN≤∫N∞f. Numerically: trap the N=10 tail of ∑1/n2 between 1/11≈0.0909 and 1/10=0.1.
∫N+1∞f≤RN=n>N∑f(n)≤∫N∞f
111≈0.0909≤R10(∑n21)≤0.1=101
p=2,N=10: the tail R10 lies between ∫11∞x−2dx=1/11≈0.0909 and ∫10∞x−2dx=1/10=0.1 (true value ≈0.09517).Show proof
Sum the basic inequality f(n+1)≤∫nn+1f≤f(n) (first problem) over n=N+1,…,M. Left: ∑n=N+1Mf(n+1)=∑k=N+2M+1f(k)≤∫N+1M+1f. Right: ∫N+1M+1f≤∑n=N+1Mf(n).
A shifted version of the right inequality: the basic inequality on [n−1,n] reads f(n)≤∫n−1nf, so summing over n=N+1,…,M gives ∑n=N+1Mf(n)≤∫NMf.
Let M→∞. Since the series converges, ∑n=N+1Mf(n)→RN (finite), and by the integral test the improper integrals converge too, so ∫N+1M+1f→∫N+1∞f and ∫NMf→∫N∞f. Passing to the limit preserves the inequalities: ∫N+1∞f≤RN≤∫N∞f. QED.
Numerical application: f(x)=x−2, N=10. ∫11∞x−2dx=[−x−1]11∞=111≈0.0909 and ∫10∞x−2dx=101=0.1, so 111≤R10≤101. Indeed R10=6π2−∑k=110k21≈0.09517 lands inside the interval.