Function reference · Calculus
product
Multiplies an expression over a range of an integer index.
With number bounds, it multiplies the terms. With a symbolic bound, it finds a closed form where it can; otherwise the call is returned unevaluated.
Notation
product(expr, index, lower, upper)
Write it in an expression: nerdamer('product(k,k,1,5)'), or in the Playground.
nerdamer.product
nerdamer.product(expr: ExpressionInput, index: ExpressionInput, lower: ExpressionInput, upper: ExpressionInput): Expression
A method on the default import. Arguments can be strings, as in Notation.
import { product }
import { product } from 'nerdamer/calculus';
product(expr: ExpressionInput, index: ExpressionInput, lower: ExpressionInput, upper: ExpressionInput): Expression
Import only this function, from nerdamer/calculus.
Examples
Multiply the entries of a vector.
W:[x,x+1,x+2]; product(W[k],k,0,size(W)[0]-1)
// → x*(1+x)*(2+x)Open in PlaygroundGood to know
- The index is local to the call: a value stored under its name, as in
k:5, isn't substituted. Stored values still apply in the bounds.
