SequenceSeriesGraphs.mws

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]);

[Maple Plot]

Here is a geometric sequence.

>    pointplot({seq([n,(4/5)^n],n=0..30)},color=red,symbol=circle,symbolsize=12,labels=[n,an]);

[Maple Plot]

I will ask Maple to print the first few terms in the sequence graphed above.

>    seq((4/5)^n,n=0..10);

1, 4/5, 16/25, 64/125, 256/625, 1024/3125, 4096/15625, 16384/78125, 65536/390625, 262144/1953125, 1048576/9765625

Here are some decimal approximations.

>    evalf(seq((4/5)^n,n=0..10));

1., .8000000000, .6400000000, .5120000000, .4096000000, .3276800000, .2621440000, .2097152000, .1677721600, .1342177280, .1073741824

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]);

[Maple Plot]

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);

4652001187058965190221/931322574615478515625

>    evalf(%);

4.995048240

>    sum((4/5)^i,i=0..infinity);

5

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);

Sum((4/5)^i,i = 0 .. infinity)

>    value(%);

5

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);

Seq((4/5)^n,n = 0 .. 10)

>    value(%);

Seq((4/5)^n,n = 0 .. 10)

Observe that the formula developed in class works.

>    Sum(10*(2/5)^i,i=0..infinity);

Sum(10*(2/5)^i,i = 0 .. infinity)

>    value(%);

50/3

>    10/(1-2/5);

50/3

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]);

[Maple Plot]

The partial sum formula for a geometric series summing from 0 also works.

>    Sum(10*(2/5)^i,i=0..30);

Sum(10*(2/5)^i,i = 0 .. 30)

>    value(%);

3104408582050163396318/186264514923095703125

>    evalf(%);

16.66666667

>    (10-10*(2/5)^31)/(1-2/5);

3104408582050163396318/186264514923095703125

>    evalf(%);

16.66666667

I will conclude this worksheet with a telescoping series.

>    seq(4/(n^2-1),n=2..12);

4/3, 1/2, 4/15, 1/6, 4/35, 1/12, 4/63, 1/20, 4/99, 1/30, 4/143

>    seq(2/(n-1),n=2..12)-seq(2/(n+1),n=2..12);

4/3, 1/2, 4/15, 1/6, 4/35, 1/12, 4/63, 1/20, 4/99, 1/30, 4/143

>    seq(2/(n-1),n=2..14);

2, 1, 2/3, 1/2, 2/5, 1/3, 2/7, 1/4, 2/9, 1/5, 2/11, 1/6, 2/13

>    seq(-2/(n+1),n=2..12);

-2/3, -1/2, -2/5, -1/3, -2/7, -1/4, -2/9, -1/5, -2/11, -1/6, -2/13

>    Sum(4/(n^2-1),n=2..12);

Sum(4/(n^2-1),n = 2 .. 12)

>    value(%);

209/78

>    evalf(%);

2.679487179

>    evalf(sum(4/(n^2-1),n=2..100));

2.960198020

>    evalf(sum(4/(n^2-1),n=2..1000));

2.996001998

>    Sum(4/(n^2-1),n=2..infinity);

>   

Sum(4/(n^2-1),n = 2 .. infinity)

>    value(%);

3

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]);

[Maple Plot]

>