1)    Type in this program and take notes on what it does.
CLS
sum = 0
FOR n= 1 to 20
sum = sum + n
PRINT n; sum
NEXT n
2)    Now see how this program differs from the one above:
CLS
sum = 0
FOR n= 1 to 20
sum = sum + 2*n
PRINT n; sum
NEXT n
3)    You can see how the computer is helpful for finding out the sum of a long list of terms. In your classwork you were looking at sums like this:
| ¥ | |
| S |   1  
2n |
| n=1 |
4)    One problem with trying to add up tiny fractions is that the pieces get so small the computer does not have enough decimal places to represent them. Add this statement in at the top of your program so that the "sum" variable and the "n" variable will use double precision numbers (up to 12 decimal places instead of 6).
DEFDBL N,S
Then run the program again and see if you get more accurate results.
5)    Many of you came up with a generalization about series that involve 1/2n or 1/3n or 1/4n etc.. Use the computer to see if your generalization is true.
6)    It's a little harder to figure out what happens to a series if the fractions have some numerator other than 1. Experiment with sums of this type:
| ¥ | |
| S |   2n  
3n |
| n=1 |
7)    We have also considered an infinite series that does not involve powers, such as this one:
1/2 + 1/4 + 1/6 + 1/8 + 1/10 + 1/12…
We know it adds up to more than one, but does that mean its growth is unbounded? Write a program to add up the terms and see how high the sum can get.
8)    When you are adding up the terms in an infinite series, there are only two things that can happen. Either the sum has a bound or it doesn't. We want to sort them out and be able to predict in advance if a sum will be bounded or not.
Consider each of these sums below and make a prediction about its growth. Write a program to get just the first ten numbers and make a guess about what will happen next. Then change your loop to see twenty numbers, and see if you change your mind about the behavior of the sum. Continue to add on ten more steps to your loop and modify your predictions as you go.| ¥ | |
| S |   1  
10n |
| n=1 |
| ¥ | |
| S |   1  
.01n2 |
| n=1 |
| ¥ | |
| S |   1  
.002n3 |
| n=1 |
| ¥ | |
| S |   4  
nÖn |
| n=1 |
| ¥ | |
| S |   6n8  
1.1n |
| n=1 |
| ¥ | |
| S |   5  
4n |
| n=1 |
| ¥ | |
| S |   1  
16Ön |
| n=1 |
| ¥ | |
| S |   (-1)n  
n |
| n=1 |
9)    Click here to go to an interesting website about infinite series. There is a great picture of the powers of one-fourth there, and it really convinces you that they sum to one-third. Also if you continue along to the next few pages of the site, you will see a good algebraic proof of what you probably hypothesized for #6 in this lab.
10)    I will now give you a new vocabulary word: convergence. We say that a sequence converges if there is some number, L, that the terms of the sequence get arbitrarily close to and stay close to. For example, when you were adding up the powers of one-half: 1/2 + 1/4 + 1/8 + 1/16…, you got a sequence of partial sums. 1/2 + 1/4 gave a partial sum of 3/4, then adding another 1/8 boosted the partial sum to 7/8, and so on. If I write out the sequence of partial sums, it looks like this:
3/4, 7/8, 15/16, 31/32, 63/64, 127/128…
Many of you pointed out that each of these results is one piece away from being a whole. In fact, I could write the same list like this:1-1/4, 1-1/8, 1-1/16, 1-1/32, 1-1/64, 1-1/128…
The sequence of partial sums is converging to the number one (that's my number L). It fits the definition of convergence because I can get as close to L as I want to. If you want me to be within a billionth of L, I can do it. I just need to go further down the list. Any degree of closeness that you want me to achieve, it is possible. That's what "arbitrarily close" means. Someone else can pick a tolerance for how close you have to be, and you can find a way to satisfy it. As long as the sequence gets within that tolerance, and doesn't wander outside of it further down the line, it satisfies the definition of convergence.1 + -1 + 1 + -1 + 1 + -1…
Is it bounded? Yes. Does it converge to some number L? No. Explain the difference.11)    Series with alternating terms can lead to some interesting results. Try this one:
1 + -1/2 + 1/3 + -1/4 + 1/5 + -1/6…
Make some partial sums and see what you think this series will do as it stretches out to infinity. Is it bounded? Will it converge?