MAT 142 Day 33

1263 days ago by kcrisman

The following examines the behavior of the Leibniz-Gregory series under different conditions of summing.

L1,L2 = [],[] sum1,sum2 = 0,0 for i in range(1000): a = 1/(2*i+1) sum1 += a sum2 += (-1)^i*a L1.append((i,sum1)) L2.append((i,sum2)) NoAlt = points(L1,color='blue',legend_label='Not Alternating') Alt = points(L2,color='red',legend_label='Alternating') 

Well, that's pretty clear, although perhaps it's not 100% clear if the increasing one diverges.  The limit comparison test with the harmonic series shows it does, though.

But... what else can happen?

L1,L2 = [],[] sum1,sum2 = 0,0 for i in range(10000): sum1 += (-1)^i*1/(2*i+1) if i%2 == 0: sum2 += 1/(8*i+1)+1/(8*i+5) if i%2 == 1: sum2 += (-1)*1/(2*i+1) L1.append((i,sum1)) L2.append((i,sum2)) points(L1,color='blue')+points(L2,color='red') 

This rearrangement appears to be going as low as you want.  Try range(10000) if you want further justification.

Here is yet another rearrangement situation which may surprise you.

@interact def _(goal=1,n=1000): L1,L2 = [],[] sum1,sum2 = 0,0 for i in range(n): sum1 += (-1)^i*1/(2*i+1) L1.append((i,sum1)) i,j = 0,3 while i < n: if sum2 < goal: sum2 += 1/(4*i+1) L2.append((i,sum2)) i += 1 else: sum2 += (-1)*1/j j += 4 L2.append((i,sum2)) i += 1 show(points(L1,color='blue')+points(L2,color='red')) html("I achieved my goal of $%s$ by rearranging $$1-1/3+1/5-1/7+1/9-\cdots = \sum_{k=1}^\infty \\frac{(-1)^k}{2k+1}$$ as I pleased!"%latex(goal)) 

Click to the left again to hide and once more to show the dynamic interactive window

I can converge to ANY NUMBER I LIKE.  This is the Riemann rearrangement theorem (see about 2:20 in the video).

So we really need another concept - when will this NOT happen?