This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


evaluates the sum .
starts with .
uses steps .
uses successive values , , ....
evaluates the multiple sum .
gives the indefinite sum .
  • Sum can be entered as .
  • can be entered as Esc sum Esc or \[Sum].
  • Sum can be entered as .
  • The limits should be underscripts and overscripts of in normal input, and subscripts and superscripts when embedded in other text.
  • Sum uses the standard Mathematica iteration specification.
  • The iteration variable i is treated as local, effectively using Block.
  • If the range of a sum is finite, is typically assigned a sequence of values, with being evaluated for each one.
  • In multiple sums, the range of the outermost variable is given first. »
  • The limits of summation need not be numbers. They can be Infinity or symbolic expressions. » »
  • If a sum cannot be carried out explicitly by adding up a finite number of terms, Sum will attempt to find a symbolic result. In this case, f is first evaluated symbolically.
  • The indefinite sum is defined so that its difference with respect to i gives f. »
  • Definite and indefinite summation can be mixed in any order. »
  • The following options can be given:
Assumptions$Assumptionsassumptions to make about parameters
GenerateConditionsFalsewhether to generate conditions on parameters
MethodAutomaticmethod to use
RegularizationNonewhat regularization scheme to use
VerifyConvergenceTruewhether to verify convergence
  • Possible values for Regularization include: None, , , , , and . specifies different schemes for different variables in a multiple sum.
  • Method performs the summation using the specified method.
  • Method->{"strategy", Method->{"meth1", "meth2", ...}} uses the methods , controlled by the specified strategy method.
  • Possible strategy methods include:
sequentially try each method until one succeeds
sequentially try each method and return the best result
try each method in parallel until one succeeds
try each method in parallel and return the best result
use iterated univariate summation
  • Specific methods include:
Automaticautomatically selected method
special finite hypergeometric term summation
indefinite hypergeometric term summation
general definite hypergeometric term summation
definite hypergeometric term summation
summation based on counting solutions in level sets
logarithmic series summation
periodic function summation
polygamma series representation summation
polygamma integral representation summation
polygamma summation by parts
polynomial summation
polynomial exponential summation
polynomial trigonometric summation
compute the sum procedurally
indefinite q-hypergeometric term summation
definite q-hypergeometric term summation
q-rational function summation
rational times exponential summation
rational function summation
rational trigonometric summation
summation based on table lookup
  • Sum can do essentially all sums that are given in standard books of tables.
