Part A --- Review of seq and introduction of add (7 minutes)

Recall that seq makes sequences. For example:

> seq( 3^k, k = 3 .. 15 );

[Maple Math]

Exercise (do it now, but not to turn in): use seq to create the sequence 1, [Maple Math] , [Maple Math] , [Maple Math] , [Maple Math] , ... [Maple Math]

> seq( x^k, k=0..12);

[Maple Math]

The add command works exactly like seq, except that it adds together the terms instead of putting them in a sequence. For example:

> add( x^k, k = 3 .. 15 );

[Maple Math]

Exercise (do it now, but not to turn in): use add to create the sum [Maple Math] + ... + [Maple Math]

> add(n*y^n,n=1..13);

[Maple Math]

Note that for both seq and add :
1. The variable is a "dummy" variable local to the command.

2. The boundaries of the sequence/sum must evaluate to explicit numbers when the sequence/sum is evaluated.
For example, note the variable
k :

> k := 3.963;
add( k, k = 1 .. 5 );
k;

[Maple Math]

[Maple Math]

[Maple Math]

and note that the following fails (in contrast to the closely related but quite different function sum that we will investigate later; for now avoid the use of sum !)

> restart;
add( k, k = 1 .. n );

Error, unable to execute add

>

> add((-1)^k*x^k,k=0..8);

[Maple Math]

>