Alternating Series

MAT 229, Spring 2021

Week 10

Supporting materials

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

Stewart’s Calculus
	Section 11.5: Alternating series

Boelkins/Austin/Schlicker’s Active Calculus
	Section 8.4: Alternating series

Review

Series

The infinite sum (Underoverscript[Σ, (k=1), ∞])(Subscript[a, k])=(Subscript[a, 1])+(Subscript[a, 2])+(Subscript[a, 3])+… converges or diverges if its partial sums converge or diverge.

Question

If the series (Underoverscript[Σ, (k=1), ∞])(Subscript[a, k]) converges, what must be true about the sequence (Subscript[a, k]), k=1,2,…? (Video)

Question

What particular series do we use for comparisons? (Video)

Question

What tests for convergence and divergence have we discussed? (Video)

Alternating series

So far we have looked mostly at series where we sum nonnegative terms. We want to explore what happens if some of the terms are negative.

Alternating Series Test (AST):

The alternating series (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(Subscript[a, k]) converges if

(Subscript[a, k])≥0 for k=1,2,3,…

The sequence {(Subscript[a, k])} is a decreasing sequence.

(lim_(k->∞))(Subscript[a, k])=0

Questions

Does the p-series (Underoverscript[Σ, (k=1), ∞])(1/k) converge or diverge? Why or why not?

Does the alternating p-series (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(1/k) converge or diverge? Why or why not?

(Video)

Questions

What are the first four partial sums of the p-series (Underoverscript[Σ, (k=1), ∞])(1/k)?

a[k_]:=1/k
MatrixForm[Table[{n,Sum[a[k],{k,1,n}]},{n,1,4}]]

npts=1000;
p0=ListPlot[Table[{k,a[k]},{k,1,npts}],PlotLabels->"terms"];
p1=ListPlot[Table[{n,Sum[a[k],{k,1,n}]},{n,1,npts}],PlotLabels->"partial sums"];
Show[p0,p1,PlotRange->All]

What are the first four partial sums the alternating p-series (((Underoverscript[Σ, (k=1), ∞])(-1))^k)(1/k)?

a[k_]:=(-1)^k/k
MatrixForm[Table[{n,Sum[a[k],{k,1,n}]},{n,1,4}]]

exact=Sum[a[k],{k,1,Infinity}]

npts=10;
p0=ListPlot[Table[{k,1/k},{k,1,npts}],PlotLabels->"un-signed (harmonic) terms"];
p1=ListPlot[Table[{n,Sum[a[k],{k,1,n}]},{n,1,npts}],PlotLabels->"partial sums"];
p2=ListLinePlot[{{0,exact},{npts,exact}}];
Show[p0,p1,p2,PlotRange->All]

(Video)

Questions

Does the alternating series (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(1/(k!)) converge or diverge? Why or why not? (Video

Those factorials in the denominator are going to send these positive terms to 0 very quickly as k -> infinity. So yes, this one converges.

Does the alternating series (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))((k-1)/(k^2)) converge or diverge? Why or why not? (Video)

Look at the un-signed terms: are they eventually decreasing? Eventually ((k-1)/(k^2)) looks like (1/k) -- but the terms start like this: 0,(1/4),(2/8),(3/16),(4/32),.... So the first term is the minimum of all terms, and the second two terms are equal -- but from there on, they decrease in value, are positive, and tend to 0. So this alternating series converges. 

You can throw away any part of the head of the series -- convergence is all about the tail.

Notes

If the three conditions are met

the series is truly alternating,

the individual terms without the sign are decreasing, and

the limit of the individual terms go to zero,

then the alternating series converges.

If the last condition is not met, (lim_(n->∞))(Subscript[a, n])=0, then the series diverges by the divergence test.

If either of the first two conditions are not met, the alternating series test provides no conclusion: we don’t yet know whether the series converges or not.

Questions

Does the series (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))((k+1)/k) converge or diverge? Why or why not? (Video)

Does the series 1+(1/2)-(1/3)-(1/4)+(1/5)+(1/6)-(1/7)-(1/8)+… converge or diverge? Why or why not? (Video)

Does the series 1-(1/3)+(1/2)-(1/5)+(1/4)-(1/7)+(1/6)-(1/9)+… converge or diverge? Why or why not? (Video)

(* if you combine all terms in pairs after the first two, then *)
Plot[(2k^2+2k+1)/(k^2(k+1)^2),{k,1,10}]

Alternating series error estimate

We approximate series using partial sums. In the case of a converging alternating series, with decreasing terms (per the AST):
	(((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(Subscript[a, k])≈(((Underoverscript[Σ, (k=1), n])(-1))^(k+1))(Subscript[a, k])=(Subscript[a, 1])-(Subscript[a, 2])+(Subscript[a, 3])-(Subscript[a, 4])+…+(((-1))^(n+1))(Subscript[a, n])

Questions

What is the error in approximating the alternating series S=(((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(Subscript[a, k]) with its (n^th) partial sum, (Subscript[S, n]) =(((Underoverscript[Σ, (k=1), n])(-1))^(k+1))(Subscript[a, k])?

Absolute error = |S - (Subscript[S, n])| = |(((Underoverscript[Σ, (k=n+1), ∞])(-1))^(k+1))(Subscript[a, k])|

What is an estimate on this error?

(Video)

Alternating test error estimate

If the series (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(Subscript[a, k]) meets the requirements of the alternating series test so that it converges, then the error in approximating it with its (n^th) partial sum (((Underoverscript[Σ, (k=1), n])(-1))^(k+1))(Subscript[a, k]) is given very simply: 
						error≤(Subscript[a, n+1])

Questions

What is the error in approximating (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(1/((k^2)+3k+5)) with (((Underoverscript[Σ, (k=1), 10])(-1))^(k+1))(1/((k^2)+3k+5))? (Video)

a[k_]:=(((-1))^(k+1))(1/((k^2)+3k+5))
npts=10;
ListPlot[Table[{k,Abs[a[k]]},{k,1,10}]]

Abs[N[a[11]]] 
exact=Sum[N[a[k]],{k,1,Infinity}]
approx=Sum[N[a[k]],{k,1,npts}]
error=N[Abs[approx-exact]]
(* error is less than this first neglected term *)

Which partial sums approximate (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(1/k) with error less than 0.001? (Video)

We need 1/(n+1)<.001, or n>999. Take n=1000.

a[k_]:=(-1)^(k+1)/k
npts=1000
N[Abs[a[npts]]]
exact=Sum[a[k],{k,1,Infinity}]
approx=Sum[N[a[k]],{k,1,npts}]
error=N[Abs[approx-exact]] (* Conservative.... *)

Approximate (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(1/(k^3)) with error less than 0.001. (Video)

a[k_]:=(-1)^(k+1)/k^3
exact=Sum[a[k],{k,1,Infinity}]
N[%]
Solve[1/k^3==.001,k,Reals]

N[Abs[a[10]]]
approx=Sum[N[a[k]],{k,1,10}]
p0=ListPlot[Table[{k,1/k^3},{k,1,10}],PlotLabels->"unsigned terms"];
p1=ListPlot[Table[{n,Sum[a[k],{k,1,n}]},{n,1,10}],PlotLabels->"partial sums"];
p2=ListLinePlot[{{0,exact},{10,exact}}];
Show[p0,p1,p2,PlotRange->All]
error=N[Abs[approx-exact]]
(* Actually, we can get results "good enough" using only 8 in the partial sum: so the result is conservative. *)
approx=Sum[N[a[k]],{k,1,8}]
error=N[Abs[approx-exact]]

Homework

IMath problems on alternating series.