Numeric sum:
Symbolic sum:
Use Esc sum Esc to enter and Ctrl+_ for the lower limit and then Ctrl+% for the upper limit:
Infinite sum:
Indefinite sum:
Multiple sum with summation over performed first:
Numeric sum:
Click for copyable input
Symbolic sum:
Click for copyable input
Use Esc sum Esc to enter and Ctrl+_ for the lower limit and then Ctrl+% for the upper limit:
Click for copyable input
Infinite sum:
Click for copyable input
Indefinite sum:
Click for copyable input
Click for copyable input
Multiple sum with summation over performed first:
Click for copyable input
A definite sum over a finite range:
Using step size 2:
Using a finite list of elements:
Plot the sequence and its partial sums:
A multiple sum over finite ranges:
Using a different step size:
The outermost summation bounds can depend on inner variables:
Combine summation over lists with standard iteration ranges:
The elements in the iterator list can be any expression:
Sum over infinite ranges:
Multivariate sums over infinite ranges:
Sum over symbolic ranges:
Indefinite summation:
The difference is equivalent to the summand:
The definite sum is given as the difference of indefinite sums:
Multivariate indefinite summation:
Mixes of indefinite and definite summation:
Use GenerateConditions to get the conditions under which the answer is true:
Refine or simplify the resulting answer:
Use Assumptions to provide assumptions directly to Sum:
An infinite sum may not converge:
Some infinite sums can be given a finite value using Regularization:
Differences of expressions with a general function:
Polynomials can be summed in terms of polynomials:
Factorial polynomials:
Exponential sequences (geometric series):
The base-2 case plays the same role for sums as base- does for integrals:
Fibonacci and LucasL are exponential sequences with base GoldenRatio:
Exponential polynomials can be summed in terms of exponential polynomials:
Rational functions can be summed in terms of rational functions and PolyGamma:
Every difference of a rational function can be summed as a rational function:
In general, the answer will involve PolyGamma:
Every rational function can be summed:
Some rational exponential sums can be summed in terms of elementary functions:
In general, the answer involves special functions:
Every rational exponential function can be summed:
Trigonometric polynomials can be summed in terms of trigonometric functions:
Multiplied by a polynomial:
Multiplied by an exponential:
Multiplied by an exponential and a polynomial:
Hypergeometric term sequences:
The DiscreteRatio is rational for all hypergeometric term sequences:
Many functions give hypergeometric terms:
Any products are hypergeometric terms:
Differences of hypergeometric terms can be summed as hypergeometric terms:
In general additional special functions are required:
Logarithmic sums:
Some ArcTan sums can be represented in terms of ArcTan:
Similarly for ArcCot sums:
Some trigonometric sums with exponential arguments have trigonometric representations:
Products of PolyGamma and other expressions:
HarmonicNumber and Zeta behave like PolyGamma sequences:
Q-polynomial functions:
Multi-basic q-polynomial functions:
Mixed multi-basic q-polynomial functions:
Q-rational functions:
In general QPolyGamma is needed to represent the solution:
Rational functions of hyperbolic functions can be reduced to q-rational sums:
Q-hypergeometric terms:
Holonomic sequences generalize hypergeometric term sequences:
Any holonomic sequence can be summed:
Many special functions are holonomic:
Periodic sequences:
Periodic multiplied with a summable sequence:
Polynomials can be summed in terms of polynomials:
Polynomial exponentials can be summed in terms of polynomial exponentials:
Get the conditions for summability:
Rational functions can always be summed:
In general RootSum expressions are needed:
Some rational exponential functions can be summed as rational exponentials:
In general LerchPhi is required for the result:
The infinite sum is often simpler:
Trigonometric polynomials can be summed in terms of trigonometric functions:
Multiplied by a polynomial:
Multiplied by a rational function:
Multiplied by an exponential:
Logarithms of polynomials and rational functions can always be summed:
In the infinite case there is also convergence analysis:
Some hypergeometric term sums can be summed in the same class:
In general HypergeometricPFQ functions are needed:
Products of PolyGamma and other expressions:
Combining with rational and rational exponential:
Products of Zeta and HarmonicNumber with other expressions:
These are typically called Euler sums:
StirlingS1 along columns, rows and diagonals multiplied by other expressions:
Similarly for StirlingS2:
Periodic sequences multiplied by other expressions:
Infinite sums are often simpler:
Elementary functions of several variables:
Sum with step size 2:
Sum over the members of an arbitrary list:
Doubly infinite sums:
Use Assumptions to obtain a simpler answer for an indefinite logarithmic sum:
Generate conditions required for the sum to converge:
The summand in this rational sum is singular for some values of the parameter a:
Different methods may produce different results:
The results should be equivalent:
Many sums may not converge:
By using Regularization, many sums can be given an interpretation:
Whenever a sum converges, the regularized value is the same:
By default, convergence testing is performed:
Without convergence testing, divergent sums may return an answer:
Find expressions for the sums of powers of natural numbers:
Verify a well-known identity:
Compute the sum of a finite geometric series:
Compute the sum of an infinite geometric series:
Find the sum and radius of convergence for a power series:
Study the properties of Pascal's triangle:
The sum of the numbers of any row in Pascal's triangle is a power of 2:
The alternating sum of the numbers in any row of Pascal's triangle is 0:
The sum of the squares of the numbers in the row of Pascal's triangle is Binomial:
The mean and variance for a Poisson distribution are both equal to the Poisson parameter:
Compute a Riemann sum approximation:
Compute an approximate value for using Ramanujan's formula:
Find the generating function for CatalanNumber:
Construct a Taylor approximation for functions:
NSum will use numerical methods to compute sums:
Applying N to an unevaluated sum effectively uses NSum:
DifferenceDelta is the inverse operator for indefinite summation:
And definite summation:
Sum effectively solves a special difference equation as solved by RSolve:
Several summation transforms are available including ZTransform:
Sum uses SumConvergence to generate conditions for the convergence of infinite series:
Series computes a finite power series expansion:
SeriesCoefficient computes the i^(th) power series coefficient:
FourierSeries computes a finite Fourier series expansion:
Total sums the entries in a list:
Accumulate generates the partial sums in a list:
Sums may not be convergent:
Using Regularization may give a finite value:
The upper summation limit is assumed to be an integer distance from the lower limit:
Use GenerateConditions to get explicit assumptions:
In general, the upper limit is assumed to be a multiple of distance from the lower limit:
With GenerateConditions, the assumptions are explicit:
Moments of Gaussian functions represented as EllipticTheta functions:
New in 1 | Last modified in 7