Graphing Sequences and Series
Syntax for Doing It Quickly
> | with(plots): |
Warning, the name changecoords has been redefined
These commands will accomplish the goal a bit quicker than some of the other worksheets I have put online.
I will begin with a sequence.
> | pointplot({seq([n,sin(n/10)],n=0..314)},color=red,symbol=circle,symbolsize=12,labels=[n,an]); |
Here is a geometric sequence.
> | pointplot({seq([n,(4/5)^n],n=0..30)},color=red,symbol=circle,symbolsize=12,labels=[n,an]); |
I will ask Maple to print the first few terms in the sequence graphed above.
> | seq((4/5)^n,n=0..10); |
Here are some decimal approximations.
> | evalf(seq((4/5)^n,n=0..10)); |
Here is a partial sums graph of the geometric series associated with the sequence directly above.
> | pointplot({seq([n,sum((4/5)^i,i=0..n)],n=0..30)},color=red,symbol=circle,symbolsize=12,labels=[n,S]); |
Let's ask Maple to compute a finite and the infinite sum related to the geometric series above.
> | sum((4/5)^i,i=0..30); |
> | evalf(%); |
> | sum((4/5)^i,i=0..infinity); |
Using a capital S will result in a display that can then be evaluated using the "value" command.
> | Sum((4/5)^i,i=0..infinity); |
> | value(%); |
We can use the capital S in the sequence command but following with the value command does not result in each term being displayed separately.
> | Seq((4/5)^n,n=0..10); |
> | value(%); |
Observe that the formula developed in class works.
> | Sum(10*(2/5)^i,i=0..infinity); |
> | value(%); |
> | 10/(1-2/5); |
Here is a graph of partial sums related to the geometric series directly above.
> | pointplot({seq([n,sum(10*(2/5)^i,i=0..n)],n=0..30)},color=red,symbol=circle,symbolsize=12,labels=[n,S]); |
The partial sum formula for a geometric series summing from 0 also works.
> | Sum(10*(2/5)^i,i=0..30); |
> | value(%); |
> | evalf(%); |
> | (10-10*(2/5)^31)/(1-2/5); |
> | evalf(%); |
I will conclude this worksheet with a telescoping series.
> | seq(4/(n^2-1),n=2..12); |
> | seq(2/(n-1),n=2..12)-seq(2/(n+1),n=2..12); |
> | seq(2/(n-1),n=2..14); |
> | seq(-2/(n+1),n=2..12); |
> | Sum(4/(n^2-1),n=2..12); |
> | value(%); |
> | evalf(%); |
> | evalf(sum(4/(n^2-1),n=2..100)); |
> | evalf(sum(4/(n^2-1),n=2..1000)); |
> | Sum(4/(n^2-1),n=2..infinity); |
> |
> | value(%); |
The idea is that everything will "subtract out" except for 2 + 1.
Here is a graph of partial sums.
> | pointplot({seq([n,sum(4/(i^2-1),i=2..n)],n=2..60)},color=red,symbol=circle,symbolsize=12,labels=[n,S]); |
> |