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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Information : Updates : Maple 2017 : Mathematical Functions

Mathematical Functions

Relevant developments in the MathematicalFunctions project happened for Maple 2017, regarding both the addition of the four Appell functions, representing the first ever full implementation of these functions in computational environments, as well as the addition of a new package, Evalf, for performing numerical experimentation taking advantage of sophisticated symbolic computation functionality. The Evalf package and project aims to provide a user-friendly environment to develop and work with numerical algorithms for mathematical functions.

 

The Four Appell Functions

The Evalf Package

The Four Appell Functions

The four multi-parameter Appell functions, AppellF1, AppellF2, AppellF3 and AppellF4 are doubly hypergeometric functions that include as particular cases the 2F1 hypergeometric and some cases of the MeijerG function, and with them most of the known functions of mathematical physics. These Appell functions have been popping up with increasing frequency in applications in quantum mechanics, molecular physics, and general relativity.

As in the case of the hypergeometric function, a distinction is made between the four Appell series, with restricted domain of convergence, and the four Appell functions, that coincide with the series in their domain of convergence but also extend them analytically to the whole complex plane. The Maple implementation of the Appell functions includes a thorough set of their symbolic properties, all accessible using the FunctionAdvisor, as well as numerical algorithms to evaluate the four functions over the whole complex plane, representing the first ever complete computational implementation of these functions.

To display special functions and sequences using textbook notation as shown in this page, use extended typesetting and enable the typesetting of mathematical functions

interfacetypesetting = extended: Typesetting:-EnableTypesetRuleTypesetting:-SpecialFunctionRules:

Examples

  

The definition of the four Appell series and the corresponding domains of convergence can be seen through the FunctionAdvisor. For example,

FunctionAdvisordefinition,AppellF1

F1a&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=_k1=0_k2=0a_k1+_k2b__1_k1b__2_k2z__1_k1z__2_k2c_k1+_k2_k1!_k2!&comma;z__1<1z__2<1

(1.1.1)

FunctionAdvisordefinition&comma; AppellF2&semi;

F2a&comma;b__1&comma;b__2&comma;c__1&comma;c__2&comma;z__1&comma;z__2=_k1=0_k2=0a_k1+_k2b__1_k1b__2_k2z__1_k1z__2_k2c__1_k1c__2_k2_k1!_k2!&comma;z__1+z__2<1

(1.1.2)

FunctionAdvisordefinition&comma; AppellF3&semi;

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=_k1=0_k2=0a__1_k1a__2_k2b__1_k1b__2_k2z__1_k1z__2_k2c_k1+_k2_k1!_k2!&comma;z__1<1z__2<1

(1.1.3)

FunctionAdvisordefinition&comma; AppellF4&semi;

F4a&comma;b&comma;c__1&comma;c__2&comma;z__1&comma;z__2=_k1=0_k2=0a_k1+_k2b_k1+_k2z__1_k1z__2_k2c__1_k1c__2_k2_k1!_k2!&comma;z__1+z__2<1

(1.1.4)
  

From these definitions, these series and the corresponding analytic extensions (Appell functions) are singular (division by zero) when the c parameters entering the pochhammer functions in the denominators of these series are non-positive integers. For an analogous reason, when the a and/or b parameters entering the pochhammer functions in the numerators of the series are non-positive integers, the series will truncate and the Appell functions will be polynomial. Consult the FunctionAdvisor for comprehensive information on the combinations of all these conditions. For example, for AppellF1, the singular cases happen when any of the following conditions hold

FunctionAdvisorsingularities&comma;AppellF1

F1a&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2&comma;c::0&comma;a::0&comma;b__1::¬0&comma;a<cc::0&comma;a::0&comma;b__2::¬0&comma;a<cc::0&comma;a::0&comma;b__1::0&comma;b__2::0&comma;a<cb__1+b__2<cc::0&comma;a::¬0&comma;b__1::¬0&comma;c::0&comma;a::¬0&comma;b__2::¬0&comma;c::0&comma;a::¬0&comma;b__1::0&comma;b__2::0&comma;b__1+b__2<c

(1.1.5)
  

 

  

By requesting the sum form of the Appell functions, besides their double power series definition, we also see the particular form the four series take when one of the summations is performed and the result expressed in terms of 2F1 hypergeometric functions. For example, for AppellF3,

FunctionAdvisorsum_form&comma;AppellF3

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=m=0n=0a__1ma__2nb__1mb__2nz__1mz__2ncm+nm!n!&comma;z__1<1z__2<1,F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=k=0a__1kb__1kF12a__2,b__2;c+k;z__2z__1kckk!&comma;z__1<1,F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=k=0a__2kb__2kF12a__1,b__1;c+k;z__1z__2kckk!&comma;z__2<1

