convert/Sum - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Conversion : convert/sum

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

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, rational, exponential, hypergeometric

makereal = value

-

indicates that a series with real coefficients should be returned; value can be true or false

differentialorder = n

-

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

dir = value

-

indicates the direction of the limit computation for initial values; value can be any of: default, left, right, real, or complex

recurrence = value

-

indicates that the output should be a recurrence for b(k) when a closed form for these coefficients, to represent expr as a Sum, cannot be computed; 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, makereal = true, differentialorder = n, dir = value, method = value, indicating one of the methods rational, exponential, hypergeometric, 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=0bkxakm+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.

• 

dir: one of default, left, right, real, or complex; direction of the limit computation for initial values. If a, the expansion point, is finite, then the default is dir = complex. If a is either infinity or -infinity, then the default is dir = real. See also limit. This optional argument can be used to request real or one-sided (e.g. asymptotic) series.

• 

makereal: either true or false (default); makereal = true (or just makereal for short) indicates that a series with real coefficients should be returned.

• 

method: one of default, Global, Local, hypergeometric, rational, or exponential. Specifies the method that will be used; the default method uses an internal selection strategy. 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 and the coefficients entering the formal power series can be computed in closed form, then the output is a recurrence for b(k).

Examples

FunctionAdvisorEi_relatedz

The 7 functions in the "Ei_related" class are:

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

(1)

mapu→u=convertu,Sum,

Chiz=_k1=0∞12z2+2_k11+_k1Γ3+2_k1+lnz+γ,Ciz=_k1=0∞121_k1z2+2_k11+_k1Γ3+2_k1+lnz+γ,Eiz=γ12ln1z+12lnz+_k1=1∞z_k1_k1_k1!,Liz=Liz,Shiz=_k1=0∞z1+2_k11+2_k1Γ2+2_k1,Siz=_k1=0∞zpochhammer12,_k114z2_k1_k1!pochhammer32,_k12,Ssiz=_k1=0∞zpochhammer12,_k114z2_k1_k1!pochhammer32,_k1212π

(2)

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

convert1,sum

Ssiz=Siz12π

(3)

Verify lhs = rhs

convert,Si

Siz12π=Siz12π

(4)

Note that some conversions are possible only under assumptions.

FunctionAdvisorsum,tan

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

tanz&equals;_k1&equals;1&infin;bernoulli2_k11_k1z2_k114_k116_k1&Gamma;1&plus;2_k1&comma;Andz<12&pi;

(5)

Therefore, the following is not converted.

converttanz&comma;Sum

tanz

(6)

The conversion occurs only when you specify the proper assumptions.

converttanz&comma;Sumassumingz<1&pi;2

_k1&equals;1&infin;bernoulli2_k11_k1z2_k114_k116_k1&Gamma;1&plus;2_k1

(7)

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

n&equals;0&infin;1nx1n&plus;1n&plus;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

ee11xx

ee:=11xx

(9)

convertee&comma;Sum

11xx

(10)

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

n&equals;0&infin;1224n&excl;16nxn2n&excl;22n&plus;1

