symsum - Symbolic summation of series

Syntax

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

Description

r = symsum(s) is the summation of the symbolic expression s with respect to its symbolic variable k as determined by findsym from 0 to k-1.

r = symsum(s,v) is the summation of the symbolic expression s with respect to the symbolic variable v from 0 to v-1.

r = symsum(s,a,b) and r = symsum(s,v,a,b) are the definite summations of the symbolic expression from v=a to v=b.

Examples

The commands

syms k n x
symsum(k^2)

return

1/3*k^3-1/2*k^2+1/6*k

symsum(k) returns

1/2*k^2-1/2*k

symsum(sin(k*pi)/k,0,n) returns

-1/2*sin(k*(n+1))/k+1/2*sin(k)/k/(cos(k)-1)*cos(k*(n+1))- 
1/2*sin(k)/k/(cos(k)-1)

symsum(k^2,0,10) returns

385

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

exp(x)

See Also

findsym, int, syms

  


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