Method on @sym: symsum (f, n, a, b)
Method on @sym: symsum (f, n, [a b])
Method on @sym: symsum (f, a, b)
Method on @sym: symsum (f, [a b])
Method on @sym: symsum (f, n)
Method on @sym: symsum (f)

Symbolic summation.

The sum of the expression f for n from a to b. When n is omitted it is determined using symvar and defaults to x if f is constant. The limits a and b default to 0 and n - 1 respectively.

syms n m
symsum(1/n^2, n, 1, m)
  ⇒ (sym) harmonic(m, 2)

symsum(exp(2*n)/sin(n), n, 2*m, 6*m)
  ⇒ (sym)
          6⋅m
          ____
          ╲
           ╲      2⋅n
            ╲    ℯ
            ╱   ──────
           ╱    sin(n)
          ╱
          ‾‾‾‾
        n = 2⋅m

See also: @sym/symprod, @sym/sum.

Package: symbolic