(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&equals;powers&comma;dummy&equals;m&comma;method&equals;Local

m&equals;0&infin;12&Gamma;12&plus;mm&equals;0&infin;1mx1mm&equals;0&infin;12&Gamma;12&plus;mxm&pi;&Gamma;1&plus;mm&equals;0&infin;1mx1m&plus;1m&pi;&Gamma;1&plus;m

(12)

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

eet1xtt2

ee:=tt2tx&plus;1

(13)

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

_k1&equals;0&infin;12x&plus;12x2&plus;4_k1x2&plus;412x12x2&plus;4_k1x2&plus;4t_k1

(14)

This command also computes around t = 0

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

_k1&equals;0&infin;12x&plus;12x2&plus;4_k1x2&plus;412x12x2&plus;4_k1x2&plus;4t_k1

(15)

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

_k1&equals;0&infin;12x2&plus;4xx22x2&plus;4412x&plus;2&plus;x2&plus;4x_k1x2&plus;4x124&plus;x2&plus;4x&plus;x22x2&plus;412x&plus;2x2&plus;4x_k1x2&plus;4xt1_k1

(16)

For composite mathematical functions, first the Global approach is attempted

ee&ExponentialE;arcsinx

ee:=&ExponentialE;arcsinx

(17)

convertee&comma;Sum

_k1&equals;0&infin;j&equals;0_k14j2&plus;1x2_k14_k12&plus;12_k1&excl;&plus;j&equals;0_k12j2&plus;2j&plus;12_k1x1&plus;2_k12_k12&plus;2_k1&plus;11&plus;2_k1&excl;

(18)

The following examples illustrate the use of the method 'rational', 'exponential', 'hypergeometric'.

eeln1&plus;x21x

ee:=lnx2&plus;11x

(19)

convertee&comma;Sum&comma;method&equals;rational

_k1&equals;0&infin;I_k1I_k1II_k1&plus;II_k1x1&plus;_k1I_k1I_k11&plus;_k1

(20)

ee&ExponentialE;x2&ExponentialE;x2cos3x2&plus;&pi;3

ee:=&ExponentialE;x2&ExponentialE;12xcos123x&plus;13&pi;

(21)

convertee&comma;Sum&comma;method&equals;exponential

_k1&equals;0&infin;cos23_k1&pi;_k1&excl;&plus;3sin23_k1&pi;_k1&excl;&plus;1_k1&excl;x_k1

(22)

ee&ExponentialE;xsinx

ee:=&ExponentialE;xsinx

(23)

convertee&comma;Sum&comma;method&equals;hypergeometric

_k1&equals;0&infin;12I1&plus;I_k1_k1&excl;&plus;12I1I_k1_k1&excl;x_k1

(24)

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&comma;xga&ast;diffa&comma;xend proc

(25)

convertgx&comma;Sum

_k1&equals;0&infin;g0x_k1_k1&excl;

(26)

Indefinite integrals are handled.

ee&int;0xerftt&DifferentialD;t

ee:=&int;0xerftt&DifferentialD;t

(27)

convertee&comma;Sum&comma;expansionvariable&equals;x

_k1&equals;0&infin;21_k1x1&plus;2_k1&pi;_k1&excl;1&plus;2_k12

(28)

Linear combinations of hypergeometric functions are recognized; compare the default output with the output requesting makereal = true

ee1x2&plus;1x36arctanx&plus;1x24&plus;112lnx2&plus;1&plus;5x212&plus;14

ee:=12x&plus;16x3arctanx&plus;14x2&plus;112lnx2&plus;1&plus;512x2&plus;14

(29)

convertee&comma;Sum

_k1&equals;0&infin;12I4&plus;_k14&plus;_k13&plus;_k12&plus;_k11&plus;_k1&plus;12I4&plus;_k14&plus;_k13&plus;_k12&plus;_k11&plus;_k1x4&plus;_k1

(30)

convertee&comma;Sum&comma;makereal&equals;true

_k1&equals;0&infin;x4&plus;_k1cos12_k1&pi;4&plus;_k13&plus;_k12&plus;_k11&plus;_k1

(31)

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

ee1x4&plus;x&plus;1

ee:=1x4&plus;x&plus;1

(32)

convertee&comma;Sum&comma;method&equals;rational&comma;include&equals;powers

_k1&equals;0&infin;_&alpha;1&equals;RootOf_Z4&plus;_Z&plus;11229x_k136_&alpha;1348_&alpha;12&plus;64_&alpha;1&plus;27_&alpha;11&plus;_k1

(33)

Maple's special functions are handled.

eeAiryAix

ee:=AiryAix

(34)

convertee&comma;Sum

_k1&equals;0&infin;12&Gamma;2331&sol;6x19x3_k1&pi;_k1&excl;pochhammer43&comma;_k1&plus;1331&sol;319x3_k1&Gamma;23_k1&excl;pochhammer23&comma;_k1

(35)

In this case, convert/Sum returns without expanding

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

ee:=hypergeoma&comma;b&comma;c&comma;x

(36)

convertee&comma;Sum

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

(37)

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&equals;_k1&equals;0&infin;pochhammera&comma;_k1pochhammerb&comma;_k1x_k1_k1&excl;pochhammerc&comma;_k1&comma;Anda::nonposint&comma;ca&plus;1orAndx<1orAndx&equals;1&comma;0<&real;c&plus;a&plus;borAndx&equals;1&comma;x1&comma;&real;c&plus;a&plus;b&in;RealRangeOpen1&comma;0

(38)

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

_k1&equals;0&infin;pochhammera&comma;_k1pochhammerb&comma;_k1x_k1_k1&excl;pochhammerc&comma;_k1

(39)

eetanx

ee:=tanx

(40)

convertee&comma;Sum

tanx

(41)

FunctionAdvisorsum&comma;ee

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

tanx&equals;_k1&equals;1&infin;bernoulli2_k11_k1x2_k114_k116_k1&Gamma;1&plus;2_k1&comma;Andx<12&pi;

(42)

convertee&comma;Sumassuming1

_k1&equals;1&infin;bernoulli2_k11_k1x2_k114_k116_k1&Gamma;1&plus;2_k1

(43)

Hidden polynomials are frequently detected.

eecos4arccosx

ee:=cos4arccosx

(44)

convertee&comma;Sum

8x48x2&plus;1

(45)

Asymptotic power series can be computed.