Sum - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


convert/Sum

convert to inert sum representation - a formal power series

convert/sum

convert to sum representation

 

Calling Sequence

Parameters

Description

Optional arguments for Global conversions

Examples

References

Compatibility

Calling Sequence

convert( expr, Sum, opts, Sum_opts )

convert( expr, sum, opts, Sum_opts )

Parameters

expr

-

valid Maple expression, equation, set, list, or similar structure

opts

-

(optional) arguments as described in convert/to_special_function

Sum_opts

-

(optional) any of the following arguments intrinsic to a Sum:

expansionvariable = x

-

indicates the expansion variable - the rhs could be any name

dummy = n

-

indicates the dummy (summation) variable - the rhs could be any name

x = a

-

the lhs and rhs respectively indicate the expansion variable and expansion point

b(k)

-

a function name with an expansion variable as argument, representing the "kth coefficient" of the series expansion

method = value

-

indicates the method to be used; value can be any of: default, Local, Global, hypergeometric, holonomic, quadratic

differentialorder = n

-

indicates an upper bound for the order the intermediate differential equation used to represent expr; n can be any positive integer

recurrence = value

-

indicates that the output should be a recurrence for the series coefficients b(k) instead of a Sum; value can be true or false

Description

• 

The convert(expr, Sum) command attempts representing the given expr as a "formal power series", expressed using the inert Sum command. For that purpose, two approaches are used: one is a Global approach, which aims at representing the whole expression as a Sum of terms of the form cnxan, with a representing a constant and cn a coefficient not depending on x, the main variable; another one is Local and consists of replacing, in expr, occurrences of mathematical functions in by their Sum representations - in this case the terms summed are of the generic form cnfxn, where f(x) is a mapping of x not involving functions for which a sum representation is known. The conversion to Sum does not include computing the sums.

• 

All the optional arguments accepted by the Maple convert/to_special_function network are allowed, so that one can restrict the application of convert to Sum in different manners.

• 

The convert(expr, sum) command does the same as convert(expr, Sum) followed by an attempt to compute all the Sums introduced, and here again to override the default behavior you can use any of the optional arguments described in convert/to_special_function.

• 

By default, a combination of the Global and Local methods is used; in this approach, when possible, all mathematical functions found expr are converted, and in cases of nested mathematical functions, or linear combination of functions which admit a hypergeometric representation, a Global conversion is attempted first, taking advantage of the properties of such expressions. By invoking this conversion with the optional argument method = Global (or skip = Local), or with  method = Local (or skip = Global), respectively only the Global or the Local methods are used.

  

NOTE: The use of the following optional arguments automatically make convert/Sum to skip the Local method and only work using the Global method: x = a, differentialorder = n, method = value, indicating one of the methods hypergeometric, holonomic, quadratic, and recurrence = value. Also, powers of x are not converted unless you explicitly request that using the optional argument include = powers (all powers) or include = radicals (only fractional powers).

• 

The implementation for Global conversions is based on references [1] and [2] (see at the end), and mainly expands meromorphic expressions of certain type (see next paragraph) into their corresponding Laurent-Puiseux series as a Sum of terms of the form k=0bkxamk+sq, where m is called the symmetry number, s is the shift number, and a is the expansion point. If the expansion point is not given, then an expansion around the origin is computed; if the expansion point is at infinity, then the command searches for an asymptotic (possibly divergent) series. This implementation also works for formal Laurent-Puiseux series, and in certain cases of logarithmic singularities.

• 

The algorithm: given expr to be represented as a Sum, consists of first representing expr as a homogeneous linear differential equation with polynomial coefficients with appropriate initial conditions, an ODE-IVP (see gfun[holexprtodiffeq], PDEtools[dpolyform]), then finding a formal power series for it (see Slode[FPseries], dsolve, formal_series, dsolve, formal_solution).

• 

The types of expressions that Global conversions can handle are:

– 

expressions of hypergeometric type, where b(k+m)/b(k) is a rational function of k for some integer m

– 

