Implementation of Hypergeometric functions



I know we had a discussion on this list about the implementation of
hypergeometric functions and the notation. Maxima knows the noun %
f[p,q]([a1,a2,...,ap],[b1,b2,...,bq],z). There is not a lot of code
implemented to use this noun. But the derivative is implemented directly
into the code of sdiff. An example is:

(%i7) diff(%f[p,q]([a1,a2,a3],[b1,b2],z),z);
(%o7) a1*%f[3,2]([a1+1,a2+1,a3+1],[b1+1,b2+1],z)*a2*a3/(b1*b2)

I would prefer a notation like

     hypergeometric([a1,...,ap],[b1,...,bq],z)

Perhaps it is useful to support some more notations like

    hypergeometric0f1(b,z)
    hypergeometric1f1(a,b,z) ...

to have a short form for some special cases.

It is possible to use the function $hgfred to do some simplification.
(One big problem will be use of asksign within the code of $hgfred).
Furthermore the derivative and the integral can be implemented.

I do not prefer to do the code for the derivative directly into the
routine of sdiff like it is done for the noun %f. I would prefer to use
the more general lookup algorithm of sdiffgrad.

But one problem is that sdiffgrad does not support functions which have
a list as an argument. I had to implement extra code in the routine
sdiffgrad to support such functions. Furthermore, we have to build the
derivative with the help of $map and $apply. The lookup routine does not
support such expressions.

Both problems can be solved and Maxima can get the derivative. This is
an example with the extended code:

(%i10) diff(hypergeometric([a1,a2,a3],[b1,b2],z),z);
(%o10) a1*hypergeometric([a1+1,a2+1,a3+1],[b1+1,b2+1],z)*a2*a3/(b1*b2)

I would like to do some further work on this topic. Perhaps we can use
the extensions of the derivative routines for further functions too.

Dieter Kaiser