The integral test and p-series · Mathematics Class 11–12 | StemPy Lab
Course 15.2·Lesson 1 of 3
The integral test and p-series
When a series has no formula for its partial sums, compare it with an area. If the terms are positive and decreasing, the series and the matching improper integral converge together or diverge together. This gives the p-series rule: the series of np1 converges exactly when p>1. The same areas also trap the tail of a convergent series between two bounds.
about 35 min1 simulation2 practice questions1 Python program5 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
find the value of an improper integral of the form ∫1∞xp1dx;
use the integral test, and check its three conditions;
decide whether a p-series converges, and say why the harmonic series diverges;
trap the tail of a convergent series between two numbers.
A sum with no formula
In the last course you added series like 21+41+81+⋯, where the partial sums have a neat formula. Most series are not like that. Take
1+41+91+161+⋯=n=1∑∞n21.
There is no simple formula for SN=1+41+⋯+N21. Yet we want to know whether the partial sums settle on a number. A positive series has partial sums that only go up. So the question is whether they stop somewhere or climb for ever.
The idea of this lesson is simple. A term n21 is the area of a rectangle of width 1 and height n21. A curve y=x21 runs close to the tops of these rectangles. So the sum of the rectangles and the area under the curve should behave in the same way.
An improper integral
An area that stretches out to infinity needs a limit to give it a meaning. We define
∫1∞f(x)dx=b→∞lim∫1bf(x)dx.
If this limit is a number, the integral converges. If the limit is infinite or does not exist, it diverges. Two examples show the whole story.
The curve y=x21. We have ∫1bx21dx=1−b1. As b→∞ this tends to 1. The area is finite.
The curve y=x1. We have ∫1bx1dx=lnb. As b→∞ this grows without bound. The area is infinite.
For xp1 with p=1, the integral from 1 to b is 1−pb1−p−1. If p>1, the power b1−p tends to 0, and the integral tends to p−11. If p<1, the power b1−p grows, and the integral diverges. With p=1 we get the logarithm. So the integral ∫1∞xpdx converges exactly when p>1.
Both curves shrink towards the axis. The difference is how fast they shrink.
The integral test
Suppose f is continuous, positive and decreasing for x≥1, and an=f(n). Then the series n=1∑∞an and the integral ∫1∞f(x)dx either both converge or both diverge.
Why? Look at the picture. The curve falls as it moves right. So on the strip from n−1 to n, the curve is above the rectangle of height an and below the rectangle of height an−1.
Two graphs of the decreasing curve y = 1 over x squared for x from 1 to 6, one above the other. In the top graph, rectangles of width 1 stand on the strips from 1 to 2, 2 to 3, and so on, with their heights taken at the right end of each strip, so every rectangle sits inside the area under the curve. In the bottom graph the heights are taken at the left end of each strip, so every rectangle reaches above the curve. The captions say that the sum of the first set of areas is less than the area under the curve, and the sum of the second set is more.
Adding the strips from 1 to N gives two inequalities:
a2+a3+⋯+aN≤∫1Nf(x)dx≤a1+a2+⋯+aN−1.
If the integral is finite, the left side stays below it, so the partial sums are bounded. A bounded series of positive terms converges. If the integral is infinite, the right side is infinite, so the partial sums have no upper limit. That is divergence.
The test has three conditions. The terms must be positive, they must decrease, and f must be continuous. If the terms decrease only after some number M, start the integral at M. A finite number of early terms does not change convergence.
The integral is not the sum. For ∑n21 the integral is 1, but the sum is about 1.645. The test tells you only whether the sum exists.
Worked example 1: the series of n2+11
The function f(x)=x2+11 is continuous, positive and decreasing for x≥1. We find
∫1bx2+1dx=arctanb−arctan1→2π−4π=4π.
The integral converges, so n=1∑∞n2+11 converges.
Worked example 2: a series that diverges very slowly
Look at n=2∑∞nlnn1. The function f(x)=xlnx1 is positive and decreasing for x≥2. Then
∫2bxlnxdx=ln(lnb)−ln(ln2).
This grows without bound as b→∞, though very slowly. So the series diverges. To reach a partial sum of 10 you need an astronomical number of terms. Slow growth is still growth.
p-series
A p-series is n=1∑∞np1. The integral test and our two examples give a rule you will use again and again.
If p>1, the p-series converges.
If p≤1, the p-series diverges.
p
Series
Verdict
1
harmonic series
diverges
21
∑n1
diverges
2
∑n21
converges
1.01
∑n1.011
converges, very slowly
Every one of these series has terms that tend to 0. The terms alone cannot decide the matter. The harmonic series1+21+31+⋯ is the famous case. The rectangle inequality gives SN≥ln(N+1), which has no upper limit. The partial sums grow like lnN+0.577, so the series reaches 10 after about 12000 terms, and it reaches 20 only after hundreds of millions.
Worked example 3: a series that converges by the test
Does n=1∑∞ne−n2 converge? Let f(x)=xe−x2. Its derivative is (1−2x2)e−x2, which is negative for x≥1. So f is positive and decreasing there. Then
∫1bxe−x2dx=21(e−1−e−b2)→2e1.
The integral is finite, so the series converges.
How far is the sum? Trapping the tail
Let S be the sum and SN the sum of the first N terms. The tail is S−SN=aN+1+aN+2+⋯. The same rectangles give
∫N+1∞f(x)dx≤S−SN≤∫N∞f(x)dx.
For example, take ∑n21 with N=10. We have S10≈1.5498. The tail lies between 111≈0.0909 and 101=0.1. So the sum lies between 1.6407 and 1.6498. The true value, 1.6449, is inside.
Practise with new numbers
Try it in Python
The program adds the harmonic series and the series of n21. It checks the sums against the bounds from the integral test.
Common mistakes
Saying that the terms tend to 0, so the series converges. The harmonic series has terms that tend to 0 and still diverges.
Calling the integral the sum. The integral only says whether the series converges. The sum is a different number.
Using the test on terms that change sign. The terms must be positive. For other series use absolute values, as the last lesson shows.
Forgetting that p=1 diverges. A p-series needs p strictly greater than 1.
Skipping the check that f decreases. A function like x2+sinx does not decrease steadily, and the test does not apply to it as it stands.
Remember these
∫1∞xpdx converges exactly when p>1, and then it equals p−11.
Integral test: positive, continuous, decreasing f. The series and the integral converge together.
p-series: converges for p>1, diverges for p≤1. The harmonic series diverges.
The tail after N terms lies between ∫N+1∞f and ∫N∞f.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Does n=1∑∞n1 converge?
Use the integral test on n=1∑∞n2+1n.
Find ∫1∞x31dx.
The series ∑n31 is cut after 10 terms. What is the largest value that the tail can have?
Why can you not use the integral test directly on n=1∑∞n2sinn?
References
OpenStax, Calculus Volume 2, Chapter 5, section 5.3 on the divergence and integral tests.
College Board, AP Calculus AB and BC Course and Exam Description, Unit 10, the topics on the integral test and the harmonic and p-series.
Enroll free in Tests for Convergence
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.