expressions of exponential type, which satisfy a linear homogeneous differential equation with constant coefficients

– 

expressions of rational type, which are either rational or have a rational derivative

– 

linear combinations of hypergeometric functions are treated by the Petkovsek-van-Hoeij algorithm; see LREtools[hypergeomsols].

Optional arguments for Global conversions

• 

differentialorder: a positive integer n (default: n=4); upper bound for the order of the differential equation searched for. This controls the depth of the search for a differential equation for expr. Higher values of n will increase the chance to find the solution, but increase the running time as well.

• 

method: one of default, Global, Local, hypergeometric, holonomic, or quadratic. Specifies the method that will be used; the default method uses an internal selection strategy. method=holonomic will attempt to find a linear recurrence relation for the series coefficients, instead of a Sum, and method=quadratic will try to find a quadratic recurrence relation. See the Examples below for an illustration of the various methods.

• 

recurrence: either true or false (default). If recurrence = true (or recurrence for short) is given, then the output is a recurrence for the series coefficients b(k) instead of a sum. This is equivalent to first trying method=holonomic and then method=quadratic.

Examples

FunctionAdvisorEi_relatedz

The 7 functions in the "Ei_related" class are:

Chiz,Ciz,Eiz,Liz,Shiz,Siz,Ssiz

(1)

mapuu=convertu,Sum,

Chiz=_k1=0z2+2_k121+_k1Γ3+2_k1+lnz+γ,Ciz=_k1=0−1_k1z2+2_k121+_k1Γ3+2_k1+lnz+γ,Eiz=γln1z2+lnz2+_k1=1z_k1_k1_k1!,Liz=Liz,Shiz=_k1=0z1+2_k11+2_k1Γ2+2_k1,Siz=_k1=0zpochhammer12,_k1z24_k1_k1!pochhammer32,_k12,Ssiz=_k1=0zpochhammer12,_k1z24_k1_k1!pochhammer32,_k12π2

(2)

By default, the following command only converts Sum into sum.

convert1,sum

Ssiz=Sizπ2

(3)

Verify lhs = rhs

convert,Si

Sizπ2=Sizπ2

(4)

Note that some conversions are possible only under assumptions.

FunctionAdvisorsum,tan

* Partial match of "sum" against topic "sum_form".

tanz=_k1=1bernoulli2_k1−1_k1z1+2_k14_k116_k1Γ1+2_k1&comma;z<π2

(5)

Therefore, the following is not converted.

converttanz&comma;Sum

tanz

(6)

The conversion occurs only when you specify the proper assumptions.

converttanz&comma;Sumassumingabsz<12π

_k1=1bernoulli2_k1−1_k1z1+2_k14_k116_k1Γ1+2_k1

(7)

convertlnx&comma;Sum&comma;x=1&comma;dummy=n

n=0−1nx1n+1n+1

(8)

By default, powers, or rational expressions, are not converted to Sum unless explicitly requested, e.g. using the include = powers  (could also be include = ratpoly or include = radicals) optional argument; make the dummy summation be n

eesqrt1sqrt1xx

ee11xx

(9)

convertee&comma;Sum

11xx

(10)

convertee&comma;Sum&comma;include=powers&comma;dummy=n

n=02124n2n+14n!xn2n+1!2

(11)

The output above is computed using the Global algorithm; let's see the output representing first, Locally, each of the powers found in ee as MeijerG functions, then representing these functions as Sums

convertee&comma;Sum&comma;include=powers&comma;dummy=m&comma;method=Local

m=01+1+m=0Γ12+mxm2πΓ1+mm=0−1mx1mmΓ12+m2πΓ1+m

(12)

Expansions around t = 0 or t = 1; note the indication of the expansion variable when indicating the expansion point

eet1xtt2

eett2xt+1

(13)

convertee&comma;Sum&comma;t=0&comma;include=powers

_k1=0x2x2+421+_k1x2+x2+421+_k1t1+_k1x2+4

(14)

This command also computes around t = 0

convertee&comma;Sum&comma;expansionvariable=t&comma;include=powers

