Vous êtes sur la page 1sur 10

Summation

From Wikipedia, the free encyclopedia

Summation is the operation of combining a sequence of numbers using addition; the result is their sum or
total. An interim or present total of a summation process is termed the running total. The numbers to be
summed may be integers, rational numbers, real numbers, or complex numbers, and other types of values
than numbers can be added as well: vectors, matrices, polynomials, and in general elements of any additive
group (or even monoid). For finite sequences of such elements, summation always produces a well-defined
sum (possibly by virtue of the convention for empty sums).

Summation of an infinite sequence of values is not always possible, and when a value can be given for an
infinite summation, this involves more than just the addition operation, namely also the notion of a limit.
Such infinite summations are known as series. Another notion involving limits of finite sums is integration.
The term summation has a special meaning related to extrapolation in the context of divergent series.

The summation of the sequence [1, 2, 4, 2] is an expression whose value, the sum of the sequence, is
defined to be that of the repeated addition 1 + 2 + 4 + 2, namely 9. Since addition is associative the value
does not depend on how the additions are grouped, for instance (1 + 2) + (4 + 2) and 1 + ((2 + 4) + 2) both
have the value 9; therefore, parentheses are usually omitted in repeated additions. Addition is also
commutative, so permuting the terms of a finite sequence does not change its sum. (For infinite summations
this property may fail; see absolute convergence for conditions under which it still holds.)

There is no special notation for summation of such explicitly given sequences, as the corresponding
repeated addition expression will do (but such an expression does not exist for the summation of an empty
sequence; one may substitute "0" for such a summation). If, however, the terms of the sequence are given
by regular pattern, possibly of variable length, then use of a summation operator may be useful or even
essential. For the summation of the sequence of consecutive integers from 1 to 100 one could use an
addition expression involving an ellipsis to mark out the missing terms: 1 + 2 + 3 + ... + 99 + 100. In this
case the reader easily guesses the pattern; however, for more complicated patterns, one needs to be precise
about the rule used to find successive terms, which can be achieved by using the summation operator "!".
Using this notation the above summation is written

The value of this summation is 5050. It can be found without performing 99 additions, since it can be
shown (for instance by mathematical induction) that

for all natural numbers n. More generally, formulas exist for many summations of terms following a regular
pattern.

The term "indefinite summation" refers to the search for an inverse image of a given infinite sequence s of
values for the forward difference operator, in other words for a sequence, called antidifference of s, whose
finite differences are given by s. By contrast, summation as discussed in this article is called "definite
summation".

Contents
Contents
1 Notation
1.1 Capital-sigma notation
1.2 Programming language notation
1.3 Special cases
2 Measure theory notation
3 Fundamental theorem of discrete calculus
4 Approximation by definite integrals
5 Identities
5.1 General manipulations
5.2 Some summations of polynomial expressions
5.3 Some summations involving exponential terms
5.4 Some summations involving binomial coefficients
6 Growth rates
7 See also
8 Notes
9 Further reading
10 External links

Notation
Capital-sigma notation
Mathematical notation uses a symbol that compactly represents summation of many similar terms: the
summation symbol ! (U+2211), an enlarged form of the upright capital Greek letter Sigma. This is defined
thus:

The subscript gives the symbol for an index variable, i. Here, i represents the index of summation; m is
the lower bound of summation, and n is the upper bound of summation. Here i = m under the
summation symbol means that the index i starts out equal to m. Successive values of i are found by adding
1 to the previous value of i, stopping when i = n. An example:

Informal writing sometimes omits the definition of the index and bounds of summation when these are
clear from context, as in

One often sees generalizations of this notation in which an arbitrary logical condition is supplied, and the
sum is intended to be taken over all values satisfying the condition. For example:
is the sum of f(k) over all (integer) k in the specified range,

is the sum of f(x) over all elements x in the set S, and

is the sum of !(d) over all positive integers d dividing n.[1]

There are also ways to generalize the use of many sigma signs. For example,

is the same as

A similar notation is applied when it comes to denoting the product of a sequence, which is similar to its
summation, but which uses the multiplication operation instead of addition (and gives 1 for an empty
sequence instead of 0). The same basic structure is used, with ", an enlarged form of the Greek capital
letter Pi, replacing the #.

Programming language notation


Summations can also be represented in a programming language. Some languages use a notation for
summation similar to the mathematical one. For example, this is Python:

sum(x[m:n+1])

and this is the Perl equivalent of the above Python:

use List::Util 'sum';


sum($m..$n);

and this is the PHP equivalent of the above Python:

$sum = array_sum($x);

and this is Fortran (or MATLAB and Octave):


sum(x(m:n))

and this is Haskell:

sum x

and this is Scheme:

(apply + x)

and this is Erlang:

lists:sum(X).

and this is J (or APL):

+/x

and this is TI-BASIC

sum(seq(x,x,m,n[,1]))
#text in [brackets] is optional

In other languages loops are used, as in the following Visual Basic/VBScript program:

Sum = 0
For I = M To N
Sum = Sum + X(I)
Next I

or the following C/C++/C#/Java code, which assumes that the variables m and n are defined as integer
types no wider than int, such that m ! n, and that the variable x is defined as an array of values of integer
type no wider than int, containing at least n " m + 1 defined elements:

