HypExp for Maple
HypExp can not be used directly in Maple. It is however possible to
load expansions of hypergeometric functions from the libraries of
HypExp. How to do that is explained in the following.
1. Install HypExp
with the libraries you are intersted in.
2. copy the script MathematicaToMaple
and the file MathematicaToMaple.sed in the installation directory of HypExp
3. run the script MathematicaToMaple
> sh MathematicaToMaple
This will generate a directory MapleLibs
and will convert the libraries in a format readable for Maple.
4. Use the following code at the begining of your Maple Session:
first initialize the path of the maple libraries:
>
installpath:="/the/hypex/installation/path/MapleLibs/":
then use the following code:
> with(StringTools):
hypexpfilename3F2:=
(a,b) ->
Join(["hypexp",convert(sort(a)[1],string),convert(sort(a)[2],string),convert(sort(a)[3],string),convert(sort(b)[1],string),convert(sort(b)[2],string),".maple"],""):
hypexpfilename2F1:= (a,b)
->
Join(["hypexp",convert(sort(a)[1],string),convert(sort(a)[2],string),convert(sort(b)[1],string),".maple"],""):
constructepsvector:= (j)
-> t^(j-1):
epsvector:= (e,j) ->
subs(t=e,Vector(j,constructepsvector)):
with(LinearAlgebra):
sd:= (e,v,min,max) ->
e^min*Multiply(Vector[row](v),epsvector(e,max-min)):
hypexp2F1 :=
proc(a1,a2,b1,alpha1,alpha2,beta1,x,e) ;
read
Join([installpath,hypexpfilename2F1([a1,a2],[b1])],"");
hypexpresult(alpha1,alpha2,beta1,x,e);
end proc:;
hypexp3F2 :=
proc(a1,a2,a3,b1,b2,alpha1,alpha2,alpha3,beta1,beta2,x,e) ;
read
Join([installpath,hypexpfilename3F2([a1,a2,a3],[b1,b2])],"");
hypexpresult(alpha1,alpha2,alpha3,beta1,beta2,x,e);
end proc:;
The expansion is then called with the function
>
hypexp3F2(1,1,1,-2,2,al,a2,a3,b1,b2,z,eps);
or
>
hypexp2F1(1,5,0,al,a2,b1,z,eps);
where the first 5 (3) arguments are the integer parts of the parameters
of the hypergeometric function 3F2 (2F1) , the 5 (3) following
arguments are the coefficients of the small parameter. The two last
arguements are the variable and the small parameter in which the
expansion is taken.
Expanding the libraries
If you need expansions which are not in the libraries, you should use
the command HypExpAddToLib
under Mathematica in order to extend the libraries, the rerun the
script MathematicaToMaple.
The new members of the libraries will then be accessible from
Maple
Bug reports
We are not experienced Maple users, so if this does not work well or
has some bugs, please tell us.