Comparison Tests

MAT 229, Spring 2025

Supporting materials

If you wish to get a different perspective on the notes below, try either of the following textbook sections.

Strang's Calculus:
	Vol 2, Section 5.4: Comparison Tests

Stewart’s Calculus
	Section 11.4: The comparison tests

Boelkins/Austin/Schlicker’s Active Calculus
	Section 8.3: Series of real numbers

Review

Integral test

Given the infinite series (Underoverscript[Σ, (k=n), ∞])(Subscript[a, k]), if there is an integrable function f(x) such that

(Subscript[a, k])=f(k) for k≥n,

f(x)≥0 for x≥n,

f(x) is a decreasing function for x≥n.

then the infinite series (Underoverscript[Σ, (k=n), ∞])(Subscript[a, k]) converges if and only if the improper integral (∫_n^∞)f(x)d x converges.

Question

For which values of p does the infinite series (Underoverscript[Σ, (k=1), ∞])(1/(k^p)) converge and for which values of p does it diverge?

Integral test error estimate

Partial sum approximations

If you know (Underoverscript[Σ, (k=(Subscript[n, 0])), ∞])(Subscript[a, k]) converges, then you can approximate it with its partial sums (Underoverscript[Σ, (k=(Subscript[n, 0])), n])(Subscript[a, k]) .

Integral test error estimate

If the integral test implies that (Underoverscript[Σ, (k=1), ∞])(Subscript[a, k]) converges using the improper integral (∫_1^∞)f(x)d x, then the error in using the (n^th) partial sum to approximate (Underoverscript[Σ, (k=1), ∞])(Subscript[a, k]) satisfies
	error≤|(Underoverscript[Σ, (k=1), ∞])(Subscript[a, k])-(Underoverscript[Σ, (k=1), n])(Subscript[a, k])|=(Underoverscript[Σ, (k=n+1), ∞])(Subscript[a, k])≤(∫_n^∞)f(x)d x
	
Remember that, for this estimate, the terms are all greater than or equal to zero: (Subscript[a, k]) ⩾ 0.

Questions

Give an estimate of the error in using the (10^th) partial sum of (Underoverscript[Σ, (k=1), ∞])(1/(k^2)) to approximate it.

Clear[a,f]
a[k_]:=1/k^2
f[x_]:=1/x^2
partialSum=Sum[a[k],{k,1,10}]
N[%]
exactValue=Sum[a[k],{k,1,Infinity}]
N[%]

Integrate[f[x],{x,10,Infinity}]
N[Abs[partialSum-exactValue]]

Find a value of n for which you know the finite sum (Underoverscript[Σ, (k=1), n])(1/(k^5)) will approximate the infinite sum (Underoverscript[Σ, (k=1), ∞])(1/(k^5)) with error less than 0.0001.

Clear[a,f, n]
a[k_]:=1.0/k^5
f[x_]:=1/x^5
Integrate[f[x],{x,n,Infinity},Assumptions->n>0]

soln=Solve[1/(4n^4)==1/10000,n,Reals]
n=Ceiling[5Sqrt[2]]
Sum[a[k],{k,1,n}]
Sum[a[k],{k,1,Infinity}]

Comparison tests generalities

Note

Just as the Integral Test can only be used on sums with nonnegative terms, so too the comparison tests we consider.

Technically we can say that this must be true only “eventually”: you can always peel off the first few terms of a series (a finite chunk), and consider the series as a sum of that finite chunk and its tail, a new series which satisfies the conditions of the integral test or comparison test.

What to expect

The comparison tests allow us to compare a new series with those we are already familiar with. If the comparison is good, then we can transfer what we know about convergence of the old series to the new one.

Questions

Here are two types of series whose convergence we know. We will compare other series to ones of these two types.

p-series: For which values of p does (Underoverscript[Σ, (k=1), ∞])(1/(k^p)) converge and for which does it diverge?

Geometric series: For which values of r does (Underoverscript[Σ, (k=0), ∞])a (r^k) converge and for which does it diverge?

Limit comparison test

Questions

Which p-series or geometric series is the given series similar to? Do you think the given series converges or diverges?

(Underoverscript[Σ, (k=1), ∞])(1/((k^2)+4(k^3)))

(1/((k^2)+4(k^3)))≤ (1/(4(k^3))) 
or
(1/((k^2)+4(k^3)))≤ (1/(k^2)) 
Either shows that the series is convergent.

(Underoverscript[Σ, (k=1), ∞])((3^k)/((2^k)+k))

((3^k)/((2^k)+k))⩾ ((3^k)/((2^k)+(2^k))) = (1/2)((3^k)/(2^k)) = (1/2)((((3/2)))^k): diverges as a geometric series

Limit Comparison Test

If (lim_(n->∞))((Subscript[a, n])/(Subscript[b, n]))=L where L is a nonzero number, then (Underoverscript[Σ, k, ∞])(Subscript[b, k]) converges if and only if (Underoverscript[Σ, k, ∞])(Subscript[a, k]).

Idea behind Limit Comparison Test

Given a complicated series, ignore all but the most significant term in the numerator and the significant term in the denominator where significant is in terms of large values of the index. This may suggest a new (and simpler) series, with which we can compare the give series.

Questions

Determine which series converge and which diverge.

(Underoverscript[Σ, (k=1), ∞])((3k-2)/((k^2)+4))

Limit[(((3k-2)/((k^2)+4)))/((3/k)),k->Infinity]