int i;
int sum = 0;
for (i = m; i <= n; i++) {
sum += x[i];
}

In some cases a loop can be written more concisely, as in this Perl code:
$sum += $x[$_] for ($m..$n);

or these alternative Ruby expressions:

x[m..n].inject{|a,b| a+b}
x[m..n].inject(0){|a,b| a+b}

or in C++, using its standard library:

std::accumulate(&x[m], &x[n + 1], 0)

when x is a built-in array or a std::vector.

Using LINQ in C# (or other .Net languages), the following code will sum from i to n:

Enumerable.Range(i, n).Aggregate((x , y) => x + y);

Note that most of these examples begin by initializing the sum variable to 0, the identity element for
addition. (See "special cases" below).

Also note that the ! notation evaluates to a definite value, while most of the loop constructs used above are
only valid in an imperative programming language's statement context, requiring the use of an extra
variable to hold the final value. It is the variable which would then be used in a larger expression.

The exact meaning of !, and therefore its translation into a programming language, changes depending on
the data type of the subscript and upper bound. In other words, ! is an overloaded symbol.

In the above examples, the subscript of ! was translated into an assignment statement to an index variable
at the beginning of a for loop. But the subscript is not always an assignment statement. Sometimes the
subscript sets up the iterator for a foreach loop, and sometimes the subscript is itself an array, with no
index variable or iterator provided. Other times, the subscript is merely a propositional function that
contains an embedded variable, implying to a human, but not to a computer, that every value of the
variable should be used where the proposition evaluates to true.

In the example below:

x is an iterator, which implies a foreach loop, but S is a set, which is an array-like data structure that
can store values of mixed type. The summation routine for a set would have to account for the fact that it is
possible to store non-numerical data in a set.

The return value of ! is a scalar in all examples given above.

Special cases
It is possible to sum fewer than 2 numbers:

If the summation has one summand x, then the evaluated sum is x.


If the summation has no summands, then the evaluated sum is zero, because zero is the identity for
addition. This is known as the empty sum.

These degenerate cases are usually only used when the summation notation gives a degenerate result in a
special case. For example, if m = n in the definition above, then there is only one term in the sum; if m > n,
then there is none.

Measure theory notation


In the notation of measure & integration theory, a sum can be expressed as a definite integral,

where [a,b] is the subset of the integers from a to b, and where ! is the counting measure.

Fundamental theorem of discrete calculus


Indefinite sums can be used to calculate definite sums with the formula[2]:

Approximation by definite integrals


Many such approximations can be obtained by the following connection between sums and integrals,
which holds for any:

increasing function f:

decreasing function f:

For more general approximations, see the Euler–Maclaurin formula.

For functions that are integrable on the interval [a, b], the Riemann sum can be used as an approximation
of the definite integral. For example, the following formula is the left Riemann sum with equal partitioning
of the interval:
The accuracy of such an approximation increases with the number n of subintervals, such that:

Identities
The formulas below involve finite sums; for infinite summations see list of mathematical series

General manipulations

, where C is a constant
Some summations of polynomial expressions

(See Harmonic number)

(see arithmetic series)

(Special case of the arithmetic series)

where Bk denotes a Bernoulli

number

The following formulas are manipulations of generalized to begin a series at any

natural number value (i.e., ):

Some summations involving exponential terms


In the summations below x is a constant not equal to 1

(m < n; see geometric series)


(geometric series starting at 1)

(special case when x = 2)

(special case when x = 1/2)

Some summations involving binomial coefficients


There exist enormously many summation identities involving binomial coefficients (a whole chapter of
Concrete Mathematics is devoted to just the basic techniques). Some of the most basic ones are the
following.

, the binomial theorem

Growth rates
The following are useful approximations (using theta notation):

for real c greater than !1

(See Harmonic number)

for real c greater than 1


for non-negative real c

for non-negative real c, d

for non-negative real b > 1, c, d

See also
Einstein notation
Checksum
Product (mathematics)
Kahan summation algorithm
Iterated binary operation
Summation equation

Basel problem -

Notes
1. ^ Although the name of the dummy variable does not matter (by definition), one usually uses letters from the
middle of the alphabet (i through q) to denote integers, if there is a risk of confusion. For example, even if
there should be no doubt about the interpretation, it could look slightly confusing to many mathematicians to
see x instead of k in the above formulae involving k. See also typographical conventions in mathematical
formulae.
2. ^ "Handbook of discrete and combinatorial mathematics", Kenneth H. Rosen, John G. Michaels, CRC Press,
1999, ISBN 0-8493-0149-1

Further reading
Nicholas J. Higham, "The accuracy of floating point summation
(http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.43.3535) ", SIAM J. Scientific Computing
14 (4), 783–799 (1993).

External links
Media related to Summation at Wikimedia Commons
Summation (http://planetmath.org/?op=getobj&from=objects&id=6361) on PlanetMath
Method to Derive Polynomial Representations that Sum Natural Numbers with Exponents
(http://upload.wikimedia.org/wikipedia/commons/6/62/Sum_of_i.pdf)
Retrieved from "http://en.wikipedia.org/wiki/Summation"
Categories: Arithmetic | Mathematical notation

This page was last modified on 15 December 2010 at 10:14.


Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may
apply. See Terms of Use for details.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.

Vous aimerez peut-être aussi