_k1=0x2x2+421+_k1x2+x2+421+_k1t1+_k1x2+4

(15)

convertee&comma;Sum&comma;t=1&comma;include=powers

_k1=0x1_k12_k1x2+4x2+x2+4_k1+x2_k12_k1x2+x2+4_k1−1_k1x1_k1x2+4x2+1+x2+42_k1+−1_k1x2_k1x2+1+x2+42_k121_k1x_k1x2+4x2+x2+4_k1+2−1_k1x_k1x2+4x2+1+x2+42_k1+42_k1x_k1x2+x2+4_k1+4−1_k1x_k1x2+1+x2+42_k1t1_k12x2+4x

(16)

For composite mathematical functions, first the Global approach is attempted

eeexparcsinx

ee&ExponentialE;arcsinx

(17)

convertee&comma;Sum

_k1=0pochhammerI2&comma;_k1pochhammerI2&comma;_k14_k1x2_k12_k1!+4_k1pochhammer12I2&comma;_k1pochhammer12+I2&comma;_k1x1+2_k11+2_k1!

(18)

User-defined functions are handled provided their derivative is known. You define the derivative of the function g as follows (see diff for more information).

`diff/g` := proc(a,x) g(a)*diff(a,x) end proc;

diff/gproca&comma;xga&ast;diffa&comma;xend proc

(19)

convertgx&comma;Sum

_k1=0g0x_k1_k1!

(20)

Indefinite integrals are handled.

eeInterftt&comma;t=0..x

ee0xerftt&DifferentialD;t

(21)

convertee&comma;Sum&comma;expansionvariable=x

_k1=02−1_k1x1+2_k11+2_k12π_k1!

(22)

Linear combinations of hypergeometric functions are recognized.

ee12x+16x3arctanx+14x2+112lnx2+1+512x2+14

ee12x+16x3arctanx+x24+112lnx2+1+5x212+14

(23)

convertee&comma;Sum

14+_k1=0−1_k1x4+2_k141+_k11+2_k12+_k13+2_k1

(24)

In the next example, the output is expressed in terms of algebraic numbers.

ee1x4+x+1

ee1x4+x+1

(25)

convertee&comma;Sum&comma;include=powers

_k1=0_&alpha;=RootOf_Z4+_Z+136_&alpha;348_&alpha;2+64_&alpha;+27_&alpha;1_k1x_k1229

(26)

Maple's special functions are handled.

eeAiryAix

eeAiryAix

(27)

convertee&comma;Sum

_k1=0x39_k1Γ23316x2πpochhammer43&comma;_k1+3133Γ23pochhammer23&comma;_k1_k1!

(28)

In this case, convert/Sum returns without expanding

eehypergeoma&comma;b&comma;c&comma;x

eehypergeoma&comma;b&comma;c&comma;x

(29)

convertee&comma;Sum

hypergeoma&comma;b&comma;c&comma;x

(30)

because a conversion exists only for restricted values of the parameters; these restrictions are seen via (see FunctionAdvisor):

FunctionAdvisorsum&comma;ee

* Partial match of "sum" against topic "sum_form".

hypergeoma&comma;b&comma;c&comma;x=_k1=0pochhammera&comma;_k1pochhammerb&comma;_k1x_k1_k1!pochhammerc&comma;_k1&comma;a::0&comma;ca+1x<1x=10<c+a+bx=1x1c+a+b−1&comma;0

(31)

convertee&comma;SumassumingAnda::nonposint&comma;ca+1

_k1=0pochhammera&comma;_k1pochhammerb&comma;_k1x_k1_k1!pochhammerc&comma;_k1

(32)

eetanx

eetanx

(33)

convertee&comma;Sum

tanx

(34)

FunctionAdvisorsum&comma;ee

* Partial match of "sum" against topic "sum_form".

tanx=_k1=1bernoulli2_k1−1_k1x1+2_k14_k116_k1Γ1+2_k1&comma;x<π2

(35)

convertee&comma;Sumassuming1

