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
convert( expr, Sum, opts, Sum_opts )
convert( expr, sum, opts, Sum_opts )
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
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 cn⁢x−an, 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 cn⁢f⁡xn, 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=0∞⁡b⁡k⁢x−am⁢k+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].
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.
FunctionAdvisor⁡Ei_related⁡z
The 7 functions in the "Ei_related" class are:
Chi⁡z,Ci⁡z,Ei⁡z,Li⁡z,Shi⁡z,Si⁡z,Ssi⁡z
map⁡u↦u=convert⁡u,Sum,
Chi⁡z=∑_k1=0∞⁡z2+2⁢_k12⁢1+_k1⁢Γ⁡3+2⁢_k1+ln⁡z+γ,Ci⁡z=∑_k1=0∞⁡−−1_k1⁢z2+2⁢_k12⁢1+_k1⁢Γ⁡3+2⁢_k1+ln⁡z+γ,Ei⁡z=γ−ln⁡1z2+ln⁡z2+∑_k1=1∞⁡z_k1_k1⁢_k1!,Li⁡z=Li⁡z,Shi⁡z=∑_k1=0∞⁡z1+2⁢_k11+2⁢_k1⁢Γ⁡2+2⁢_k1,Si⁡z=∑_k1=0∞⁡z⁢pochhammer⁡12,_k1⁢−z24_k1_k1!⁢pochhammer⁡32,_k12,Ssi⁡z=∑_k1=0∞⁡z⁢pochhammer⁡12,_k1⁢−z24_k1_k1!⁢pochhammer⁡32,_k12−π2
By default, the following command only converts Sum into sum.
convert⁡−1,sum
Ssi⁡z=Si⁡z−π2
Verify lhs = rhs
convert⁡,Si
Si⁡z−π2=Si⁡z−π2
Note that some conversions are possible only under assumptions.
FunctionAdvisor⁡sum,tan
* Partial match of "sum" against topic "sum_form".
tan⁡z=∑_k1=1∞⁡bernoulli⁡2⁢_k1⁢−1_k1⁢z−1+2⁢_k1⁢4_k1−16_k1Γ⁡1+2⁢_k1,z<π2
Therefore, the following is not converted.
convert⁡tan⁡z,Sum
tan⁡z
The conversion occurs only when you specify the proper assumptions.
convert⁡tan⁡z,Sumassumingabs⁡z<12⁢π
∑_k1=1∞⁡bernoulli⁡2⁢_k1⁢−1_k1⁢z−1+2⁢_k1⁢4_k1−16_k1Γ⁡1+2⁢_k1
convert⁡ln⁡x,Sum,x=1,dummy=n
∑n=0∞⁡−1n⁢x−1n+1n+1
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
ee≔sqrt⁡1−sqrt⁡1−xx
ee≔1−1−xx
convert⁡ee,Sum
1−1−xx
convert⁡ee,Sum,include=powers,dummy=n
∑n=0∞⁡2−12−4⁢n⁢2⁢n+1⁢4⁢n!⁢xn2⁢n+1!2
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
convert⁡ee,Sum,include=powers,dummy=m,method=Local
∑m=0∞⁡−1+−1+∑m=0∞⁡−Γ⁡−12+m⁢xm2⁢π⁢Γ⁡1+m⁢∑m=0∞⁡−1m⁢x−1mm⁢Γ⁡−12+m2⁢π⁢Γ⁡1+m
Expansions around t = 0 or t = 1; note the indication of the expansion variable when indicating the expansion point
ee≔t1−x⁢t−t2
ee≔t−t2−x⁢t+1
convert⁡ee,Sum,t=0,include=powers
∑_k1=0∞⁡−x2−x2+421+_k1−x2+x2+421+_k1⁢t1+_k1x2+4
This command also computes around t = 0
convert⁡ee,Sum,expansionvariable=t,include=powers
convert⁡ee,Sum,t=1,include=powers
∑_k1=0∞⁡−x1−_k1⁢2−_k1⁢x2+4⁢−x−2+x2+4_k1+x2−_k1⁢2−_k1⁢−x−2+x2+4_k1−−1_k1⁢x1−_k1⁢x2+4⁢x2+1+x2+42_k1+−1_k1⁢x2−_k1⁢x2+1+x2+42_k1−21−_k1⁢x−_k1⁢x2+4⁢−x−2+x2+4_k1+2⁢−1_k1⁢x−_k1⁢x2+4⁢x2+1+x2+42_k1+4⁢2−_k1⁢x−_k1⁢−x−2+x2+4_k1+4⁢−1_k1⁢x−_k1⁢x2+1+x2+42_k1⁢t−1_k12⁢x2+4⁢x
For composite mathematical functions, first the Global approach is attempted
ee≔exp⁡arcsin⁡x
ee≔ⅇarcsin⁡x
∑_k1=0∞⁡pochhammer⁡−I2,_k1⁢pochhammer⁡I2,_k1⁢4_k1⁢x2⁢_k12⁢_k1!+4_k1⁢pochhammer⁡12−I2,_k1⁢pochhammer⁡12+I2,_k1⁢x1+2⁢_k11+2⁢_k1!
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/g ≔ proca,xg⁡a*diff⁡a,xend proc
convert⁡g⁡x,Sum
∑_k1=0∞⁡g⁡0⁢x_k1_k1!
Indefinite integrals are handled.
ee≔Int⁡erf⁡tt,t=0..x
ee≔∫0xerf⁡ttⅆt
convert⁡ee,Sum,expansionvariable=x
∑_k1=0∞⁡2⁢−1_k1⁢x1+2⁢_k11+2⁢_k12⁢π⁢_k1!
Linear combinations of hypergeometric functions are recognized.
ee≔−12⁢x+16⁢x3⁢arctan⁡x+−14⁢x2+112⁢ln⁡x2+1+512⁢x2+14
ee≔−12⁢x+16⁢x3⁢arctan⁡x+−x24+112⁢ln⁡x2+1+5⁢x212+14
14+∑_k1=0∞⁡−1_k1⁢x4+2⁢_k14⁢1+_k1⁢1+2⁢_k1⁢2+_k1⁢3+2⁢_k1
In the next example, the output is expressed in terms of algebraic numbers.
ee≔1x4+x+1
convert⁡ee,Sum,include=powers
∑_k1=0∞⁡∑_α=RootOf⁡_Z4+_Z+1⁡36⁢_α3−48⁢_α2+64⁢_α+27⁢_α−1−_k1⁢x_k1229
Maple's special functions are handled.
ee≔AiryAi⁡x
∑_k1=0∞⁡x39_k1⁢−Γ⁡23⁢316⁢x2⁢π⁢pochhammer⁡43,_k1+3133⁢Γ⁡23⁢pochhammer⁡23,_k1_k1!
In this case, convert/Sum returns without expanding
ee≔hypergeom⁡a,b,c,x
hypergeom⁡a,b,c,x
because a conversion exists only for restricted values of the parameters; these restrictions are seen via (see FunctionAdvisor):
FunctionAdvisor⁡sum,ee
hypergeom⁡a,b,c,x=∑_k1=0∞⁡pochhammer⁡a,_k1⁢pochhammer⁡b,_k1⁢x_k1_k1!⁢pochhammer⁡c,_k1,a::ℤ0,−∧c≠a+1∨x<1∨x=1∧0<−ℜ⁡−c+a+b∨x=1∧x≠1∧−ℜ⁡−c+a+b∈−1,0
convert⁡ee,SumassumingAnd⁡a::nonposint,c≠a+1
∑_k1=0∞⁡pochhammer⁡a,_k1⁢pochhammer⁡b,_k1⁢x_k1_k1!⁢pochhammer⁡c,_k1
ee≔tan⁡x
tan⁡x
tan⁡x=∑_k1=1∞⁡bernoulli⁡2⁢_k1⁢−1_k1⁢x−1+2⁢_k1⁢4_k1−16_k1Γ⁡1+2⁢_k1,x<π2
convert⁡ee,Sumassuming−1
∑_k1=1∞⁡bernoulli⁡2⁢_k1⁢−1_k1⁢x−1+2⁢_k1⁢4_k1−16_k1Γ⁡1+2⁢_k1
Hidden polynomials are frequently detected.
ee≔cos⁡4⁢arccos⁡x
8⁢x4−8⁢x2+1
Asymptotic power series can be computed.
ee≔exp⁡x2⁢1−erf⁡x
ee≔ⅇx2⁢1−erf⁡x
convert⁡ee,Sum,x=∞
∑_k1=0∞⁡−1_k1⁢2⁢_k1!⁢4−_k1⁢1x1+2⁢_k1π⁢_k1!
ee≔sin⁡1x
∑_k1=0∞⁡−1_k1⁢1x1+2⁢_k11+2⁢_k1!
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.
ee≔arcsin⁡x3
arcsin⁡x3
convert⁡ee,Sum,b⁡k,recurrence
∑k=0∞⁡b⁡k⁢xk+1&whereb⁡k=RESol⁡k4+4⁢k3+6⁢k2+4⁢k+1⁢b⁡k+−2⁢k4−18⁢k3−62⁢k2−98⁢k−60⁢b⁡k+2+k4+14⁢k3+71⁢k2+154⁢k+120⁢b⁡k+4=0,b⁡k,b⁡0=0,b⁡1=0,b⁡2=1,b⁡3=0,INFO
Note however that in this case a conversion exists for the appropriate conditions on the function parameters:
FunctionAdvisor⁡sum,arcsin⁡x
arcsin⁡x=∑_k1=0∞⁡I⁢1−I⁢x−−x2+11+_k11+_k1,−1+I⁢x+−x2+1<1
∑_k1=0∞⁡I⁢1−I⁢x−−x2+11+_k11+_k13
Examples for method=holonomic and method=quadratic.
convert⁡arcsin⁡z2,Sum
arcsin⁡z2
convert⁡arcsin⁡z2,Sum,dummy=n,method=hypergeometric
∑n=0∞⁡2⁢n!2⁢4n⁢z2⁢n+22⁢n+2!
convert⁡arcsin⁡z2,Sum,B⁡n,method=holonomic
∑n=0∞⁡B⁡n⁢zn+1&whereB⁡n=RESol⁡−n2−2⁢n−1⁢B⁡n+n2+5⁢n+6⁢B⁡n+2=0,B⁡n,B⁡0=0,B⁡1=1,INFO
convert⁡arcsin⁡z2,Sum,B⁡n,recurrence
In the next example, only a quadratic recurrence equation exists, but not a holonomic one.
convert⁡zexp⁡z−1,Sum,method=hypergeometric
zⅇz−1
convert⁡zexp⁡z−1,Sum,method=holonomic
convert⁡zexp⁡z−1,Sum,method=quadratic
∑_k1=0∞⁡A⁡_k1⁢z_k1&whereA⁡_k1=RESol⁡A⁡3+_k1+A⁡2+_k1+∑_k=12+_k1⁡A⁡_k⁢A⁡3+_k1−_k4+_k1,A⁡_k1,A⁡0=1,A⁡1=−12,A⁡2=112,INFO
convert⁡zexp⁡z−1,Sum,recurrence
[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
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
Download Help Document