It was originally asked here.
According to About the confluent versions of Appell Hypergeometric Function and Lauricella Functions the integral
$$\int_0^1t^{a-1}(1-t)^{c-a-1}(1-xt)^{-b}e^{yt}~dt $$
can be expressed as
$$\int_0^1t^{a-1}(1-t)^{c-a-1}(1-xt)^{-b}e^{yt}~dt=\dfrac{\Gamma(a)\Gamma(c-a)}{\Gamma(c)}\lim\limits_{k\to\infty}F_1\left(a,b,k,c;x,\dfrac{y}{k}\right).$$
It look like true, but gives numeric error. Look that, calculated by Mathematica:
F[a_?NumericQ, b_?NumericQ, c_?NumericQ, x_?NumericQ, y_?NumericQ] :=
NIntegrate[t^(a - 1) (1 - t)^(c - a - 1) (1 - x t)^(-b) Exp[ y t], {t, 0, 1}]
N[F[3/2, 1, 2, .4, .3], 20]
{2.8964403550198865`}
G[a_?NumericQ, b_?NumericQ, c_?NumericQ, x_?NumericQ, y_?NumericQ] :=
Gamma[a] Gamma[c - a]/Gamma[c] Limit[AppellF1[a, b, k, c, x, y/k],k -> Infinity]
N[G[3/2, 1, 2, .4, .3], 20]
{2.2854650559595466`}
where I was careful to ensure that $|x|<1,|y|<1$, and $\text{Re}(c)>\text{Re}(a)>0$, which are the condition of $F_1$.Note that the results are different. Furthermore, according to Wolfram Alpha
$$\lim\limits_{k\rightarrow \infty}F_1[3/2,1,k;2;0.4,\text{any/k}]=1.4549$$
So, is It a math issue or Mathematica issue?
Answer
There is a bug in the calculation of the large $k$ limit of AppellF1
. This is easy to illustrate:
Needs["NumericalCalculus`"]
wrongLimit = Limit[AppellF1[3/2, 1, k, 2, 4/10, (3/10)/k], k -> Infinity];
correctLimit = NLimit[AppellF1[3/2, 1, k, 2, 4/10, (3/10)/k], k -> Infinity];
Plot[{AppellF1[3/2, 1, k, 2, 4/10, (3/10)/k], wrongLimit, correctLimit}, {k, .5, 5}
, PlotStyle -> {Blue, Directive[Red, Dashed], Directive[Green, Dashed]}, PlotRange -> {Automatic, {0, 3}}]
Perhaps the bug should be reported. In the meantime, you can use NLimit
to get the correct limit. If you use NLimit
in your definition of G
, you get results that consistent with those of F
(up to numerical inaccuracy).
Comments
Post a Comment