6

The built-in AppellF1 function seems generally useless. For example,

AppellF1[3/4, 1/2, 1/2, 7/4, (7 + 4 Sqrt[3]), (7 - 4 Sqrt[3])]

hangs indefinitely on my system. For the curious, this particular instance can be naturally encountered in the parameterization of minimal surfaces, for example,

\[Theta] = 38.014773989108068108 \[Pi]/180;
f = Function[z, E^(I \[Theta])/Sqrt[1 - 14 z^4 + z^8]];
g = Function[z, z];
\[Phi]k = Function[z, f[z] { 1 - g[z]^2, I (1 + g[z]^2), 2 g[z]}];
xk = Function[z, 
   Evaluate[Re[(\[Integral]\[Phi]k[w] \[DifferentialD]w)]] /. w -> z];

Many of the examples in the Wolfram documentation seem to suggest that Mathematica can deal competently with this function's asymptotes, but that contradicts my personal experience.

Mathworld mentions the following (nearly) globally convergent double contour integral:

enter image description here

which I believe should work for all complex values that aren't exactly negative real numbers, but even when specifying complex parameters and taking care to avoid any with principal argument exactly equal to pi, Mathematica still almost always hangs.

Plotting the function outside of anything but the most restrictive domains (painstakingly delineated via trial and error over the course of dozens of kernel quits) is obviously out of the question.

Is there any way to get anything resembling reasonable use out of this function, or a general way around using it?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Nickolas
  • 121
  • 4
  • ComplexPlot[ AppellF1[3/4, 1/2, 1/2, 7/4, 7 + 4 Sqrt[3], z], {z, -2 - 2*I, 2 + 2*I}]' results in approximately 10 minutes. – user64494 Feb 28 '21 at 09:15
  • Please report this to Support. On the other hand, adapting the technique from this answer to your situation gives the approximate result 0.24965918263 + 0.55132465617 I corresponding to AppellF1[3/4, 1/2, 1/2, 7/4, 7 + 4 Sqrt[3], 7 - 4 Sqrt[3]]. (This is not an answer, because the method is not completely reliable for all argument ranges where you seem to be interested in for your gyroid – J. M.'s missing motivation Feb 28 '21 at 09:46
  • @user64494 AppellF1[3/4, 1/2, 1/2, 7/4, (7 + 4 Sqrt[3]), (7 - 4 Sqrt[3])] is definitely within that range, and yet on my system, Mathematica simply hangs on that single function evaluation -- I let it run for over an hour before killing it. – Nickolas Feb 28 '21 at 09:48
  • 1
    Can you specify which version of Mathematica and operating system you are using, please? – mikado Feb 28 '21 at 09:50
  • @mikado Mathematica 12.2 on Windows 10. – Nickolas Feb 28 '21 at 09:58
  • In 12.2 on Windows 10 Pro N[AppellF1[3/4, 1/2, 1/2, 7/4, N[(7 + 4 Sqrt[3])], N[(7 - 4 Sqrt[3])]]] // AbsoluteTiming produced {2064.76, AppellF1[0.75, 0.5, 0.5, 1.75, 13.9282, 0.0717968]. Screen on demand. – user64494 Feb 28 '21 at 12:32
  • @user64494 So your Mathematica chugged for 30+ minutes and returned an unevaluated symbolic expression? (The output of N[AppellF1] should be a number, not a symbolic reference to a particular unevaluated instance of the AppellF1 function.) – Nickolas Mar 04 '21 at 12:13
  • From Wolfram Technical Support: "It does appear that AppellF1 is not behaving properly. I have forwarded an issue report to our developers with the information you provided. We hope that this issue will be resolved in future versions of Mathematica." – Nickolas Mar 10 '21 at 02:42

0 Answers0