4

I have very long symbolic expressions, which I have to evaluate numerically later on. They contain the AppellF1 function, which stays unevaluated for the specific numerical arguments I need. So for example:

AppellF1[0.75,2.,2.,1.75,-1.,-1.]

does produce an actual output, but not for -- say --

AppellF1[0.75,2.,2.,1.75,-1.,-0.9]

To this end I have implemented the integral representation of this guy:

NumAppell[a_, b1_, b2_, c_, x_?NumericQ, y_?NumericQ] := 
 NumAppell[a, b1, b2, c, x, y] = 
  Gamma[c]/(Gamma[a] Gamma[c - a]) NIntegrate[
    t^(a - 1) (1 - t)^(c - a - 1) (1 - x t)^-b1 (1 - t y)^-b2, {t, 0, 
     1}, Method -> {Automatic, "SymbolicProcessing" -> False}]

This does evaluate fairly quickly:

NumAppell[0.75,2.,2.,1.75.,-1.,-0.9]//AbsoluteTiming
(*{0.012481, 0.374778}*)

As you can see, on my machine it takes around $10^{-2} s$. Yet even this is too slow for me.

Can you suggest an other way which is at least an order of magnitude faster than this? Or even an external integrator package for this sort of problem?

xzczd
  • 65,995
  • 9
  • 163
  • 468
dzsoga
  • 341
  • 1
  • 8

0 Answers0