(1.1.6)
  

So, for AppellF3 (and also for AppellF1, but not for AppellF2 nor AppellF4) the domain of convergence of the single sum with hypergeometric coefficients is larger than the domain of convergence of the double series, because the hypergeometric coefficient in the single sum - say the one in z2 - analytically extends the series with regards to the other variable - say z1 - entering the hypergeometric coefficient.

  

In the literature, the Appell series are analytically extended by integral representations in terms of Eulerian double integrals. With the exception of AppellF4, one of the two iterated integrals can always be computed resulting in a single integral with hypergeometric integrand. For example, for AppellF2

FunctionAdvisorintegral_form&comma; AppellF2&semi;

F2a&comma;b__1&comma;b__2&comma;c__1&comma;c__2&comma;z__1&comma;z__2=Γc__101ub__11F12a,b__2;c__2;z__2uz__111uc__1+b__1+1uz__1+1a&DifferentialD;uΓb__1Γc__1b__1&comma;z__110<b__10<c__1+b__1,F2a&comma;b__1&comma;b__2&comma;c__1&comma;c__2&comma;z__1&comma;z__2=Γc__201ub__21F12a,b__1;c__1;z__1uz__211u1+b__2c__2uz__2+1a&DifferentialD;uΓb__2Γc__2b__2&comma;z__210<b__20<c__2+b__2,F2a&comma;b__1&comma;b__2&comma;c__1&comma;c__2&comma;z__1&comma;z__2=Γc__1Γc__20101ub__11vb__211uc__1+b__1+11v1+b__2c__2uz__1vz__2+1a&DifferentialD;u&DifferentialD;vΓb__1Γb__2Γc__1b__1Γc__2b__2&comma;0<b__10<b__20<c__1+b__10<c__2+b__2,F2a&comma;b__1&comma;b__2&comma;c__1&comma;c__2&comma;z__1&comma;z__2=0ua1F11b__1;c__1;uz__1F11b__2;c__2;uz__2&ExponentialE;u&DifferentialD;uΓa&comma;z__1+z__2<10<a

(1.1.7)
  

For the purpose of numerically evaluating the four Appell functions over the whole complex plane, instead of numerically evaluating the integral representations, it is simpler, when possible, to evaluate the function using identities. For example, with the exception of AppellF3, the Appell functions admit identities analogous to Euler identities for the hypergeometric function. These Euler-type identities, as well as contiguity identities for the four Appell functions, are visible using the FunctionAdvisor with the option identities, or directly from the function. For AppellF4, for instance, provided that none of a, b, ab, c2a is a non-positive integer,

F4a&comma;b&comma;c__1&comma;c__2&comma;z__1&comma;z__2=AppellF4:-TransformationsEuler1a&comma;b&comma;c__1&comma;c__2&comma;z__1&comma;z__2

F4a&comma;b&comma;c__1&comma;c__2&comma;z__1&comma;z__2=Γc__2Γbaz__2aF4a&comma;ac__2+1&comma;ab+1&comma;c__1&comma;1z__2&comma;z__1z__2Γc__2aΓb+Γc__2Γabz__2bF4b&comma;1+bc__2&comma;ba+1&comma;c__1&comma;1z__2&comma;z__1z__2Γc__2bΓa

(1.1.8)
  

and this identity can be used to evaluate AppellF4 at z1&equals;1 over the whole complex plane since, in that case, the two variables of the Appell Functions on right-hand side become equal, and that is a special case of AppellF4, expressible in terms of hypergeometric 4F3 functions

z__1=1|z__1=1

F4a&comma;b&comma;c__1&comma;c__2&comma;1&comma;z__2=Γc__2Γbaz__2aF34a,ac__2+1,a2b2+c__12,a2b2+12+c__12;c__1,ab+1,ab+c__1;4z__2Γc__2aΓb+Γc__2Γabz__2bF34b,1+bc__2,b2a2+c__12,b2a2+12+c__12;c__1,ba+1,ba+c__1;4z__2Γc__2bΓa

(1.1.9)

A plot of the AppellF2 function for some values of its parameters

F2  AppellF2expIz&comma;12I&comma;37I4&comma;4&comma;57&plus;6I&comma;6&comma;z

F2F2&ExponentialE;Iz&comma;I2&comma;37I4&comma;4&comma;57+6I&comma;6&comma;z

(1.1.10)

plotRe&comma;ImF2&comma;z&equals;1..1

  

A thorough set with the main symbolic properties of any of the four Appell functions, for instance for AppellF3, can be seen via

FunctionAdvisorAppellF3

AppellF3

describe

AppellF3=Appell 2-variable hypergeometric function F3

definition

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=_k1=0_k2=0a__1_k1a__2_k2b__1_k1b__2_k2z__1_k1z__2_k2c_k1+_k2_k1!_k2!

z__1<1z__2<1

classify function

Appell

symmetries

F3a__2&comma;a__1&comma;b__2&comma;b__1&comma;c&comma;z__2&comma;z__1=F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2

F3b__1&comma;a__2&comma;a__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2

F3a__1&comma;b__2&comma;b__1&comma;a__2&comma;c&comma;z__1&comma;z__2=F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2

plot

singularities

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2

c::0&comma;a__1::¬0&comma;b__1::¬0&comma;c::0&comma;a__2::¬0&comma;b__2::¬0&comma;c::0&comma;a__1::¬0&comma;a__2::0&comma;b__1::0&comma;b__2::¬0&comma;a__2+b__1<cc::0&comma;a__1::¬0&comma;a__2::¬0&comma;b__1::0&comma;b__2::0&comma;b__1+b__2<cc::0&comma;a__1::¬0&comma;a__2::0&comma;b__1::0&comma;b__2::0&comma;a__2+b__1<cb__1+b__2<cc::0&comma;a__1::0&comma;a__2::0&comma;b__1::¬0&comma;b__2::¬0&comma;a__1+a__2<cc::0&comma;a__1::0&comma;a__2::¬0&comma;b__1::¬0&comma;b__2::0&comma;a__1+b__2<cc::0&comma;a__1::0&comma;a__2::0&comma;b__1::¬0&comma;b__2::0&comma;a__1+a__2<ca__1+b__2<cc::0&comma;a__1::0&comma;a__2::0&comma;b__1::0&comma;b__2::0&comma;a__1+a__2<ca__1+b__2<ca__2+b__1<cb__1+b__2<cc::0&comma;a__1::0&comma;a__2::¬0&comma;b__1::0&comma;b__2::0&comma;a__1+b__2<cb__1+b__2<cc::0&comma;a__1::0&comma;a__2::0&comma;b__1::0&comma;b__2::¬0&comma;a__1+a__2<ca__2+b__1<c

branch points

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2

a__1::¬0&comma;b__1::¬0&comma;z__11&comma;+Ia__2::¬0&comma;b__2::¬0&comma;z__21&comma;+I

branch cuts

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2

a__1::¬0&comma;b__1::¬0&comma;1<z__1a__2::¬0&comma;b__2::¬0&comma;1<z__2

special values

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1

z__1=0z__2=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1

a__1=0a__2=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1

a__1=0b__2=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1

a__2=0b__1=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1

b__1=0b__2=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F12a__2,b__2;c;z__2

z__1=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F12a__1,b__1;c;z__1

z__2=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F12a__1,b__1;c;1F23a__2,b__2,ca__1b__1;cb__1,ca__1;z__2

z__1=1

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F12a__2,b__2;c;1F23a__1,b__1,ca__2b__2;ca__2,cb__2;z__1

z__2=1

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F12a__2,b__2;c;z__2

a__1=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F12a__1,b__1;c;z__1

a__2=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F12a__2,b__2;c;z__2

b__1=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F12a__1,b__1;c;z__1

b__2=0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__1F121,a__1;a__1+a__2;z__1+z__2F121,a__2;a__1+a__2;z__2z__1z__2+z__1+z__2

b__1=1b__2=1c=a__1+a__2z__1z__2+z__1+z__20

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__1F121,b__1;a__2+b__1;z__1+z__2F121,a__2;a__2+b__1;z__2z__1z__2+z__1+z__2

a__1=1b__2=1c=a__2+b__1z__1z__2+z__1+z__20

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__1F121,a__1;a__1+b__2;z__1+z__2F121,b__2;a__1+b__2;z__2z__1z__2+z__1+z__2

b__1=1a__2=1c=a__1+b__2z__1z__2+z__1+z__20

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1z__1b__2F12a__1+b__2,b__1+b__2;a__1+a__2+b__1+b__2;z__1

c=a__1+a__2+b__1+b__2z__11z__2=z__11+z__1

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1z__1b__2F12a__1+b__2,b__1+b__2;a__1+a__2+b__1+b__2;z__1

c=a__1+a__2+b__1+b__2z__21z__1=z__21+z__2

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1z__1c112z__11a__2F12c2+a__12a__22,c2a__12a__22+12;c;4z__11z__1

z__2=z__12z__112z__11z__11b__1=1a__1b__2=1a__2

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1z__1c112z__11a__2F12c2+a__12a__22,c2a__12a__22+12;c;4z__11z__1

z__1=z__22z__212z__21z__21b__1=1a__1b__2=1a__2

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1z__1c112z__11a__2F12c2+a__12a__22,c2a__12a__22+12;c;4z__11z__1

