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 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,
FunctionAdvisor⁡definition,AppellF1
F1⁡a,b__1,b__2,c,z__1,z__2=∑_k1=0∞⁡∑_k2=0∞⁡a_k1+_k2⁢b__1_k1⁢b__2_k2⁢z__1_k1⁢z__2_k2c_k1+_k2⁢_k1!⁢_k2!,z__1<1∧z__2<1
FunctionAdvisordefinition, AppellF2;
F2⁡a,b__1,b__2,c__1,c__2,z__1,z__2=∑_k1=0∞⁡∑_k2=0∞⁡a_k1+_k2⁢b__1_k1⁢b__2_k2⁢z__1_k1⁢z__2_k2c__1_k1⁢c__2_k2⁢_k1!⁢_k2!,z__1+z__2<1
FunctionAdvisordefinition, AppellF3;
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=∑_k1=0∞⁡∑_k2=0∞⁡a__1_k1⁢a__2_k2⁢b__1_k1⁢b__2_k2⁢z__1_k1⁢z__2_k2c_k1+_k2⁢_k1!⁢_k2!,z__1<1∧z__2<1
FunctionAdvisordefinition, AppellF4;
F4⁡a,b,c__1,c__2,z__1,z__2=∑_k1=0∞⁡∑_k2=0∞⁡a_k1+_k2⁢b_k1+_k2⁢z__1_k1⁢z__2_k2c__1_k1⁢c__2_k2⁢_k1!⁢_k2!,z__1+z__2<1
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
FunctionAdvisor⁡singularities,AppellF1
F1⁡a,b__1,b__2,c,z__1,z__2,c::ℤ0,−∧a::ℤ0,−∧b__1::¬ℤ0,−∧a<c∨c::ℤ0,−∧a::ℤ0,−∧b__2::¬ℤ0,−∧a<c∨c::ℤ0,−∧a::ℤ0,−∧b__1::ℤ0,−∧b__2::ℤ0,−∧a<c∧b__1+b__2<c∨c::ℤ0,−∧a::¬ℤ0,−∧b__1::¬ℤ0,−∨c::ℤ0,−∧a::¬ℤ0,−∧b__2::¬ℤ0,−∨c::ℤ0,−∧a::¬ℤ0,−∧b__1::ℤ0,−∧b__2::ℤ0,−∧b__1+b__2<c
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,
FunctionAdvisor⁡sum_form,AppellF3
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=∑m=0∞⁡∑n=0∞⁡a__1m⁢a__2n⁢b__1m⁢b__2n⁢z__1m⁢z__2ncm+n⁢m!⁢n!,z__1<1∧z__2<1,F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=∑k=0∞⁡a__1k⁢b__1k⁢F12⁡a__2,b__2;c+k;z__2⁢z__1kck⁢k!,z__1<1,F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=∑k=0∞⁡a__2k⁢b__2k⁢F12⁡a__1,b__1;c+k;z__1⁢z__2kck⁢k!,z__2<1
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, AppellF2;
F2⁡a,b__1,b__2,c__1,c__2,z__1,z__2=Γ⁡c__1⁢∫01ub__1−1⁢F12⁡a,b__2;c__2;−z__2u⁢z__1−11−u−c__1+b__1+1⁢−u⁢z__1+1aⅆuΓ⁡b__1⁢Γ⁡c__1−b__1,z__1≠1∧0<ℜ⁡b__1∧0<−ℜ⁡−c__1+b__1,F2⁡a,b__1,b__2,c__1,c__2,z__1,z__2=Γ⁡c__2⁢∫01ub__2−1⁢F12⁡a,b__1;c__1;−z__1u⁢z__2−11−u1+b__2−c__2⁢−u⁢z__2+1aⅆuΓ⁡b__2⁢Γ⁡c__2−b__2,z__2≠1∧0<ℜ⁡b__2∧0<−ℜ⁡−c__2+b__2,F2⁡a,b__1,b__2,c__1,c__2,z__1,z__2=Γ⁡c__1⁢Γ⁡c__2⁢∫01∫01ub__1−1⁢vb__2−11−u−c__1+b__1+1⁢1−v1+b__2−c__2⁢−u⁢z__1−v⁢z__2+1aⅆuⅆvΓ⁡b__1⁢Γ⁡b__2⁢Γ⁡c__1−b__1⁢Γ⁡c__2−b__2,0<ℜ⁡b__1∧0<ℜ⁡b__2∧0<−ℜ⁡−c__1+b__1∧0<−ℜ⁡−c__2+b__2,F2⁡a,b__1,b__2,c__1,c__2,z__1,z__2=∫0∞ua−1⁢F11⁡b__1;c__1;u⁢z__1⁢F11⁡b__2;c__2;u⁢z__2ⅇuⅆuΓ⁡a,ℜ⁡z__1+z__2<1∧0<ℜ⁡a
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, a−b, c2−a is a non-positive integer,
F4⁡a,b,c__1,c__2,z__1,z__2=AppellF4:-TransformationsEuler1⁡a,b,c__1,c__2,z__1,z__2
F4⁡a,b,c__1,c__2,z__1,z__2=Γ⁡c__2⁢Γ⁡b−a⁢−z__2−a⁢F4⁡a,a−c__2+1,a−b+1,c__1,1z__2,z__1z__2Γ⁡c__2−a⁢Γ⁡b+Γ⁡c__2⁢Γ⁡a−b⁢−z__2−b⁢F4⁡b,1+b−c__2,b−a+1,c__1,1z__2,z__1z__2Γ⁡c__2−b⁢Γ⁡a
and this identity can be used to evaluate AppellF4 at z1=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
F4⁡a,b,c__1,c__2,1,z__2=Γ⁡c__2⁢Γ⁡b−a⁢−z__2−a⁢F34⁡a,a−c__2+1,a2−b2+c__12,a2−b2+12+c__12;c__1,a−b+1,a−b+c__1;4z__2Γ⁡c__2−a⁢Γ⁡b+Γ⁡c__2⁢Γ⁡a−b⁢−z__2−b⁢F34⁡b,1+b−c__2,b2−a2+c__12,b2−a2+12+c__12;c__1,b−a+1,b−a+c__1;4z__2Γ⁡c__2−b⁢Γ⁡a
A plot of the AppellF2 function for some values of its parameters
F2 ≔ AppellF2expI⋅z,12⋅I,37−I4,4,57+6⋅I,6,z
F2≔F2⁡ⅇI⁢z,I2,37−I4,4,57+6⁢I,6,z
plotRe,ImF2,z=−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
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=∑_k1=0∞⁡∑_k2=0∞⁡a__1_k1⁢a__2_k2⁢b__1_k1⁢b__2_k2⁢z__1_k1⁢z__2_k2c_k1+_k2⁢_k1!⁢_k2!
z__1<1∧z__2<1
classify function
Appell
symmetries
F3⁡a__2,a__1,b__2,b__1,c,z__2,z__1=F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2
F3⁡b__1,a__2,a__1,b__2,c,z__1,z__2=F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2
F3⁡a__1,b__2,b__1,a__2,c,z__1,z__2=F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2
plot
singularities
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2
c::ℤ0,−∧a__1::¬ℤ0,−∧b__1::¬ℤ0,−∨c::ℤ0,−∧a__2::¬ℤ0,−∧b__2::¬ℤ0,−∨c::ℤ0,−∧a__1::¬ℤ0,−∧a__2::ℤ0,−∧b__1::ℤ0,−∧b__2::¬ℤ0,−∧a__2+b__1<c∨c::ℤ0,−∧a__1::¬ℤ0,−∧a__2::¬ℤ0,−∧b__1::ℤ0,−∧b__2::ℤ0,−∧b__1+b__2<c∨c::ℤ0,−∧a__1::¬ℤ0,−∧a__2::ℤ0,−∧b__1::ℤ0,−∧b__2::ℤ0,−∧a__2+b__1<c∧b__1+b__2<c∨c::ℤ0,−∧a__1::ℤ0,−∧a__2::ℤ0,−∧b__1::¬ℤ0,−∧b__2::¬ℤ0,−∧a__1+a__2<c∨c::ℤ0,−∧a__1::ℤ0,−∧a__2::¬ℤ0,−∧b__1::¬ℤ0,−∧b__2::ℤ0,−∧a__1+b__2<c∨c::ℤ0,−∧a__1::ℤ0,−∧a__2::ℤ0,−∧b__1::¬ℤ0,−∧b__2::ℤ0,−∧a__1+a__2<c∧a__1+b__2<c∨c::ℤ0,−∧a__1::ℤ0,−∧a__2::ℤ0,−∧b__1::ℤ0,−∧b__2::ℤ0,−∧a__1+a__2<c∧a__1+b__2<c∧a__2+b__1<c∧b__1+b__2<c∨c::ℤ0,−∧a__1::ℤ0,−∧a__2::¬ℤ0,−∧b__1::ℤ0,−∧b__2::ℤ0,−∧a__1+b__2<c∧b__1+b__2<c∨c::ℤ0,−∧a__1::ℤ0,−∧a__2::ℤ0,−∧b__1::ℤ0,−∧b__2::¬ℤ0,−∧a__1+a__2<c∧a__2+b__1<c
branch points
a__1::¬ℤ0,−∧b__1::¬ℤ0,−∧z__1∈1,∞+∞⁢I∨a__2::¬ℤ0,−∧b__2::¬ℤ0,−∧z__2∈1,∞+∞⁢I
branch cuts
a__1::¬ℤ0,−∧b__1::¬ℤ0,−∧1<z__1∨a__2::¬ℤ0,−∧b__2::¬ℤ0,−∧1<z__2
special values
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=1
z__1=0∧z__2=0
a__1=0∧a__2=0
a__1=0∧b__2=0
a__2=0∧b__1=0
b__1=0∧b__2=0
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F12⁡a__2,b__2;c;z__2
z__1=0
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F12⁡a__1,b__1;c;z__1
z__2=0
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F12⁡a__1,b__1;c;1⁢F23⁡a__2,b__2,c−a__1−b__1;c−b__1,c−a__1;z__2
z__1=1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F12⁡a__2,b__2;c;1⁢F23⁡a__1,b__1,c−a__2−b__2;c−a__2,c−b__2;z__1
z__2=1
a__1=0
a__2=0
b__1=0
b__2=0
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__1⁢F12⁡1,a__1;a__1+a__2;z__1+z__2⁢F12⁡1,a__2;a__1+a__2;z__2−z__1⁢z__2+z__1+z__2
b__1=1∧b__2=1∧c=a__1+a__2∧−z__1⁢z__2+z__1+z__2≠0
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__1⁢F12⁡1,b__1;a__2+b__1;z__1+z__2⁢F12⁡1,a__2;a__2+b__1;z__2−z__1⁢z__2+z__1+z__2
a__1=1∧b__2=1∧c=a__2+b__1∧−z__1⁢z__2+z__1+z__2≠0
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__1⁢F12⁡1,a__1;a__1+b__2;z__1+z__2⁢F12⁡1,b__2;a__1+b__2;z__2−z__1⁢z__2+z__1+z__2
b__1=1∧a__2=1∧c=a__1+b__2∧−z__1⁢z__2+z__1+z__2≠0
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=1−z__1b__2⁢F12⁡a__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__2∧z__1≠1∧z__2=z__1−1+z__1
c=a__1+a__2+b__1+b__2∧z__2≠1∧z__1=z__2−1+z__2
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=1−z__1c−1⁢1−2⁢z__11−a__2⁢F12⁡c2+a__12−a__22,c2−a__12−a__22+12;c;4⁢z__1⁢1−z__1
z__2=z__12⁢z__1−1∧2⁢z__1≠1∧z__1≠1∧b__1=1−a__1∧b__2=1−a__2
z__1=z__22⁢z__2−1∧2⁢z__2≠1∧z__2≠1∧b__1=1−a__1∧b__2=1−a__2
z__2=z__12⁢z__1−1∧2⁢z__1≠1∧z__1≠1∧a__1=1−b__1∧b__2=1−a__2
z__2=z__12⁢z__1−1∧2⁢z__1≠1∧z__1≠1∧b__1=1−a__1∧a__2=1−b__2
identities
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F3⁡a__1,a__2,b__1,b__2+n,c,z__1,z__2−∑k=1n⁡nk⁢a__2k⁢z__2k⁢F3⁡a__1,b__2+k,b__1,k+a__2,k+c,z__1,z__2ck
z__2≠1∧c::¬ℤ0,−∨a__2::ℤ0,−∧c<a__2∨n≤c
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F3⁡b__1,a__2,a__1+n,b__2,c,z__1,z__2−∑k=1n⁡nk⁢b__1k⁢z__1k⁢F3⁡a__1+k,a__2,k+b__1,b__2,k+c,z__1,z__2ck
z__1≠1∧c::¬ℤ0,−∨b__1::ℤ0,−∧c<b__1∨n≤c
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=a__1n⁢F3⁡b__1,a__2,a__1+n,b__2,c,z__1,z__2a__1−b__1n−∑k=1n⁡nk⁢b__1k⁢−1k⁢F3⁡a__1,a__2,k+b__1,b__2,c,z__1,z__2b__1−a__1−n+1k
z__1≠1∧a__1−b__1::¬ℤ0,−∨n≤a__1−b__1∧b__1−a__1−n+1::¬ℤ0,−∨b__1::ℤ0,−∧b__1−a__1−n+1<b__1∨n≤−b__1+a__1+n−1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F3⁡b__1,a__2,a__1+n,b__2,c,z__1,z__2−b__1⁢z__1⁢∑k=1n⁡F3⁡a__1+k,a__2,b__1+1,b__2,c+1,z__1,z__2c
z__1≠1∧c≠0
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F3⁡a__1,a__2,b__1,b__2,c−n,z__1,z__2−a__1⁢b__1⁢z__1⁢∑k=1n⁡F3⁡a__1+1,a__2,b__1+1,b__2,c+2−k,z__1,z__2c−k⁢c−k+1−a__2⁢b__2⁢z__2⁢∑k=1n⁡F3⁡a__1,a__2+1,b__1,b__2+1,c+2−k,z__1,z__2c−k⁢c−k+1
z__1≠1∧z__2≠1∧c::¬ℤ+
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F1⁡a__2,b__2,b__1,c,z__2,z__1−1+z__11−z__1b__1
c=a__1+a__2∧z__1≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F1⁡a__2,b__2,a__1,c,z__2,z__1−1+z__11−z__1a__1
c=b__1+a__2∧z__1≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F1⁡b__2,a__2,b__1,c,z__2,z__1−1+z__11−z__1b__1
c=a__1+b__2∧z__1≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F1⁡b__2,a__2,a__1,c,z__2,z__1−1+z__11−z__1a__1
c=b__1+b__2∧z__1≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F1⁡a__1,b__1,b__2,c,z__1,z__2z__2−1−z__2+1b__2
c=a__1+a__2∧z__2≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F1⁡b__1,a__1,b__2,c,z__1,z__2z__2−1−z__2+1b__2
c=b__1+a__2∧z__2≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F1⁡a__1,b__1,a__2,c,z__1,z__2z__2−1−z__2+1a__2
c=a__1+b__2∧z__2≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F1⁡b__1,a__1,a__2,c,z__1,z__2z__2−1−z__2+1a__2
c=b__1+b__2∧z__2≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__2⁢−1+z__1z__1b__1⁢F2⁡b__1+b__2,a__2,b__1,c,b__1+b__2,z__2,1−z__2⁢−1+z__1z__11−z__1b__1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__2⁢−1+z__1z__1a__1⁢F2⁡a__1+b__2,a__2,a__1,c,a__1+b__2,z__2,1−z__2⁢−1+z__1z__11−z__1a__1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__2⁢−1+z__1z__1b__1⁢F2⁡b__1+a__2,b__2,b__1,c,b__1+a__2,z__2,1−z__2⁢−1+z__1z__11−z__1b__1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__2⁢−1+z__1z__1a__1⁢F2⁡a__1+a__2,b__2,a__1,c,a__1+a__2,z__2,1−z__2⁢−1+z__1z__11−z__1a__1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__1⁢z__2−1z__2b__2⁢F2⁡b__1+b__2,a__1,b__2,c,b__1+b__2,z__1,1−z__1⁢z__2−1z__2−z__2+1b__2
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__1⁢z__2−1z__2b__2⁢F2⁡a__1+b__2,b__1,b__2,c,a__1+b__2,z__1,1−z__1⁢z__2−1z__2−z__2+1b__2
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__1⁢z__2−1z__2a__2⁢F2⁡b__1+a__2,a__1,a__2,c,b__1+a__2,z__1,1−z__1⁢z__2−1z__2−z__2+1a__2
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=z__1⁢z__2−1z__2a__2⁢F2⁡a__1+a__2,b__1,a__2,c,a__1+a__2,z__1,1−z__1⁢z__2−1z__2−z__2+1a__2
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F4⁡−12+b+c2,b,d,e,−2⁢z__2⁢g−z__2⁢g−4⁢g−z__2z__2,g⁢g+1−1+2⁢b+c⁢4⁢g⁢z__2−1z__2⁢g+12b−z__2+1b
a__2=b∧b__1=c2∧b__2=c2∧e=12+c2∧a__1=−12+c2∧d=−12+b+c2∧z__1=4⁢gg+12∧−2⁢z__2⁢g−z__2⁢g−4⁢g−z__2z__2⁢g+12≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F4⁡b+12−c2,b,d,e,−2⁢z__2⁢g−z__2⁢g−4⁢g−z__2z__2,g⁢g+12⁢b⁢4⁢g⁢z__2−1z__2⁢g+12b+12−c2−z__2+1b+12−c2
d=b∧b__1=c2∧b__2=c2∧e=12+c2∧a__1=−12+c2∧a__2=b+12−c2∧z__1=4⁢gg+12∧−2⁢z__2⁢g−z__2⁢g−4⁢g−z__2z__2⁢g+12≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F4⁡−12+b+c2,b,d,e,f,−2⁢z__2⁢f−z__2⁢f−4⁢f−z__2z__2⁢f+1−1+2⁢b+c⁢4⁢f⁢z__2−1z__2⁢f+12b−z__2+1b
a__2=b∧b__1=c2∧b__2=c2∧d=12+c2∧a__1=−12+c2∧e=−12+b+c2∧z__1=4⁢ff+12∧−2⁢z__2⁢f−z__2⁢f−4⁢f−z__2z__2⁢f+12≠1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=F4⁡b+12−c2,b,d,e,f,−2⁢z__2⁢f−z__2⁢f−4⁢f−z__2z__2⁢f+12⁢b⁢4⁢f⁢z__2−1z__2⁢f+12b+12−c2−z__2+1b+12−c2
e=b∧b__1=c2∧b__2=c2∧d=12+c2∧a__1=−12+c2∧a__2=b+12−c2∧z__1=4⁢ff+12∧−2⁢z__2⁢f−z__2⁢f−4⁢f−z__2z__2⁢f+12≠1
sum form
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=∑m=0∞⁡∑n=0∞⁡a__1m⁢a__2n⁢b__1m⁢b__2n⁢z__1m⁢z__2ncm+n⁢m!⁢n!
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=∑k=0∞⁡a__1k⁢b__1k⁢F12⁡a__2,b__2;c+k;z__2⁢z__1kck⁢k!
z__1<1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=∑k=0∞⁡a__2k⁢b__2k⁢F12⁡a__1,b__1;c+k;z__1⁢z__2kck⁢k!
z__2<1
series
series⁡F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2,z__1,4=F12⁡a__2,b__2;c;z__2+a__1⁢b__1⁢F12⁡a__2,b__2;c+1;z__2c⁢z__1+12⁢a__1⁢b__1⁢a__1+1⁢b__1+1⁢F12⁡a__2,b__2;c+2;z__2c⁢c+1⁢z__12+16⁢a__1⁢b__1⁢a__1+1⁢b__1+1⁢a__1+2⁢b__1+2⁢F12⁡a__2,b__2;c+3;z__2c⁢c+1⁢c+2⁢z__13+O⁡z__14
series⁡F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2,z__2,4=F12⁡a__1,b__1;c;z__1+a__2⁢b__2⁢F12⁡a__1,b__1;c+1;z__1c⁢z__2+12⁢a__2⁢b__2⁢a__2+1⁢b__2+1⁢F12⁡a__1,b__1;c+2;z__1c⁢c+1⁢z__22+16⁢a__2⁢b__2⁢a__2+1⁢b__2+1⁢a__2+2⁢b__2+2⁢F12⁡a__1,b__1;c+3;z__1c⁢c+1⁢c+2⁢z__23+O⁡z__24
integral form
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=Γ⁡c⁢∫011−u−1+b__1⁢F12⁡a__2,b__2;c−b__1;z__2⁢uu−c+b__1+1⁢1+z__1⁢u−1a__1ⅆuΓ⁡b__1⁢Γ⁡c−b__1
0<ℜ⁡b__1∧0<ℜ⁡c∧0<−ℜ⁡−c+b__1
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=Γ⁡c⁢∫011−ub__2−1⁢F12⁡a__1,b__1;c−b__2;u⁢z__1u−c+b__2+1⁢1+u−1⁢z__2a__2ⅆuΓ⁡b__2⁢Γ⁡c−b__2
0<ℜ⁡b__2∧0<ℜ⁡c∧0<−ℜ⁡−c+b__2
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=Γ⁡c⁢∫01uρ−1⁢1−uc−ρ−1⁢F12⁡a__1,b__1;ρ;u⁢z__1⁢F12⁡a__2,b__2;c−ρ;−u−1⁢z__2ⅆuΓ⁡ρ⁢Γ⁡c−ρ
0<ℜ⁡c
F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=Γ⁡c⁢∫01∫01−vu−1+b__1⁢vb__2−11−u−v−c+b__1+b__2+1⁢−u⁢z__1+1a__1⁢−v⁢z__2+1a__2ⅆuⅆvΓ⁡b__1⁢Γ⁡b__2⁢Γ⁡c−b__1−b__2
0<ℜ⁡b__1∧0<ℜ⁡b__2∧0<−ℜ⁡−c+b__1+b__2
differentiation rule
∂∂z__1F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=a__1⁢b__1⁢F3⁡a__1+1,a__2,b__1+1,b__2,c+1,z__1,z__2c
∂n∂z__1nF3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=a__1n⁢b__1n⁢F3⁡n+a__1,a__2,n+b__1,b__2,n+c,z__1,z__2cn
∂∂z__2F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=a__2⁢b__2⁢F3⁡a__1,a__2+1,b__1,b__2+1,c+1,z__1,z__2c
∂n∂z__2nF3⁡a__1,a__2,b__1,b__2,c,z__1,z__2=a__2n⁢b__2n⁢F3⁡a__1,n+a__2,b__1,n+b__2,n+c,z__1,z__2cn
DE
f⁡a__2,b__1,b__2,c,z__1,z__2=F3⁡a__1,a__2,b__1,b__2,c,z__1,z__2
∂2∂z__12f⁡a__2,b__1,b__2,c,z__1,z__2=z__2⁢∂2∂z__2∂z__1f⁡a__2,b__1,b__2,c,z__1,z__2z__1⁢z__1−1+−a__1−b__1−1⁢z__1+c⁢∂∂z__1f⁡a__2,b__1,b__2,c,z__1,z__2z__1⁢z__1−1−a__1⁢b__1⁢f⁡a__2,b__1,b__2,c,z__1,z__2z__1⁢z__1−1
∂2∂z__2∂z__1f⁡a__2,b__1,b__2,c,z__1,z__2=z__2⁢z__2−1⁢∂2∂z__22f⁡a__2,b__1,b__2,c,z__1,z__2z__1+a__2+b__2+1⁢z__2−c⁢∂∂z__2f⁡a__2,b__1,b__2,c,z__1,z__2z__1+a__2⁢b__2⁢f⁡a__2,b__1,b__2,c,z__1,z__2z__1
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.
withMathematicalFunctions, Evalf: withEvalf;
Add,Evalb,Zoom,QuadrantNumbers,Singularities,GenerateRecurrence,PairwiseSummation
Consider the following AppellF4 function
F4≔AppellF41,2,3,4,5,z
F4≔F4⁡1,2,3,4,5,z
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
S≔Singularities⁡F4
S≔0,6−2⁢5,203,6+2⁢5,∞+∞⁢I
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
A≔QuadrantNumbers⁡around=S
A≔0.2570342710+0.4941992162⁢I1.124756758+1.034065171⁢I2.753814245+3.527881747⁢I2.349520885+6.238925874⁢I0.7600870327+8.911002087⁢I8.269214269+6.425397011⁢I27.80608401+51.83562733⁢I−0.5533351171+0.06418512256⁢I−1.340329056+0.7334075015⁢I−2.630202393+3.620977477⁢I−6.639635346+0.5997390467⁢I−0.8886138781+8.899104217⁢I−2.434233181+10.18529038⁢I−53.36016359+24.75486842⁢I−0.5293264516−0.1735309468⁢I−1.415662322−0.5746901186⁢I−3.951468824−2.101270247⁢I−3.467116309−5.694167977⁢I−3.907726565−8.044461672⁢I−6.475257977−8.230228764⁢I−55.33024443−19.96683798⁢I0.4850281297−0.2739474315⁢I1.175004282−0.9765927919⁢I3.603950371−2.653485300⁢I5.256968759−4.099844378⁢I8.666832535−2.206740649⁢I5.976949736−8.598936167⁢I57.38608949−12.92080884⁢I
Check the quadrant location of the points in each of the four components of the Array A
mapu → mapQuadrantNumbers,u,A
1111111222222233333334444444
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
F2≔AppellF21,2,3,4,5,6, z
F2≔F2⁡1,2,3,4,5,6,z
U ≔ GenerateRecurrenceF2
U≔procioptionhfloat,cache;if⁡i::nonnegint,4/5*i^2 − 4*thisproc⁡i − 1/i+4*i+1/5*i^3 − i^2 − 10*i − 8*thisproc⁡i − 2/i*i+4*i+3,'procname⁡args'end proc
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 = sumUn⋅zn,n=0..3
∑n=03⁡U⁡n⁢zn=F12⁡1,2;4;6+3⁢F12⁡2,2;4;6⁢z5+2⁢F12⁡2,3;4;6⁢z25+2⁢F01⁡2;;6⁢z37
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
FunctionAdvisor⁡definition,F2⁡a,b1,b2,c1,c2,z1,z2
F2⁡a,b1,b2,c1,c2,z1,z2=∑_k1=0∞⁡∑_k2=0∞⁡a_k1+_k2⁢b1_k1⁢b2_k2⁢z1_k1⁢z2_k2c1_k1⁢c2_k2⁢_k1!⁢_k2!,z1+z2<1
Following the steps outlined in Evalf:-Add, get the summand and construct a formula-procedure depending on 2 parameters m and n
summand≔op⁡1,1,rhs⁡1
summand≔a_k1+_k2⁢b1_k1⁢b2_k2⁢z1_k1⁢z2_k2c1_k1⁢c2_k2⁢_k1!⁢_k2!
general_formula≔unapply⁡summand,_k1,_k2
general_formula≔_k1,_k2↦a_k1+_k2⁢b1_k1⁢b2_k2⁢z1_k1⁢z2_k2c1_k1⁢c2_k2⁢_k1!⁢_k2!
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,b1,b2,c1,c2,z1,z2→Add⁡subs⁡':-a=a,:-b1=b1,:-b2=b2,:-c1=c1,:-c2=c2,:-z1=z1,:-z2=z2',eval⁡general_formula:
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
AF2⁡12,27,−14,2,32+I,14⁢I,14
AF2⁡12,27,−14,2,32+I,I4,14
evalf⁡
0.9831522491+0.02726587338⁢I
Compare with the numerical value obtained using the standard Maple AppellF2 function
subs⁡AF2=AppellF2,
F2⁡12,27,−14,2,32+I,I4,14
Consider the following confluent HeunC function
HC≔HeunC1,2,3,4,5,6
HC≔HC⁡1,2,3,4,5,6
You can normally evaluate the function using evalf
evalf⁡HC
−0.009083056536−0.004476814952⁢I
But how was this evaluation performed? Using Evalf, instead of a black box approach, you have access to information describing the approach used:
Evalf⁡HC
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
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 1≤Z ≤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,1
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,2.0,0.3,2.3,1.12,1.1
F1≔F1⁡4.0,2.0,0.3,2.3,1.12,1.1
F1=value⁡convert⁡F1,rational
F1⁡4.0,2.0,0.3,2.3,1.12,1.1=10000⁢F12⁡2,4;2310;−15
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
5325.710910=5325.710910
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
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⁡,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: .63e-1 seconds
5325.710904=5325.710910
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⁡,usespecialvalues=false,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
5325.710909=5325.710910
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 z1z1−1<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⁡,usetaylor,time,plot,quiet
CPU time elapsed during evaluation: .32e-1 seconds
5325.710910+1.⁢10−13⁢I=5325.710910
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,usetaylor,R=12,time,plot,zoom=1,14,quiet
CPU time elapsed during evaluation: .218 seconds
5325.710910+1.410240821⁢10−52⁢I=5325.710910
See Also
MathematicalFunctions
FunctionAdvisor
Evalf
Download Help Document