Sponsored links: Algebra eBooks

The Maxima on-line user's manual

Algebra Calculator

Sum

Function: sum (<expr>, <i>, <i_0>, <i_1>) Represents a summation of the values of <expr> as the index <i> varies from <i_0> to <i_1>. The noun form sum is displayed as an uppercase letter sigma.

`sum` evaluates its summand <expr> and lower and upper limits <i_0> and <i_1>, `sum` quotes (does not evaluate) the index <i>.

If the upper and lower limits differ by an integer, the summand <expr> is evaluated for each value of the summation index <i>, and the result is an explicit sum.

Otherwise, the range of the index is indefinite. Some rules are applied to simplify the summation. When the global variable `simpsum` is `true`, additional rules are applied. In some cases, simplification yields a result which is not a summation; otherwise, the result is a noun form sum.

When the `evflag` (evaluation flag) `cauchysum` is `true`, a product of summations is expressed as a Cauchy product, in which the index of the inner summation is a function of the index of the outer one, rather than varying independently.

The global variable `genindex` is the alphabetic prefix used to generate the next index of summation, when an automatically generated index is needed.

`gensumnum` is the numeric suffix used to generate the next index of summation, when an automatically generated index is needed. When `gensumnum` is `false`, an automatically-generated index is only `genindex` with no numeric suffix.

See also `sumcontract`, `intosum`, `bashindices`, `niceindices`, `nouns`, `evflag`, and `zeilberger`.

Examples:

```          (%i1) sum (i^2, i, 1, 7);
(%o1)                          140
(%i2) sum (a[i], i, 1, 7);
(%o2)           a  + a  + a  + a  + a  + a  + a
7    6    5    4    3    2    1
(%i3) sum (a(i), i, 1, 7);
(%o3)    a(7) + a(6) + a(5) + a(4) + a(3) + a(2) + a(1)
(%i4) sum (a(i), i, 1, n);
n
====
\
(%o4)                       >    a(i)
/
====
i = 1
(%i5) sum (2^i + i^2, i, 0, n);
n
====
\       i    2
(%o5)                     >    (2  + i )
/
====
i = 0
(%i6) sum (2^i + i^2, i, 0, n), simpsum;
3      2
n + 1   2 n  + 3 n  + n
(%o6)             2      + --------------- - 1
6
(%i7) sum (1/3^i, i, 1, inf);
inf
====
\     1
(%o7)                        >    --
/      i
====  3
i = 1
(%i8) sum (1/3^i, i, 1, inf), simpsum;
1
(%o8)                           -
2
(%i9) sum (i^2, i, 1, 4) * sum (1/i^2, i, 1, inf);
inf
====
\     1
(%o9)                      30  >    --
/      2
====  i
i = 1
(%i10) sum (i^2, i, 1, 4) * sum (1/i^2, i, 1, inf), simpsum;
2
(%o10)                       5 %pi
(%i11) sum (integrate (x^k, x, 0, 1), k, 1, n);
n
====
\       1
(%o11)                      >    -----
/     k + 1
====
k = 1
(%i12) sum (if k <= 5 then a^k else b^k, k, 1, 10);
10    9    8    7    6    5    4    3    2
(%o12)   b   + b  + b  + b  + b  + a  + a  + a  + a  + a```

There are also some inexact matches for `sum`. Try `?? sum` to see them.

```(%o1)                                true
(%i2) ```

Related Examples

sum

f(n) := (-1/2)^n;

sum(f(n), n, 1, 2);

Calculate

sum

sum(2*k,k,1,410)/2015;

Calculate

sum

g1:a+b=135;

g2:b-a=253;

sum:[(1.450),(a,b)];

Calculate

sum

sum(k/(k!),k,0,10) ;

Calculate

sum

sum (k*(e^-k), k, 0, n);

Calculate

sum

sum(comb(9,9-k),k,1,8);

Calculate

sum

n:4;

eq1:sum(1/2*(n-i+1)*(...

sum((n-i+1)*(n-i+2),i...

Calculate

sum

sum( (2*m)!/((k!)^2 *...

Calculate

sum

Aufgabe1:"Die Summe d...

a1:'sum(i,i,1,100)=su...

Aufgabe2:"Die Summe d...

Calculate

sum

sum(-x^2,x,1,20);

Calculate