z__2=z__12z__112z__11z__11a__1=1b__1b__2=1a__2

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=1z__1c112z__11a__2F12c2+a__12a__22,c2a__12a__22+12;c;4z__11z__1

z__2=z__12z__112z__11z__11b__1=1a__1a__2=1b__2

identities

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F3a__1&comma;a__2&comma;b__1&comma;b__2+n&comma;c&comma;z__1&comma;z__2k=1nnka__2kz__2kF3a__1&comma;b__2+k&comma;b__1&comma;k+a__2&comma;k+c&comma;z__1&comma;z__2ck

z__21c::¬0&comma;a__2::0&comma;c<a__2nc

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F3b__1&comma;a__2&comma;a__1+n&comma;b__2&comma;c&comma;z__1&comma;z__2k=1nnkb__1kz__1kF3a__1+k&comma;a__2&comma;k+b__1&comma;b__2&comma;k+c&comma;z__1&comma;z__2ck

z__11c::¬0&comma;b__1::0&comma;c<b__1nc

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=a__1nF3b__1&comma;a__2&comma;a__1+n&comma;b__2&comma;c&comma;z__1&comma;z__2a__1b__1nk=1nnkb__1k−1kF3a__1&comma;a__2&comma;k+b__1&comma;b__2&comma;c&comma;z__1&comma;z__2b__1a__1n+1k

z__11a__1b__1::¬0&comma;na__1b__1b__1a__1n+1::¬0&comma;b__1::0&comma;b__1a__1n+1<b__1nb__1+a__1+n1

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F3b__1&comma;a__2&comma;a__1+n&comma;b__2&comma;c&comma;z__1&comma;z__2b__1z__1k=1nF3a__1+k&comma;a__2&comma;b__1+1&comma;b__2&comma;c+1&comma;z__1&comma;z__2c

z__11c0

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;cn&comma;z__1&comma;z__2a__1b__1z__1k=1nF3a__1+1&comma;a__2&comma;b__1+1&comma;b__2&comma;c+2k&comma;z__1&comma;z__2ckck+1a__2b__2z__2k=1nF3a__1&comma;a__2+1&comma;b__1&comma;b__2+1&comma;c+2k&comma;z__1&comma;z__2ckck+1

z__11z__21c::¬+

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F1a__2&comma;b__2&comma;b__1&comma;c&comma;z__2&comma;z__11+z__11z__1b__1

c=a__1+a__2z__11

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F1a__2&comma;b__2&comma;a__1&comma;c&comma;z__2&comma;z__11+z__11z__1a__1

c=b__1+a__2z__11

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F1b__2&comma;a__2&comma;b__1&comma;c&comma;z__2&comma;z__11+z__11z__1b__1

c=a__1+b__2z__11

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F1b__2&comma;a__2&comma;a__1&comma;c&comma;z__2&comma;z__11+z__11z__1a__1

c=b__1+b__2z__11

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F1a__1&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2z__21z__2+1b__2

c=a__1+a__2z__21

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F1b__1&comma;a__1&comma;b__2&comma;c&comma;z__1&comma;z__2z__21z__2+1b__2

c=b__1+a__2z__21

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F1a__1&comma;b__1&comma;a__2&comma;c&comma;z__1&comma;z__2z__21z__2+1a__2

c=a__1+b__2z__21

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F1b__1&comma;a__1&comma;a__2&comma;c&comma;z__1&comma;z__2z__21z__2+1a__2

c=b__1+b__2z__21

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__21+z__1z__1b__1F2b__1+b__2&comma;a__2&comma;b__1&comma;c&comma;b__1+b__2&comma;z__2&comma;1z__21+z__1z__11z__1b__1

c=a__1+a__2z__11

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__21+z__1z__1a__1F2a__1+b__2&comma;a__2&comma;a__1&comma;c&comma;a__1+b__2&comma;z__2&comma;1z__21+z__1z__11z__1a__1

c=b__1+a__2z__11

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__21+z__1z__1b__1F2b__1+a__2&comma;b__2&comma;b__1&comma;c&comma;b__1+a__2&comma;z__2&comma;1z__21+z__1z__11z__1b__1

c=a__1+b__2z__11

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__21+z__1z__1a__1F2a__1+a__2&comma;b__2&comma;a__1&comma;c&comma;a__1+a__2&comma;z__2&comma;1z__21+z__1z__11z__1a__1

c=b__1+b__2z__11

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__1z__21z__2b__2F2b__1+b__2&comma;a__1&comma;b__2&comma;c&comma;b__1+b__2&comma;z__1&comma;1z__1z__21z__2z__2+1b__2

c=a__1+a__2z__21

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__1z__21z__2b__2F2a__1+b__2&comma;b__1&comma;b__2&comma;c&comma;a__1+b__2&comma;z__1&comma;1z__1z__21z__2z__2+1b__2

c=b__1+a__2z__21

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__1z__21z__2a__2F2b__1+a__2&comma;a__1&comma;a__2&comma;c&comma;b__1+a__2&comma;z__1&comma;1z__1z__21z__2z__2+1a__2

c=a__1+b__2z__21

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__1z__21z__2a__2F2a__1+a__2&comma;b__1&comma;a__2&comma;c&comma;a__1+a__2&comma;z__1&comma;1z__1z__21z__2z__2+1a__2

c=b__1+b__2z__21

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F412+b+c2&comma;b&comma;d&comma;e&comma;2z__2gz__2g4gz__2z__2&comma;gg+11+2b+c4gz__21z__2g+12bz__2+1b

a__2=bb__1=c2b__2=c2e=12+c2a__1=12+c2d=12+b+c2z__1=4gg+122z__2gz__2g4gz__2z__2g+121

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F4b+12c2&comma;b&comma;d&comma;e&comma;2z__2gz__2g4gz__2z__2&comma;gg+12b4gz__21z__2g+12b+12c2z__2+1b+12c2

d=bb__1=c2b__2=c2e=12+c2a__1=12+c2a__2=b+12c2z__1=4gg+122z__2gz__2g4gz__2z__2g+121

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F412+b+c2&comma;b&comma;d&comma;e&comma;f&comma;2z__2fz__2f4fz__2z__2f+11+2b+c4fz__21z__2f+12bz__2+1b

a__2=bb__1=c2b__2=c2d=12+c2a__1=12+c2e=12+b+c2z__1=4ff+122z__2fz__2f4fz__2z__2f+121

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F4b+12c2&comma;b&comma;d&comma;e&comma;f&comma;2z__2fz__2f4fz__2z__2f+12b4fz__21z__2f+12b+12c2z__2+1b+12c2

e=bb__1=c2b__2=c2d=12+c2a__1=12+c2a__2=b+12c2z__1=4ff+122z__2fz__2f4fz__2z__2f+121

sum form

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=m=0n=0a__1ma__2nb__1mb__2nz__1mz__2ncm+nm!n!

z__1<1z__2<1

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=k=0a__1kb__1kF12a__2,b__2;c+k;z__2z__1kckk!

z__1<1

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=k=0a__2kb__2kF12a__1,b__1;c+k;z__1z__2kckk!

z__2<1

series

seriesF3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2&comma;z__1&comma;4=F12a__2,b__2;c;z__2+a__1b__1F12a__2,b__2;c+1;z__2cz__1+12a__1b__1a__1+1b__1+1F12a__2,b__2;c+2;z__2cc+1z__12+16a__1b__1a__1+1b__1+1a__1+2b__1+2F12a__2,b__2;c+3;z__2cc+1c+2z__13+Oz__14

seriesF3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2&comma;z__2&comma;4=F12a__1,b__1;c;z__1+a__2b__2F12a__1,b__1;c+1;z__1cz__2+12a__2b__2a__2+1b__2+1F12a__1,b__1;c+2;z__1cc+1z__22+16a__2b__2a__2+1b__2+1a__2+2b__2+2F12a__1,b__1;c+3;z__1cc+1c+2z__23+Oz__24

integral form

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=Γc011u1+b__1F12a__2,b__2;cb__1;z__2uuc+b__1+11+z__1u1a__1&DifferentialD;uΓb__1Γcb__1

0<b__10<c0<c+b__1

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=Γc011ub__21F12a__1,b__1;cb__2;uz__1uc+b__2+11+u1z__2a__2&DifferentialD;uΓb__2Γcb__2

0<b__20<c0<c+b__2

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=Γc01uρ11ucρ1F12a__1,b__1;ρ;uz__1F12a__2,b__2;cρ;u1z__2&DifferentialD;uΓρΓcρ

0<c

F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=Γc0101vu1+b__1vb__211uvc+b__1+b__2+1uz__1+1a__1vz__2+1a__2&DifferentialD;u&DifferentialD;vΓb__1Γb__2Γcb__1b__2

0<b__10<b__20<c+b__1+b__2

differentiation rule

z__1F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=a__1b__1F3a__1+1&comma;a__2&comma;b__1+1&comma;b__2&comma;c+1&comma;z__1&comma;z__2c

nz__1nF3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=a__1nb__1nF3n+a__1&comma;a__2&comma;n+b__1&comma;b__2&comma;n+c&comma;z__1&comma;z__2cn

z__2F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=a__2b__2F3a__1&comma;a__2+1&comma;b__1&comma;b__2+1&comma;c+1&comma;z__1&comma;z__2c

nz__2nF3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=a__2nb__2nF3a__1&comma;n+a__2&comma;b__1&comma;n+b__2&comma;n+c&comma;z__1&comma;z__2cn

