Products & Services Solutions Academia Support User Community Company

Learn more about Symbolic Math Toolbox   

symsum - Evaluate symbolic sum of series

Syntax

r = symsum(expr)
r = symsum(expr, v)
r = symsum(expr, a, b)
r = symsum(expr, v, a, b)

Description

r = symsum(expr) evaluates the sum of the symbolic expression expr with respect to the default symbolic variable defaultVar determined by symvar. The value of the default variable changes from 0 to defaultVar - 1.

r = symsum(expr, v) evaluates the sum of the symbolic expression expr with respect to the symbolic variable v. The value of the variable v changes from 0 to v - 1.

r = symsum(expr, a, b) evaluates the sum of the symbolic expression expr with respect to the default symbolic variable defaultVar determined by symvar. The value of the default variable changes from a to b.

r = symsum(expr, v, a, b) evaluates the sum of the symbolic expression expr with respect to the symbolic variable v. The value of the default variable changes from a to b.

Examples

Evaluate the sum of the following symbolic expressions k and k^2:

syms k
symsum(k)
symsum(k^2)

The results are

ans =
k^2/2 - k/2

ans =
k^3/3 - k^2/2 + k/6
 

Evaluate the sum of the following expression specifying the limits:

symsum(k^2, 0, 10)

The result is

ans =
385
 

Evaluate the sum of the following multivariable expression with respect to k:

syms x;
symsum(x^k/sym('k!'), k, 0, inf)

The result is

ans =
exp(x)

See Also

int | syms | symvar

How To

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS