Re: Complex path integral wrong

*To*: mathgroup at smc.vnet.net*Subject*: [mg131413] Re: Complex path integral wrong*From*: Murray Eisenberg <murray at math.umass.edu>*Date*: Wed, 3 Jul 2013 22:00:01 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: l-mathgroup@wolfram.com*Delivered-to*: mathgroup-outx@smc.vnet.net*Delivered-to*: mathgroup-newsendx@smc.vnet.net*References*: <kqomj6$p76$1@smc.vnet.net> <20130701095219.0C6426ABC@smc.vnet.net> <20130703085926.62AE76A91@smc.vnet.net>

The example Hypergeometric2F1[1/2, 1/2, 1, z] reduces to (2/Pi) EllipticK[z]. And plotting the imaginary part alone will reveal the branch cut. (It's a bit harder to see what's happening on a plot of the real part.) In any case, I thought the original question arose from integrating around a contour that missed the real axis entirely. And that the error was seen already in integrating along the line segment from 1 + I to 1 + 3Pi I, which is parallel to the real axis. So I don't see why that branch cut should affect the integral there. On Jul 3, 2013, at 4:59 AM, Dr. Wolfgang Hintze <weh at snafu.de> wrote: > Am Dienstag, 2. Juli 2013 06:30:05 UTC+2 schrieb Murray Eisenberg: >> Hmm.. Documentation Center page on Hypergeometric2F1 says: >> >> >> >> "Hypergeometric2F1[a, b, c, z] has a branch cut discontinuity >> >> in the complex z plane running from 1 to Infinity." >> >> >> >> Page >> >> = http://functions.wolfram.com/HypergeometricFunctions/Hypergeometric2F1/04/02/ >> >> says: >> >> >> >> "[Hypergeometric2F1[a, b, c, z]] is an analytical function of a, b, c, and z >> >> which is defined on C^4" >> >> >> >> Hence for fixed a, b, and c, that implies it is analytic as a function of z on the complex plane. >> >> >> >> Which is it? >> >> >> >> On Jul 1, 2013, at 5:52 AM, Kevin J. McCann <kjm at kevinmccann.com> wrote: >> >> >> >>> A followup on my earlier reply. >> >>> >> >>> If I compare the analytical and numerical results from Mathematica, the >> >>> discrepancy occurs on the first leg of the integration >> >>> (1+I -> 1+I R). It is clear that the numerical integration is correct. >> >>> >> >>> Could this be some kind of branch cut issue with the hypergeometric >> >>> function evaluation? >> >>> >> >>> Kevin >> >>> >> >>> On 6/30/2013 3:26 AM, Dr. Wolfgang Hintze wrote: >> >>>> I suspect this is a bug >> >>>> In[361]:= $Version >> >>>> Out[361]= "8.0 for Microsoft Windows (64-bit) (October 7, 2011)" >> >>>> >> >>>> The follwing path integral comes out wrong: >> >>>> >> >>>> R = 3 \[Pi] ; >> >>>> Integrate[Exp[I s]/( >> >>>> Exp[s] - 1 ), {s, 1 + I, 1 + I R, -1 + I R, -1 + I, 1 + I}] // FullSimplify >> >>>> >> >>>> Out[351]= 0 >> >>>> >> >>>> It should have the value >> >>>> >> >>>> In[356]:= (2 \[Pi] I) Residue[Exp[I s]/(Exp[s] - 1 ), {s, 2 \[Pi] I}] >> >>>> >> >>>> Out[356]= (2 \[Pi] I) E^(-2 \[Pi]) >> >>>> >> >>>> Without applying FullSimplify the result of the integration is >> >>>> >> >>>> In[357]:= R = 3*Pi; >> >>>> Integrate[ >> >>>> Exp[I*s]/(Exp[s] - 1), {s, 1 + I, 1 + I*R, -1 + I*R, -1 + I, 1 + I}] >> >>>> >> >>>> Out[358]= >> >>>> I*E^((-1 - I) - 3*Pi)*((-E)*Hypergeometric2F1[I, 1, 1 + I, -(1/E)] + >> >>>> E^(3*Pi)*Hypergeometric2F1[I, 1, 1 + I, E^(-1 + I)]) + >> >>>> I*E^(-I - 3*Pi)*(Hypergeometric2F1[I, 1, 1 + I, -(1/E)] - >> >>>> E^(2*I)*Hypergeometric2F1[I, 1, 1 + I, -E]) + >> >>>> I*E^I*(Hypergeometric2F1[I, 1, 1 + I, -E]/E^(3*Pi) - >> >>>> Hypergeometric2F1[I, 1, 1 + I, E^(1 + I)]/E) + >> >>>> I*E^(-1 - I)*(-Hypergeometric2F1[I, 1, 1 + I, E^(-1 + I)] + >> >>>> E^(2*I)*Hypergeometric2F1[I, 1, 1 + I, E^(1 + I)]) >> >>>> >> >>>> which, numerically, is >> >>>> >> >>>> In[359]:= N[%] >> >>>> >> >>>> Out[359]= -2.7755575615628914*^-17 + 2.7755575615628914*^-17*I >> >>>> >> >>>> i.e. zero. >> >>>> >> >>>> On simpler functions like 1, s and s^2 (instead of Exp[I s]) it works out fine, but not so with e.g. Sin[s] in which case we get 0 again (instead of Sinh[2 \[Pi]]). >> >>>> >> >>>> The integration topic seems to be full of pitfalls in Mathematica... >> >>>> >> >>>> Best regards, >> >>>> Wolfgang >> >>>> >> >> >> >> --- >> >> Murray Eisenberg murray at math.umass.edu >> >> Mathematics & Statistics Dept. >> >> Lederle Graduate Research Tower phone 413 549-1020 (H) >> >> University of Massachusetts 413 545-2838 (W) >> >> 710 North Pleasant Street fax 413 545-1801 >> >> Amherst, MA 01003-9305 > > A plot reveals that Mathematica's Hypergeometric2F1 in general has is a cut on the real axis from +1 to +oo as it should be: > > f = Hypergeometric2F1[1/2, 1/2, 1, z]; > Plot3D[Re[f /. {z -> x + I y}], {x, 0, 2}, {y, -1, 1}] > Plot3D[Im[f /. {z -> x + I y}], {x, 0, 2}, {y, -1, 1}] > > Best regards, > Wolfgang --- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2838 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305

**References**:**Re: Complex path integral wrong***From:*"Kevin J. McCann" <kjm@KevinMcCann.com>

**Re: Complex path integral wrong***From:*"Dr. Wolfgang Hintze" <weh@snafu.de>