SumTools[IndefiniteSum] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Summation and Difference Equations : SumTools : IndefiniteSum Subpackage : SumTools/IndefiniteSum/Indefinite

SumTools[IndefiniteSum]

  

Indefinite

  

compute closed forms of indefinite sums

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Indefinite(f, k, opt)

Parameters

f

-

expression depending on k

k

-

name

opt

-

(optional) equation of the form failpoints=true or failpoints=false

Description

• 

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 ski+1ski=fki 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.

Examples

withSumToolsIndefiniteSum:

An example of a rationally summable expression:

f1n2+sqrt5n1

f1n2+5n1

(1)

sIndefinitef,n

s13n32+5213n12+5213n+12+52

(2)

Check the telescoping equation:

evalaNormalevals,n=n+1s,expanded

1n2+5n1

(3)

A hypergeometrically summable term:

f22n1n2n+1binomial2n,n

f22n1n2n+12nn

(4)

sIndefinitef,n

s22n12nnn

(5)

normalexpandevals,n=n+1s

2n22n2n+12nn

(6)

The method of accurate summation:

f1512+12512n1212512n2

f12+52n1252n25

(7)

Indefinitef,n

312+52n1252n21012+52n+11252n+1210+12+52n+21252n+2210

(8)

Sum of a logarithm of a rational function (provided the argument of the logarithm has constant sign):

sumln2n+1,nassuming0n

nln2+lnΓ12+n

(9)

sumln2n+1,nassumingn1

nln2lnΓ12n+Iπn

(10)

Example for the library extension mechanism:

fsinncosn+1Ψn

fsinncosn+1Ψn

(11)

Indefinitef,n

sin12n+2Ψn+1nsin1+cosn22γsin12Ψnsin12sin1n2sin1

(12)

Compute the fail points:

fnn!

fnn!

(13)

Indefinitef,n,failpoints

n!,..−1,

(14)

Indeed, f is not defined for any negative integer:

evalf,n=3

Error, numeric exception: division by zero

and limits do not exist:

limitf,n=3

undefined

(15)

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:

f1n+1n12n5

f1n+1n12n5

(16)

s,fpIndefinitef,n,failpoints

s,fp2n5+2n4+2n3+2n2+1n1,0..1,5..5,2,3,4

(17)

limits,n=2

undefined

(18)

In the next example, f is hypergeometric term defined for all integers n:

fbinomial2n3,n4n

f2n3n4n

(19)

s,fpIndefinitef,n,failpoints

s,fp2nn+12n3nn24n,,2

(20)

The sum s is not defined at n=2:

evals,n=2

Error, numeric exception: division by zero

Note that in this example, however, the limit exists:

limits,n=2

38

(21)

but the telescoping equation does not hold at n=1:

limits,n=2evals,n=1=evalf,n=1

58=14

(22)

Consequently, if n=1 is between summation bounds, the Newton-Leibniz formula is wrong:

sumf,n=0..10=evals,n=11evals,n=0

236871262144=138567262144

(23)

Rewriting f in terms of GAMMA functions introduces additional singularities at negative integers. These singularities are removable:

f1convertf,Γ

f1Γ2n2Γn+1Γn24n

(24)

s,fpIndefinitef1,n,failpoints

s,fp2nn+1Γ2n2n2Γn+1Γn24n,,

(25)

The telescoping equation is valid for all integers n (in the limit):

sumf1,n=0..10=evals,n=11limits,n=0

138567262144=138567262144

(26)

The singularities of f1 are detected if _EnvFormal (see sum,details) is set to false:

_EnvFormalfalse:

s,fpIndefinitef1,n,failpoints

s,fp2nn+1Γ2n2n2Γn+1Γn24n,..2,

(27)

sumf1,n=0..10

Error, (in SumTools:-DefiniteSum:-ClosedForm) summand is singular in the interval of summation

_EnvFormal_EnvFormal:

See Also

SumTools[DefiniteSummation]

SumTools[IndefiniteSum]

SumTools[IndefiniteSum][Hypergeometric]

SumTools[Summation]