Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.symbolic.independent

Topic: Bug in Jacobian Amplitude?
Replies: 16   Last Post: Apr 13, 2013 1:35 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
clicliclic@freenet.de

Posts: 995
Registered: 4/26/08
Re: Bug in Jacobian Amplitude?
Posted: Apr 5, 2013 12:26 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Waldek Hebisch schrieb:
>
> did <didier.oslo@hotmail.com> wrote:

> >
> > 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

>
> This definition is suboptimal, because it forces discontinuity
> on real line. The definition I recall were continuous
> (increasing) on real line.


And indeed that's what is shown in a Mathematica (I hope) graph

Plot[JacobiAmplitude[x, 2/3], [x, -4, 4]]

on the Mathematica (I hope) documentation page

<http://reference.wolfram.com/mathematica/ref/JacobiAmplitude.html>

>
> In[4]:= N[Cos[JacobiAmplitude[1+I*2, 3/4]], 20]
>
> Out[4]= -0.33681033299005352886 - 0.97371595177876063808 I
>
> In[5]:= N[JacobiAmplitude[1+I*2, 3/4], 20]
>
> Out[5]= 1.3306295147276587227 - 0.8831325397142208140 I
>
> In[6]:= N[Cos[1.3306295147276587227 - 0.8831325397142208140*I], 20]
>
> Out[6]= 0.336810332990053529 + 0.973715951778760638 I


Beautiful! These six lines nail down a glaring Mathematica bug - a
discrepancy in the numerical evaluation of nested functions. Some plots
might help reveal if the problem is perhaps specific to nonzero Im[x]
and/or m = 3/4:

Plot[JacobiAmplitude[x, 2/3], [x, -4, 4]]
Plot[JacobiAmplitude[x+2*I, 2/3], [x, -4, 4]]
Plot[JacobiAmplitude[x, 3/4], [x, -4, 4]]
Plot[JacobiAmplitude[x+2*I, 3/4], [x, -4, 4]]

etc. etc.

Martin.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.