DE

fa__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=F3a__1&comma;a__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2

2z__12fa__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__22z__2z__1fa__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2z__1z__11+a__1b__11z__1+cz__1fa__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2z__1z__11a__1b__1fa__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2z__1z__11

2z__2z__1fa__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2=z__2z__212z__22fa__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2z__1+a__2+b__2+1z__2cz__2fa__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2z__1+a__2b__2fa__2&comma;b__1&comma;b__2&comma;c&comma;z__1&comma;z__2z__1

 

The Evalf Package

Evalf is both a command and a package of commands for the numerical evaluation of mathematical expressions and functions, numerical experimentation, and fast development of numerical algorithms, taking advantage of the advanced symbolic capabilities of the Maple computer algebra system.

As an environment for working with special functions, Evalf helps developing/implementing the typical approaches used in the literature and comparing their performances. This kind of environment is increasingly relevant nowadays, when rather complicated mathematical expressions and advanced special functions, as for instance is the case of the Heun and Appell functions, appear more and more in the modeling of problems in science.

Examples

withMathematicalFunctions&comma; Evalf&colon; withEvalf&semi;

Add&comma;Evalb&comma;Zoom&comma;QuadrantNumbers&comma;Singularities&comma;GenerateRecurrence&comma;PairwiseSummation

(2.1.1)

Consider the following AppellF4 function

F4AppellF41&comma;2&comma;3&comma;4&comma;5&comma;z

F4F41&comma;2&comma;3&comma;4&comma;5&comma;z

(2.1.2)

This function satisfies a linear differential equation whose singularities, which depend on the function's parameters, are relevant in the context of numerically evaluating the function. To see the location of these singularities you can construct the linear ODE behind F4 using PDEtools:-dpolyform) and use the DEtools:-singularities command, or directly use Evalf:-Singularities

SSingularitiesF4

S0&comma;625&comma;203&comma;6+25&comma;+I

(2.1.3)

For the purpose of experimentation with numerical methods, it is useful to have arrays of points located in different quadrants and different regions of the complex plane. For example, in connection with the singularities of F4, you can get an Array of floating-point complex numbers in the four quadrants around the absolute value of these singularities using Evalf:-QuadrantNumbers

AQuadrantNumbersaround=S

A0.2570342710+0.4941992162I1.124756758+1.034065171I2.753814245+3.527881747I2.349520885+6.238925874I0.7600870327+8.911002087I8.269214269+6.425397011I27.80608401+51.83562733I−0.5533351171+0.06418512256I−1.340329056+0.7334075015I−2.630202393+3.620977477I−6.639635346+0.5997390467I−0.8886138781+8.899104217I−2.434233181+10.18529038I−53.36016359+24.75486842I−0.52932645160.1735309468I−1.4156623220.5746901186I−3.9514688242.101270247I−3.4671163095.694167977I−3.9077265658.044461672I−6.4752579778.230228764I−55.3302444319.96683798I0.48502812970.2739474315I1.1750042820.9765927919I3.6039503712.653485300I5.2569687594.099844378I8.6668325352.206740649I5.9769497368.598936167I57.3860894912.92080884I

(2.1.4)

Check the quadrant location of the points in each of the four components of the Array A

mapu  mapQuadrantNumbers&comma;u&comma;A

1111111222222233333334444444

(2.1.5)

Use the Evalf:-GenerateRecurrence command to generate a recurrence with which one could numerically evaluate the following AppellF2 function and use it to compute the first four coefficients of its power series expansion around the origin

F2AppellF21&comma;2&comma;3&comma;4&comma;5&comma;6&comma; z

F2F21&comma;2&comma;3&comma;4&comma;5&comma;6&comma;z

(2.1.6)

U  GenerateRecurrenceF2

Uprocioptionhfloat&comma;cache&semi;ifi::nonnegint&comma;4&sol;5&ast;i&Hat;24&ast;thisproci1&sol;i&plus;4&ast;i&plus;1&sol;5&ast;i&Hat;3i&Hat;210&ast;i8&ast;thisproci2&sol;i&ast;i&plus;4&ast;i&plus;3&comma;&apos;procnameargs&apos;end proc

(2.1.7)

The procedure returned by Evalf:-GenerateRecurrence is optimized for numerical computations (option hfloat) but it can also compute with exact numbers as the arguments of F2

%sum &equals; sumUnzn&comma;n&equals;0..3

n=03Unzn=F121,2;4;6+3F122,2;4;6z5+2F122,3;4;6z25+2F012;;6z37

(2.1.8)

Perform a numerical double sum, where both summation ranges are from 0 to infinity, using the Evalf:-Add command, so perform the double sum until the summation converges up to the value of Digits. For example, consider the definition of the AppellF2 double series

