symprod

Product of series

Description

example

F = symprod(f,k,a,b) returns the product of the series with terms that expression f specifies, which depend on symbolic variable k. The value of k ranges from a to b. If you do not specify k, symprod uses the variable that symvar determines. If f is a constant, then the default variable is x.

example

F = symprod(f,k) returns the product of the series that expression 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.

Examples

Find Product of Series Specifying Bounds

Find the following products of series

P1=k=211k2,P2=k=2k2k21.

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 Product of Series Specifying Product Index and Bounds

Find the product of series

P=k=110000ekxx.

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

Find Product of Series with Unspecified Bounds

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

P1=kk,P2=k2k1k2.

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)

Input Arguments

collapse all

Expression defining terms of series, specified as a symbolic expression, function, constant, or a vector or matrix of symbolic expressions, functions, or constants.

Product index, specified as a symbolic variable. If you do not specify this variable, symprod uses the default variable that symvar(expr,1) determines. If f is a constant, then the default variable is x.

Lower bound of product index, specified as a number, symbolic number, variable, expression, or function (including expressions and functions with infinities).

Upper bound of product index, specified as a number, symbolic number, variable, expression, or function (including expressions and functions with infinities).

More About

collapse all

Definite Product

The definite product of a series is defined as

i=abxi=xaxa+1xb

Indefinite Product

The indefinite product of xi over i is

f(i)=ixi

This definition holds under the assumption that the following identity is true for all values of i.

f(i+1)f(i)=xi

Note

symprod does not compute indefinite products.

See Also

| | | | |

Introduced in R2011b