Previous Up Next

5.43.35  Product: product mul

See also 5.43.35, 5.49.6 and 5.49.8).

Product of values of an expression: product

product(expr,var,a,b,p) or mul(expr,var,a,b,p) returns the product of values of an expression ex when the variable var goes from a to b with a step p (by default p=1): this syntax is for compatibility with Maple.
Input:

product(x^2+1,x,1,4)

or:

mul(x^2+1,x,1,4)

Output:

1700

Indeed 2*5*10*17=1700
Input:

product(x^2+1,x,1,5,2)

or:

mul(x^2+1,x,1,5,2)

Output:

520

Indeed 2*10*26=520

Product of elements of a list: product

product or mul takes as argument a list l of reals (or floating numbers) or two lists of the same size (see also 5.43.35, 5.49.6 and 5.49.8).


Previous Up Next