Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Product of series

`F = symprod(f,k,a,b)`

`F = symprod(f,k)`

`F = symprod(`

returns
the product of the series that expression `f`

,`k`

)`f`

specifies,
which depend on symbolic variable `k`

. The value
of `k`

starts at `1`

with an unspecified
upper bound. The product `F`

is returned in terms
of `k`

where `k`

represents the
upper bound. This product `F`

differs from the indefinite
product. If you do not specify `k`

, `symprod`

uses
the variable that `symvar`

determines.
If `f`

is a constant, then the default variable
is `x`

.

Find the following products of series

$$\begin{array}{l}P1={\displaystyle \prod _{k=2}^{\infty}1-\frac{1}{{k}^{2}}},\\ P2={\displaystyle \prod _{k=2}^{\infty}\frac{{k}^{2}}{{k}^{2}-1}}.\end{array}$$

syms k P1 = symprod(1 - 1/k^2, k, 2, Inf) P2 = symprod(k^2/(k^2 - 1), k, 2, Inf)

P1 = 1/2 P2 = 2

Alternatively, specify bounds as a row or column vector.

syms k P1 = symprod(1 - 1/k^2, k, [2 Inf]) P2 = symprod(k^2/(k^2 - 1), k, [2; Inf])

P1 = 1/2 P2 = 2

Find the product of series

$$P={\displaystyle \prod _{k=1}^{10000}\frac{{e}^{kx}}{x}}.$$

syms k x P = symprod(exp(k*x)/x, k, 1, 10000)

P = exp(50005000*x)/x^10000

When you do not specify the bounds of a series
are unspecified, the variable `k`

starts at `1`

.
In the returned expression, `k`

itself represents
the upper bound.

Find the products of series with an unspecified upper bound

$$\begin{array}{l}P1={\displaystyle \prod _{k}k},\\ P2={\displaystyle \prod _{k}\frac{2k-1}{{k}^{2}}}.\end{array}$$

syms k P1 = symprod(k, k) P2 = symprod((2*k - 1)/k^2, k)

P1 = factorial(k) P2 = (1/2^(2*k)*2^(k + 1)*factorial(2*k))/(2*factorial(k)^3)