Experiments with Sequences

Math 151-03 (Pelsmajer)
Adam Rumpf
February 20, 2014

Directions:
Read through this workbook, asking questions as needed, and do the exercises.
Like last time, you will need to write up your investigations in the form of a lab report.
You will be doing experiments, so you should take notes about your progress as you work.

Sequences

A sequence is a list of numbers in a given order, for example:

3, 6, 9, 12, 15, 18, 21,...

More examples:

2, 1, 0, -1, -2, -3, -4, -5,...

0.9, 0.99, 0.999, 0.9999, ...

1.0, 0.5, 0.25, 0.125, 0.0625, ...

3, 0.1, 0.04, 0.001, 0.0005, 0.00009, ...

The numbers (terms) can be indexed by the positive integers.
In other words, it’s a function where the domain is the set of positive integers.
For example:

f[n_]:=3n
f[1]
f[2]
f[3]

Table[ f[n], {n,1,7}]

Looks familiar?  It should, you just saw it above.

Note: the variable is “n” instead of the usual “x”.  (The letters n, i, j, k, are traditional for integers.)

Note: we only looked at the first seven terms, but you could easily make more. For example:

Table[f[n], {n, 1, 50}]

Exercise 1

There were 4 more example sequences given above.  Find functions that generate those sequences, and use them to generate the first several terms of the sequence. 

You don’t have to get all 4.  One is enough, but two or three is better. (The fourth is much harder.)

Convergence and Divergence

The main question is: as n goes to infinity, what happens to the sequence?
It either converges to a number, or it diverges (to infinity, negative infinity, or otherwise does not exist).

Obvious question: This sounds exactly like the limit at infinity - what’s the difference?
The only difference is that in this case, the domain is only the positive integers.

For example (with a helpful visualization):

g[n_]:=N[Sin[7n Pi/50]]
Table[g[n],{n,1,20}]
ListPlot[Table[g[n],{n,1,20}], PlotRange-> All]

The sequence clearly behaves similarly to sin(x), going between -1 and 1 forever... hence, this sequence diverges.

Exercise 2

Decide, using experiments similar to the one above, whether the following sequences converge or diverge - and if convergent, then it converges to what?

Note: sometimes it takes quite a while before you can see whether it is converging or diverging.

Sin[n]
Sin[n Pi]
Sin[(n-1/n)Pi]
(25n^2 2^n+(-3)^n)/(3^n+25n^2 2^n)
(25n^2(-2)^n+3^n)/(25n^2 2^n-3^n)

Sequence of Partial Sums (Series)

A series is something like this:

1/2 + 1/4 + 1/8 + 1/16 + 1/32 + ...

You can think of it as a sequence of partial sums:

1/2,
1/2 + 1/4,
1/2 + 1/4 + 1/8, 
1/2 + 1/4 + 1/8 + 1/16, 
1/2 + 1/4 + 1/8 + 1/16 + 1/32, 
...

The main question is whether it converges to a value, or whether it diverges.

Given the formula for each term, in this case 1/(2^n), here’s how you define the partial sum of the first n terms:

h[n_]:= Sum[  1/2^i, {i,1,n}]
h[1]
h[2]
h[3]
Table[ h[n], {n,1,10}]

Is it clear that the series converges to 1?  
If it isn’t clear, you might try looking at decimal approximations of the same:

N[%]

Or, we could have asked for a decimal approximation from the start:

h2[n_]:= N[Sum[  1/2^i, {i,1,n}]]
Table[ h2[n], {n,1,10}]

Either way, we can see that: Yes, the partial sums appear to be converging to 1.

Exercise 3:

Experiment with partial sums of the following, to figure out whether the corresponding series converges or diverges.  If it converges, try to figure out what value it converges to.

1/3^n
(-1/2)^n
1.1^n
(99/100)^n
1/n^2
1/Sqrt[n]
(-1)^n/n
(-1)^n*4/(2n-1)
1/n!

Note: “n!” is the product of 1,2,...,n.  For example 4! = 1*2*3*4 = 24.

Exercise 4:

You’ve already looked at partial sums of (3^(-n)), (((-(1/2)))^n), and ((((99/100)))^n).  In general, you can consider the partial sums of (c^n), for any real number c.  For which values of c does the series seem to converge?

Exercise 5:

You’ve already looked at partial sums of (1/(n^2))and (1/(Sqrt[n])).  In general, you can consider the partial sums of (1/(n^c)) for any real number c.  For which values of c does the series seem to converge?