(Underoverscript[Σ, (k=0), ∞])((10k+1)/((k^3)+5(k^2)-k+4))

Limit[(((10k+1)/((k^3)+5(k^2)-k+4)))/(((10k)/(k^3))),k->Infinity]

(Underoverscript[Σ, (k=0), ∞])(((2^k)+sin(k)+10)/(5^k))

Limit[((((2^k)+sin(k)+10)/(5^k)))/(((2^k)/(5^k))),k->Infinity]

(Underoverscript[Σ, (k=1), ∞])(5/(k+(2^k)))

Limit[((5/(k+(2^k))))/((5/(2^k))),k->Infinity]

(Underoverscript[Σ, (k=1), ∞])((1+(k^2)+(k^3)+(3^k))/((2^k)+(k^4)))

Limit[(((1+(k^2)+(k^3)+(3^k))/((2^k)+(k^4))))/(((3^k)/(2^k))),k->Infinity]

Comparison test (based on inequalities)

The limit comparison test is great for determining if a series converges or not. However, if a series converges, it does not provide us with a way to determine the error in approximating the infinite series with a partial sum.

If we can compare a given series to a simpler series with inequalities, that does give us a way to estimate the error.

Questions

Which is bigger (1/(k^2)) or (1/((k^2)+4k))?

Does (Underoverscript[Σ, (k=1), ∞])(1/(k^2)) converge or diverge?

What do you think is true about (Underoverscript[Σ, (k=1), ∞])(1/((k^2)+4k))?

Questions

Which is bigger (1/k) or (1/(k-1))?

Does (Underoverscript[Σ, (k=2), ∞])(1/k) converge or diverge?

What do you think is true about (Underoverscript[Σ, (k=2), ∞])(1/(k-1))?

Comparison test

If you want to know whether (Underoverscript[Σ, k, ∞])(Subscript[a, k]) converges or not and you find a simpler series (Underoverscript[Σ, k, ∞])(Subscript[b, k]) whose convergence/divergence you know, then

If 0≤(Subscript[a, k])≤(Subscript[b, k]) and (Underoverscript[Σ, k, ∞])(Subscript[b, k]) converges, then (Underoverscript[Σ, k, ∞])(Subscript[a, k]) must converge as well.

If (Subscript[a, k])≥(Subscript[b, k])≥0 and (Underoverscript[Σ, k, ∞])(Subscript[b, k]) diverges, then (Underoverscript[Σ, k, ∞])(Subscript[a, k]) must diverge as well.

Comparison test error estimate

If 0≤(Subscript[a, k])≤(Subscript[b, k]), (Underoverscript[Σ, k, ∞])(Subscript[b, k]) converges, and error=|(Underoverscript[Σ, k, ∞])(Subscript[b, k])-(Underoverscript[Σ, k, n])(Subscript[b, k])|=(Underoverscript[Σ, (k=n+1), ∞])(Subscript[b, k])≤L, then
	error=|(Underoverscript[Σ, k, ∞])(Subscript[a, k])-(Underoverscript[Σ, k, n])(Subscript[a, k])|=(Underoverscript[Σ, (k=n+1), ∞])(Subscript[a, k])≤(Underoverscript[Σ, (k=n+1), ∞])(Subscript[b, k])≤L

Questions

Consider the series (Underoverscript[Σ, (k=1), ∞])(1/(k (2^k))).

Compare this series to a geometric series to show it converges.

a[k_]:=1/(k 2^k)
b[k_]:=1/2^k
Show[
ListPlot[Table[{k,a[k]},{k,1,30}],PlotMarkers->"+"],
ListPlot[Table[{k,b[k]},{k,1,30}],PlotMarkers->"*"],
PlotRange->All
]

What is an error estimate in using (Underoverscript[Σ, (k=1), 9])(1/(k (2^k))) to approximate (Underoverscript[Σ, (k=1), ∞])(1/(k (2^k)))?

(Underoverscript[Σ, (k=1), ∞])(1/(k (2^k)))  ≤(Underoverscript[Σ, (k=1), ∞])(1/(2^k))=(Underoverscript[Σ, (k=1), ∞])((((1/2)))^k)≤(((Underoverscript[Σ, (k=0), ∞])((1/2)))^k)
Note: we want to start the geometric series from 0, to use the formal sum.

errorBound=Abs[1/(1-1/2)-Sum[b[k],{k,0,9}]] ;
N[%]
actualError=Abs[Sum[a[k],{k,1,Infinity}]-Sum[a[k],{k,1,9}]];
N[%]
N[2^(-9)]

Questions

Consider the series (Underoverscript[Σ, (k=2), ∞])(k/((k^4)+2k)).

Compare this series to a p-series to show it converges.

a[k_]:=k/(k^4+ 2k)
b[k_]:=1/k^3
Show[
ListPlot[Table[{k,a[k]},{k,1,10}],PlotMarkers->"+"],
ListPlot[Table[{k,b[k]},{k,1,10}],PlotMarkers->"*"],
PlotRange->All
]
Plot[{a[k],b[k]},{k,2,5},PlotLabels->Automatic]

What is an error estimate in using (Underoverscript[Σ, (k=2), 10])(k/((k^4)+2k)) to approximate (Underoverscript[Σ, (k=2), ∞])(k/((k^4)+2k))?

errorBound=NIntegrate[1/x^3,{x,10,Infinity}]
actualError=Abs[Sum[a[k],{k,1,Infinity}]-Sum[a[k],{k,1,10}]];
N[%]
N[1/200]