product - Maple Programming Help

Home : Support : Online Help : Mathematics : Inert Functions : product

product

definite and indefinite product

Product

inert form of product

Calling Sequence

 product(f,k) $\prod _{k}f$ product(f,k=m..n) $\prod _{k=m}^{n}f$ product(f,k=alpha) $\prod _{k=\mathrm{\alpha }}f$ product(f,k=expr) $\prod _{k=\mathrm{expr}}f$ Product(f,k) ${\prod }_{k}f$ Product(f,k=m..n) ${\prod }_{k=m}^{n}f$ Product(f,k=alpha) ${\prod }_{k=\mathrm{\alpha }}f$ Product(f,k=expr) ${\prod }_{k=\mathrm{expr}}f$

Parameters

 f - expression k - name, the product index m, n - integers or arbitrary expressions alpha - RootOf expr - expression not containing k

Description

 • The product command is for computing symbolic products. It is used to compute a formula for an indefinite or definite product. If a formula cannot be computed, Maple returns the product unevaluated. A typical example would be product(x+k, k=0..n-1) which returns the formula GAMMA(x+n)/GAMMA(x). If you want to multiply a finite sequence of values, rather than compute a formula, use the mul command.  For example mul(x+k, k=0..2) returns x*(x+1)*(x+2). Although the product command can be used to compute explicit products, the mul command should be used in programs for explicit products.
 • You can enter the product command using either the 1-D or 2-D calling sequence.  For example, product(x+k, k=0..n-1) is equivalent to $\prod _{k=0}^{n-1}\left(x+k\right)$.
 • The call product(f, k) computes the indefinite product of f(k) with respect to k. That is, it computes a formula g such that g(k+1)/g(k) = f(k) for all k.
 • The call product(f, k = m..n) computes the definite product of f(k) over the given range m..n, that is, it computes f(m) f(m+1) ... f(n). The definite product is equivalent to g(n+1)/g(m) where g is the indefinite product. For example, product(n,n) = product(k, k=1..n-1) = GAMMA(n).
 • If m = n+1 then the value returned is 1. If m > n+1 then 1/product(f, k=n+1..m-1) is the value returned.
 • The call product(f, k= alpha) computes the definite product of f(k) over the roots of a polynomial where alpha must be a RootOf.
 • The call product(f, k= expr) substitutes the value of expr for k in f.
 • If Maple cannot find a closed form for the product, the function call itself is returned. (The prettyprinter displays the product function using a stylized product sign.)
 • The capitalized function name Product is the inert product function, which simply returns unevaluated.  It appears gray so that it is easily distinguished from a returned product calling sequence.

Examples

 > $\prod _{k=1}^{4}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left({k}^{2}\right)$
 ${576}$ (1)

For a finite sequence of values, use the mul command.

 > $\mathrm{mul}\left({k}^{2},k=1..4\right)$
 ${576}$ (2)
 > $\prod _{k=1}^{n}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left({k}^{2}\right)$
 ${{\mathrm{\Gamma }}{}\left({n}{+}{1}\right)}^{{2}}$ (3)
 > $\prod _{k}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left({k}^{2}\right)$
 ${{\mathrm{\Gamma }}{}\left({k}\right)}^{{2}}$ (4)
 > $\prod _{k=0}^{4}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{a}_{k}$
 ${{a}}_{{0}}{}{{a}}_{{1}}{}{{a}}_{{2}}{}{{a}}_{{3}}{}{{a}}_{{4}}$ (5)
 > $\prod _{k=0}^{n}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{a}_{k}$
 ${\prod }_{{k}{=}{0}}^{{n}}{}{{a}}_{{k}}$ (6)
 > ${\prod }_{k=0}^{m}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left(n+k\right)=\prod _{k=0}^{m}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left(n+k\right)$
 ${\prod }_{{k}{=}{0}}^{{m}}{}\left({n}{+}{k}\right){=}\frac{{\mathrm{\Gamma }}{}\left({n}{+}{m}{+}{1}\right)}{{\mathrm{\Gamma }}{}\left({n}\right)}$ (7)
 > $\prod _{k=1}^{5}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left(kx\right)$
 ${120}{}{{x}}^{{5}}$ (8)
 > $\prod _{k=x}^{5x}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}k$
 $\frac{{\mathrm{\Gamma }}{}\left({5}{}{x}{+}{1}\right)}{{\mathrm{\Gamma }}{}\left({x}\right)}$ (9)
 > $\prod _{k=1}^{\mathrm{∞}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left(\frac{1}{k}\right)$
 ${0}$ (10)

Compatibility

 • The product command was updated in Maple 2016; see Advanced Math.