Product of a sequence (product)
Product of an expression over one or more ranges.
How to write it
product(f, k = a..b)
The product over the range.
- f
- The expression or function to work on. Takes an expression.
- k = a..b
- The index and its bounds; a bound may be inf. Takes a variable with its range.
product(f, i = a..b, j = a..b)
A double product.
- f
- The expression or function to work on. Takes an expression.
- i = a..b
- The first index and its range. Takes a variable with its range.
- j = a..b
- The second index and its range. Takes a variable with its range.
Examples
product(k, k = 1..5)In the solver,
Open in the solverproduct(k, k = 1..5)gives120.product(1 + 1/k, k = 1..4)In the solver,
Open in the solverproduct(1 + 1/k, k = 1..4)gives5.product(i + j, i = 1..2, j = 1..2)In the solver,
Open in the solverproduct(i + j, i = 1..2, j = 1..2)gives72.
Related functions
- numeric_product
Multiply an expression over a range, as a decimal.
- series
Series expansion of an expression about a point.
- numeric_sum
Add up an expression over a range, as a decimal.
- series_coefficient
The coefficient of the term of a given order in the series of an expression.
- sum
Sum of an expression over one or more ranges.
- next_terms
The terms that follow a list, given only when a rule explains it and predicts two more.