FunctionAdvisordefinition&comma;F2a&comma;b1&comma;b2&comma;c1&comma;c2&comma;z1&comma;z2

F2a&comma;b1&comma;b2&comma;c1&comma;c2&comma;z1&comma;z2=_k1=0_k2=0a_k1+_k2b1_k1b2_k2z1_k1z2_k2c1_k1c2_k2_k1!_k2!&comma;z1+z2<1

(2.1.9)

Following the steps outlined in Evalf:-Add, get the summand and construct a formula-procedure depending on 2 parameters m and n

summandop1&comma;1&comma;rhs1

summanda_k1+_k2b1_k1b2_k2z1_k1z2_k2c1_k1c2_k2_k1!_k2!

(2.1.10)

general_formulaunapplysummand&comma;_k1&comma;_k2

general_formula_k1&comma;_k2a_k1+_k2b1_k1b2_k2z1_k1z2_k2c1_k1c2_k2_k1!_k2!

(2.1.11)

Use this formula to create a routine for the numerical evaluation of AppellF2 valid when the condition z1+z2<1, shown in the definition, is satisfied

`evalf/AF2`a&comma;b1&comma;b2&comma;c1&comma;c2&comma;z1&comma;z2&rarr;Addsubs&apos;:-a&equals;a&comma;:-b1&equals;b1&comma;:-b2&equals;b2&comma;:-c1&equals;c1&comma;:-c2&equals;c2&comma;:-z1&equals;z1&comma;:-z2&equals;z2&apos;&comma;evalgeneral_formula&colon;

where we are calling AF2 this representation of AppellF2. Consider now for instance some numerical complex values of the parameters a, b1, b2, c1, c2, z1, z2 satisfying z1+z2<1 and numerically evaluate this AF2 representation at those values using the procedure `evalf/AF2` just constructed

AF212&comma;27&comma;14&comma;2&comma;32+I&comma;14I&comma;14

AF212&comma;27&comma;14&comma;2&comma;32+I&comma;I4&comma;14

(2.1.12)

evalf

0.9831522491+0.02726587338I

(2.1.13)

Compare with the numerical value obtained using the standard Maple AppellF2 function

subsAF2=AppellF2&comma;

F212&comma;27&comma;14&comma;2&comma;32+I&comma;I4&comma;14

(2.1.14)

evalf

0.9831522491+0.02726587338I

(2.1.15)

 

Consider the following confluent HeunC function

HCHeunC1&comma;2&comma;3&comma;4&comma;5&comma;6

HCHC1&comma;2&comma;3&comma;4&comma;5&comma;6

(2.1.16)

You can normally evaluate the function using evalf

evalfHC

−0.0090830565360.004476814952I

(2.1.17)

But how was this evaluation performed? Using Evalf, instead of a black box approach, you have access to information describing the approach used:

EvalfHC

      HeunCZ and HeunCZPrime at Z = .500000000000-.559016994375*I using a series expansion around Z = 0
      HeunCZ and HeunCZPrime at Z = 1.06250000000-.559016994375*I using a series expansion around Z = .500000000000-.559016994375*I
      HeunCZ and HeunCZPrime at Z = 1.16204916259-.149352378815*I using a series expansion around Z = 1.06250000000-.559016994375*I

      HeunCZ at Z = 1.200000000 using a series expansion around Z = 1.16204916259-.149352378815*I

CPU time elapsed during evaluation: .453 seconds

−0.0090830565360.004476814952I

(2.1.18)

From this information we see that the Z approach (see Evalf) was used to first map the original problem at z=6 into a problem within the ring 1Z 2, then a sequence of concatenated taylor series got used departing from the origin, working around the singularity at z=1, finally reaching Z=1.200000000 and from there getting the value at z=6.

In the case of the Heun or Appell functions, the singularities behind the corresponding differential equations, and hence restricting the radius of convergence of power series expansions, can be viewed using the Evalf:-Singularities command

SingularitiesHC

0&comma;1

(2.1.19)

Evalf can evaluate expressions in general, not just single function calls. Any optional arguments apply when Heun or Appell functions are present in the expression. Consider for instance one of the special values of AppellF1, a case where the function can be represented by a 2F1 hypergeometric function

F1%AppellF14.0&comma;2.0&comma;0.3&comma;2.3&comma;1.12&comma;1.1

F1F14.0&comma;2.0&comma;0.3&comma;2.3&comma;1.12&comma;1.1

(2.1.20)

F1=valueconvertF1&comma;rational

F14.0&comma;2.0&comma;0.3&comma;2.3&comma;1.12&comma;1.1=10000F122,4;2310;15

(2.1.21)

