
Re: Bug in Jacobian Amplitude?
Posted:
Apr 4, 2013 12:02 PM


did schrieb: > > On Tuesday, 2 April 2013 19:48:53 UTC+2, clicl...@freenet.de wrote: > > > > The Mathematica and Maple answers are closely related: Re1 = pi  Re2, > > Im1 =  Im2. This function has infinitely many branch points, and the > > two systems appear to prefer different branches. However, I am having > > trouble with the verification on Derive: > > > > ELLIPTIC_F(phi, m) := INT(1/SQRT(1  m*SIN(t_*phi)^2), t_, 0, 1) > > > > ELLIPTIC_F(1.3306295147276587227  0.883132539714220814*#i, 3/4) > > > > 0.99660789047167089453  0.36927172197460334749*#i > > > > This integral doesn't look like 1 + 2*#i. What is wrong here? > > > > Along the same linear integration path from 0 to the Maple value, the > > integrand passes though a branch cut of the square root, and I haven't > > tried to work around this. > > > > Of course I expected a problem with > branch cut. From my Byrd & Friedman > I tried the (supposed) two equivalent definitions: > > N[JacobiAmplitude[1+I*2, 3/4], 20] > 1.3306295147276587227  0.8831325397142208140 I > > N[ArcTan[JacobiCN[1+I*2, 3/4] , JacobiSN[1+I*2, 3/4]], 20] > 1.8109631388621345158 + 0.8831325397142208140 I > > and the Maple equivalent: > evalf(JacobiAM(1+I*2,sqrt(3/4)),20); > evalf(arctan(JacobiSN(1+I*2,sqrt(3/4)),JacobiCN(1+I*2,sqrt(3/4))),20); > 1.8109631388621345158 + 0.88313253971422081406 I > 1.8109631388621345158 + 0.88313253971422081409 I > > So Maple is consistent and matches MMA second > expression. Why MMA should have a different > definition of JacobiAmplitude? But, why it seems > OK for other values? e.g. > N[JacobiAmplitude[1 + I/2, 3/4], 20] > 0.94644250288672303746 + 0.36465966602260927458 I > N[ArcTan[JacobiCN[1 + I/2, 3/4], JacobiSN[1 + I/2, 3/4]], 20] > 0.94644250288672303746 + 0.36465966602260927458 I >
So Maple seems to use the full range pi < Re(am) <= pi for the angle am, in accordance with am(u, k) = arctan(sn(u, k), cn(u, k)), whereas Mathematica seems to map the angle am into the range pi/2 < Re(am) <= pi/2, in accordance with am(u, m) = arctan(sn(u, m)/cn(u, m)).
Meanwhile I have succeeeded to verify two of your am values :)  a prefactor phi had been missing in front of my integral:
ELLIPTIC_F(phi, m) := phi*INT(1/SQRT(1  m*SIN(t_*phi)^2), t_, 0, 1)
ELLIPTIC_F(1.3306295147276587227  0.883132539714220814*#i, 3/4)
1  1.3715007096251920858*#i
ELLIPTIC_F(0.94644250288672303746 + 0.36465966602260927458*#i, 3/4)
1 + 0.5*#i
But I am still having trouble with the imaginary part in the first example! :(
Martin.

