Example 1
In the following example, it is unclear whether the argument represents the summand or the index.
Solution:
For this example, we assume the intention was for the summand and index to both be You must explicitly state both arguments for sum.
Example 2
In the following example, attempting to sum more than one summand at a time results in an error.
Solution:
To sum more than one summand at at time, use the map command.
>
|
|
| (3.2) |
Example 3
In the following example, attempting to calculate the sum of over both index variables results in an error. This statement is not well-defined.
>
|
|
Solution:
Depending on the interpretation, one possible solution is to express the sum in the following manner: if the indices are meant to be sequenced individually, then the following statement corrects the error and produces the intended result.
>
|
|
Otherwise, if the indices are meant to be sequenced in tandem, then the following statement corrects the error and produces the intended result.
>
|
|