_k1=1bernoulli2_k1−1_k1x1+2_k14_k116_k1Γ1+2_k1

(36)

Hidden polynomials are frequently detected.

eecos4arccosx

eecos4arccosx

(37)

convertee&comma;Sum

8x48x2+1

(38)

Asymptotic power series can be computed.

eeexpx21erfx

ee&ExponentialE;x21erfx

(39)

convertee&comma;Sum&comma;x=

_k1=0−1_k12_k1!4_k11x1+2_k1π_k1!

(40)

eesin1x

eesin1x

(41)

convertee&comma;Sum&comma;x=

_k1=0−1_k11x1+2_k11+2_k1!

(42)

An example where a the command fails to compute a closed form for the coefficients in the formal power series and so it returns, under request, the recurrence equation for these coefficients.

eearcsinx3

eearcsinx3

(43)

convertee&comma;Sum

arcsinx3

(44)

convertee&comma;Sum&comma;bk&comma;recurrence

k=0bkxk+1&wherebk=RESolk4+4k3+6k2+4k+1bk+2k418k362k298k60bk+2+k4+14k3+71k2+154k+120bk+4=0&comma;bk&comma;b0=0&comma;b1=0&comma;b2=1&comma;b3=0&comma;INFO

(45)

Note however that in this case a conversion exists for the appropriate conditions on the function parameters:

FunctionAdvisorsum&comma;arcsinx

* Partial match of "sum" against topic "sum_form".

arcsinx=_k1=0I1Ixx2+11+_k11+_k1&comma;1+Ix+x2+1<1

(46)

convertee&comma;Sumassuming1

_k1=0I1Ixx2+11+_k11+_k13

(47)

Examples for method=holonomic and method=quadratic.

convertarcsinz2&comma;Sum

arcsinz2

(48)

convertarcsinz2&comma;Sum&comma;dummy=n&comma;method=hypergeometric

n=02n!24nz2n+22n+2!

(49)

convertarcsinz2&comma;Sum&comma;Bn&comma;method=holonomic

n=0Bnzn+1&whereBn=RESoln22n1Bn+n2+5n+6Bn+2=0&comma;Bn&comma;B0=0&comma;B1=1&comma;INFO

(50)

convertarcsinz2&comma;Sum&comma;Bn&comma;recurrence

n=0Bnzn+1&whereBn=RESoln22n1Bn+n2+5n+6Bn+2=0&comma;Bn&comma;B0=0&comma;B1=1&comma;INFO

(51)

In the next example, only a quadratic recurrence equation exists, but not a holonomic one.

convertzexpz1&comma;Sum&comma;method=hypergeometric

z&ExponentialE;z1

(52)

convertzexpz1&comma;Sum&comma;method=holonomic

z&ExponentialE;z1

(53)

convertzexpz1&comma;Sum&comma;method=quadratic

_k1=0A_k1z_k1&whereA_k1=RESolA3+_k1+A2+_k1+_k=12+_k1A_kA3+_k1_k4+_k1&comma;A_k1&comma;A0=1&comma;A1=12&comma;A2=112&comma;INFO

(54)

convertzexpz1&comma;Sum&comma;recurrence

_k1=0A_k1z_k1&whereA_k1=RESolA3+_k1+A2+_k1+_k=12+_k1A_kA3+_k1_k4+_k1&comma;A_k1&comma;A0=1&comma;A1=12&comma;A2=112&comma;INFO

(55)

References

  

[1] Wolfram Koepf, Power series in computer algebra. Journal of Symbolic Computation 13, 1992, 581-603

  

[2] Dominik Gruntz, Wolfram Koepf: Maple package on formal power series. Maple Technical Newsletter 2 (2), 1995, 22-28

Compatibility

• 

The convert/Sum command was updated in Maple 2022.

See Also

assuming

convert

convert/FormalPowerSeries

convert/to_special_function

dsolve/formal_series

dsolve/formal_solution

FunctionAdvisor

gfun[holexprtodiffeq]

map

Slode[FPseries]

Sum

sum