We now know that ten blocks can be stacked to extend approximately 1.46 feet
beyond the edge of the table. How far will 100 blocks extend? As we
previously observed, solving this by typing in a sum made up of 100 fractions
would be quite tedious! Fortunately, Maple provides another built-in function
that makes this simple.
Whenever we have wanted to express the general solution to the block stacking
problem in text, we have used mathematical summation notation:
Maple provides a built-in function called sum that will do exactly this
operation. For example, if we want to sum the first ten terms in the above
series, we can do this with:
| sum(1/(2*'i'), 'i' = 1..10); |
This gives us the same answer as summing the first ten fractions in the series
directly.
Notice that sum takes two arguments: the first argument gives the term
over which the summation is to be carried out, and the second argument gives
the summation variable and its bounds. Every occurrence of the summation
variable should be enclosed in single quotes. (This tells Maple not to use any
value that the summation variable may have previously been given.)
Now, suppose that we are interested in a floating-point approximation to the
sum of the first ten terms. How could we use both sum and evalf to
compute this in one step?
Click here for the answer
Can you come up with a floating-point approximation to the sum of the first 100
terms in the series?
Click here for the answer
Experiment some more. You'll find that you can do extremely long summations
this way. How far out can one million blocks extend? How about one billion
blocks? One trillion?
Joseph L. Zachary
Hamlet Project
Department of Computer Science
University of Utah