Calculus B - Lab 8
TA: Patrick C. Rowe
Lab adapted from material by Ray Viglione
Today we look at sequences and series. A sequence is just a list of numbers; as such we can just define them as functions on Maple. To define a[n] = 2*n^2/(n^2+1) , we use typical function notation:
| > | a:=n->2*n^2/(n^2+1); |
Maple can list elements of the sequence. For example, to list out the tenth thru twentieth terms, type:
| > | seq(a(n),n=10..20); |
We can plot the sequence. To plot the first 100 terms of the above sequence:
| > | plot( [ seq([n,a(n)],n=1..100) ] , style=point, symbol=cross); |
(Other symbol options are diamond, box, circle, and point.) The above sequence appears to have a limit, namely 2. We evaluate it in the usual way.
| > | limit(a(n),n=infinity); |
We can also implement sums and series using the "sum" command. Using the same a[n] as above, let's find .
| > | Sum(a(n),n=1..200); |
| > | value(%); |
| > | evalf(%); |
We don't have to use a capital "s" in our command. The capital "S" is the inert form.
| > | sum(ln(n),n=4..7); |
| > | evalf(%); |
We can sum infinite series. If Maple returns the infinity symbol, then the series diverges. You may recognize the first series as a simple geometric series. The second series diverges because, as we saw, the terms don't go to zero.
| > | sum(1/3^(n-1),n=1..infinity); |
| > | Sum(a(n),n=1..infinity); |
| > | value(%); |
| > |
Exercises - Click on the Numbers
1)
2)
3)
4)
5)
6)
7)