Accelerating the pace of engineering and science

# symprod

Product of series

## Description

example

symprod(expr,var) evaluates the product of a series, where expression expr defines the terms of a series, with respect to the symbolic variable var. The value of the variable var changes from 1 to var. If you do not specify the variable, symprod uses the default variable determined by symvar. If expr is a constant, then the default variable is x.

example

symprod(expr,var,a,b) evaluates the product of a series, where expression expr defines the terms of a series, with respect to the symbolic variable var. The value of the variable var changes from a to b. If you do not specify the variable, symprod uses the default variable determined by symvar. If expr is a constant, then the default variable is x.

symprod(expr,var,[a,b]), symprod(expr,var,[a b]), and symprod(expr,var,[a;b]) are equivalent to symprod(expr,var,a,b).

## Examples

### Evaluate the Product of a Series

Evaluate the product of a series for the symbolic expressions k and k^2:

```syms k
symprod(k)
symprod((2*k - 1)/k^2)```
```ans =
factorial(k)

ans =
(1/2^(2*k)*2^(k + 1)*factorial(2*k))/(2*factorial(k)^3)```

### Evaluate the Product of a Series Specifying Bounds

Evaluate the product of a series for these expressions specifying the bounds:

```syms k
symprod(1 - 1/k^2, k, 2, Inf)
symprod(k^2/(k^2 - 1), k, 2, Inf)```
```ans =
1/2

ans =
2```

You also can specify bounds as a row or column vector:

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

ans =
2```

### Evaluate the Product of a Series Specifying the Product Index and Bounds

Evaluate the product of a series for this multivariable expression with respect to k:

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

## Input Arguments

expand all

### expr — Expression defining terms of seriessymbolic expression | symbolic function | symbolic vector | symbolic matrix | symbolic number

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

### var — Product indexsymbolic variable

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

### a — Lower bound of product indexnumber | symbolic number | symbolic variable | symbolic expression | symbolic function

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

### b — Upper bound of product indexnumber | symbolic number | symbolic variable | symbolic expression | symbolic function

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

expand all

### Definite Product

The definite product of a series is defined as

$\prod _{i=a}^{b}{x}_{i}={x}_{a}\cdot {x}_{a+1}\cdot \dots \cdot {x}_{b}$

### Indefinite Product

$f\left(i\right)=\prod _{i}{x}_{i}$

is called the indefinite product of xi over i, if the following identity holds for all values of i:

$\frac{f\left(i+1\right)}{f\left(i\right)}={x}_{i}$

 Note:   symprod does not compute indefinite products.