In the context of sums over Legendre polynomials ((1), (2)) I stumbled upon the interesting hypergeometric function AppellF1[]
.
Unfortunately, the implementation in Mathematica appears to have difficulties when it comes to numerical evaluation, including plots.
This behaviour spoils to a large degree the "success" of having obtained closed form expressions.
I would consider this a bug.
$Version
(* Out[2944]= "10.1.0 for Microsoft Windows (64-bit) (March 24, 2015)" *)
$$\\$$
Example 1: Plot3D
, real arguments
As a compact example, consider this plotting command
Plot3D[{Re[AppellF1[-(1/2), -(1/2), -(1/2), 1/2, x, y]],
Im[AppellF1[-(1/2), -(1/2), -(1/2), 1/2, x, y]]}, {x, -1, 1}, {y, -1, 1}]
We see that the "corners" are cut out despite the fact that AppellF1[]
is well defined for Abs[x] < 1
and Abs[y] < 1
.
$$\\$$
Example 2: numerical value at a specific points
2a. What is the numerical value of this expression (which appears naturally in the summation problem mentioned in the beginning)
AppellF1[-(1/2), -(1/2), -(1/2), 1/2, E^((2 I π)/3),
E^(-((2 I π)/3))] // N
(* Out[2973]= AppellF1[-0.5, -0.5, -0.5, 0.5, -0.5 + 0.866025 I, -0.5 - 0.866025 I]
$$\\$$
2b. Particular results in the "buggy" region of Plot3D
AppellF1[-(1/2), -(1/2), -(1/2), 1/2, 0.9, 0.9] // N
(* Out[3091]= 1.9 *)
There seems to be no problem.
Generally, these special cases do not have difficulties
AppellF1[-(1/2), -(1/2), -(1/2), 1/2, x, x] // FullSimplify
(* Out[3093]= 1 + x *)
AppellF1[-(1/2), -(1/2), -(1/2), 1/2, x, -x] // FullSimplify
(* Out[3094]= Hypergeometric2F1[-(1/2), -(1/4), 3/4, x^2] *)
But consider this case with x = 0.9 and y = 0.8:
AppellF1[-(1/2), -(1/2), -(1/2), 1/2, 0.9, 0.8] // N
(* Out[3119]= AppellF1[-0.5, -0.5, -0.5, 0.5, 0.9, 0.8] *)
Here no numerical value is returned.
Whereas, e.g.
AppellF1[-(1/2), -(1/2), -(1/2), 1/2, 0.5, 0.6] // N
(* 1.55065 *)
$$\\$$
Example 3a: Plot
This plot takes about 5 minutes on my PC:
Plot[Re[AppellF1[-(1/2), -(1/2), -(1/2), 1/2, E^(I θ),
E^(-I θ)] /. {d -> 1/2}], {θ, 0, 2 π}]
Notice the numerical difficulties close to the ends of the interval and the broad gap in the middle.
Example 3b: ListLinePlot
The coarse-grained alternative is
Table[{θ,
AppellF1[-d, -(1/2), -(1/2), 1 - d, E^(I θ),
E^(-I θ)] /. {d -> 1/2}}, {θ, 0, 2 π, π/10}];
Chop[N[%], 10^-5]
(* Out[2993]= {{0, 2.}, {0.314159, 1.90825}, {0.628319,
1.7056}, {0.942478, 1.44035}, {1.25664, 1.14516}, {1.5708,
0.847213}, {1.88496, 0.569869}, {2.19911, 0.332818}, {2.51327,
0.151856}, {2.82743,
AppellF1[-0.5, -0.5, -0.5,
0.5, -0.951057 + 0.309017 I, -0.951057 - 0.309017 I]}, {3.14159,
0}, {3.45575,
AppellF1[-0.5, -0.5, -0.5,
0.5, -0.951057 - 0.309017 I, -0.951057 + 0.309017 I]}, {3.76991,
0.151856}, {4.08407, 0.332818}, {4.39823, 0.569869}, {4.71239,
0.847213}, {5.02655, 1.14516}, {5.34071, 1.44035}, {5.65487,
1.7056}, {5.96903, 1.90825}, {6.28319, 2.}} *)
ListLinePlot[%]
The numerical chopping takes a few minutes before we can ListLinePlot
the list.
We can see that the gap in the middle of the graph is caused by non evaluated functions AppellF1
.
$$\\$$
Some definitions (cf. (3))
Series representation
$$F1(a,b_1,b_2,c,x,y) = \sum _{m=0}^{\infty } \sum _{n=0}^{\infty }\frac{ (a)_{m+n} }{(c)_{m+n}} (b_1)_m (b_2)_n \frac {x^m}{m!} \frac {y^n}{n!} $$
Sum[
Pochhammer[a, m + n]/
Pochhammer[c, n + m] Pochhammer[b1, m] Pochhammer[b2, n] x^m/m! y^n/
n!, {m, 0, ∞}, {n, 0, ∞}]
(* Out[2843]= AppellF1[a, b1, b2, c, x, y] *)
Integral representation ((3) formula (9))
$$F1(a,b_1,b_2,c,x,y) = \frac{\Gamma (c)}{\Gamma (a) \Gamma (c-a)} \int_0^1 t^{a-1} (1-t)^{-a+c-1} (1-t x)^{-b_1} (1-t y)^{-b_2} \, dt$$
fctF1[a_, b1_, b2_, c_, x_, y_] :=
Gamma[c]/(Gamma[a] Gamma[c - a])
Integrate[
t^(a - 1) (1 - t)^(c - a - 1) (1 - x t)^-b1 (1 - t y)^-b2, {t, 0,
1}]
References
(2) Summation of Legendre polynomials related to the zeta function
(3) http://mathworld.wolfram.com/AppellHypergeometricFunction.html