The left-hand side is AppellF1 written in inert form, to avoid the automatic representation in terms of 2F1 functions, while the right-hand side involves only a hypergeometric 2F1 function in terms of rational numbers, also to avoid the automatic numerical evaluation of this function. Proceed now with the numerical evaluation of both sides of this equation

evalf

5325.710910=5325.710910

(2.1.22)

Compute now showing the strategy used

Evalf

-> Numerical evaluation of AppellF1(4.0, 2.0, .3, 2.3, 1.12, 1.1)
   -> AppellF1, checking singular cases
   -> AppellF1, trying special values
Hypergeometric: case: c = b1 + b2
   <- special values of AppellF1 successful

CPU time elapsed during evaluation: 0. seconds

5325.710910=5325.710910

(2.1.23)

So during the numerical evaluation of AppellF1 the special value of hypergeometric form was identified and used. Numerically evaluate this equation now without using the special values information of AppellF1

Evalf&comma;usespecialvalues=false

-> Numerical evaluation of AppellF1(4.0, 2.0, .3, 2.3, 1.12, 1.1)
   -> AppellF1, checking singular cases
   -> AppellF1, trying formulas
      case AKF page 36, after (13), maps into AppellF3 with abs(z2/(z2-1)) < 1
         case: abs(z1) > 1, abs(z2) > 1 and 1.1 <= abs(z1) < abs(z2); swapping parameters and z1 <-> z2
         -> Numerical evaluation of AppellF3(-1.7, 2.0, .3, 4.0, 2.3, 11.00000000, 1.12)
            -> AppellF3, checking singular cases
            -> AppellF3, trying special values
            -> AppellF3, trying formulas

CPU time elapsed during evaluation: .16e-1 seconds

      case AKF page 35, (9), maps into AppellF2 with abs(1 - z1/z2) < 1
         case: abs(z1) < 1, abs(z2) > 1; swapping parameters and z1 <-> z2
         -> Numerical evaluation of AppellF2(2.3, 4.0, .3, 2.3, 2.3, 1.12, -.18181818e-1)
            -> AppellF2, checking singular cases
            -> AppellF2, trying special values
Hypergeometric: case: c1 = a, c2 = a and z1 <> 1 and z2 <> 1
            <- special values of AppellF2 successful

CPU time elapsed during evaluation: .16e-1 seconds

CPU time elapsed during evaluation: .63e-1 seconds

5325.710904=5325.710910

(2.1.24)

In the information above we see that first a mapping into AppellF3 was attempted, it did not succeed, then a mapping into AppellF2 was attempted and that resulted in the correct value. Perform the numerically evaluation once more, this time without mapping into other functions:

Evalf&comma;usespecialvalues=false&comma;allowmapping=false

-> Numerical evaluation of AppellF1(4.0, 2.0, .3, 2.3, 1.12, 1.1)

   -> AppellF1, checking singular cases
   -> AppellF1, trying formulas
      case z1 <> 0 and z1 <> 1 and abs(z1/(z1-1)) < 1; swapping parameters and recursing
         case AKF page 30, (5.5), abs(z1) > 1, abs(z2) > 1, and abs((z2-z1)/(z2-1)) <= 1; using identity mapping into F*AppellF1(..., z1, (z2-z1)/(z2-1))
            -> Numerical evaluation of AppellF1(-1.7, 0., 2.0, 2.3, 1.1, .1666666667)
               -> AppellF1, checking singular cases
               -> AppellF1, trying special values
               <- special values of AppellF1 successful

CPU time elapsed during evaluation: 0. seconds

5325.710909=5325.710910

(2.1.25)

We see now that there was still another formula that could be used, it is a transformation of Euler type mapping AppellF1 into an equivalent form of AppellF1 that has the advantage of having as evaluation point z1z11<1 so after swapping parameters the function got evaluated again as expected. The same problem using a sequence of concatenated Taylor expansions, avoid displaying extra information, just the time consumed and a plot showing the path used and expansion points

Evalf&comma;usetaylor&comma;time&comma;plot&comma;quiet

CPU time elapsed during evaluation: .32e-1 seconds

5325.710910+1.10−13I=5325.710910

(2.1.26)

In this Taylor approach, each expansion around a point is used to reach up to 95/100 of the radius of convergence before starting another expansion. Reduce that to 1/2, compute internally at Digits = 50 (but return as if computing with Digits = 10) and zoom the plot around z=1 extending 1/4 to either side of the singularity located at  z=1

Evalf50&comma;usetaylor&comma;R&equals;12&comma;time&comma;plot&comma;zoom=1&comma;14&comma;quiet

CPU time elapsed during evaluation: .218 seconds

5325.710910+1.41024082110−52I=5325.710910

(2.1.27)

See Also

MathematicalFunctions

FunctionAdvisor

Appell

Evalf