compute closed forms of indefinite sums
Indefinite(f, k, opt)
expression depending on k
(optional) equation of the form failpoints=true or failpoints=false
The Indefinite(f, k) command computes a closed form of the indefinite sum of f with respect to k.
The command uses a combination of algorithms handling various classes of summands. They include the classes of polynomials, rational functions, and hypergeometric terms and j-fold hypergeometric terms, functions for which their minimal annihilators can be constructed, for example, d'Alembertian terms. For more information, see LinearOperators.
A library extension mechanism is also used to include sums for which an algorithmic approach to finding closed forms does not yet exist. Currently the computable summands include expressions containing the harmonic function, logarithmic function, digamma and polygamma functions, and sin, cos, and the exponential functions.
If the option failpoints=true (or just failpoints for short) is specified, then the command returns a pair s,p,q, where
s is a closed form of the indefinite sum of f w.r.t. k, as above,
p is a list of intervals a1..b1,a2..b2,...,am..bm where f does not exist, and
q is a list of points ki where the computed sum s does not satisfy the telescoping equation s⁡ki+1−s⁡ki=f⁡ki or does not exist.
If such points appear in the summation interval, the discrete Newton-Leibniz formula may fail.
If the command is unable to compute one of the lists p,q, it returns s,FAIL.
An example of a rationally summable expression:
Check the telescoping equation:
A hypergeometrically summable term:
The method of accurate summation:
Sum of a logarithm of a rational function (provided the argument of the logarithm has constant sign):
Example for the library extension mechanism:
Compute the fail points:
Indeed, f is not defined for any negative integer:
Error, numeric exception: division by zero
and limits do not exist:
A rational example. f and its limit are not defined at n=0,1,5, and the correspondent sum s and its limit are not defined at n=2,3,4:
In the next example, f is hypergeometric term defined for all integers n:
The sum s is not defined at n=2:
Note that in this example, however, the limit exists:
but the telescoping equation does not hold at n=1:
Consequently, if n=1 is between summation bounds, the Newton-Leibniz formula is wrong:
Rewriting f in terms of GAMMA functions introduces additional singularities at negative integers. These singularities are removable:
The telescoping equation is valid for all integers n (in the limit):
The singularities of f1 are detected if _EnvFormal (see sum,details) is set to false:
Error, (in SumTools:-DefiniteSum:-ClosedForm) summand is singular in the interval of summation
Download Help Document
What kind of issue would you like to report? (Optional)