Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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

 Messages: [ Previous | Next ]
 clicliclic@freenet.de Posts: 1,245 Registered: 4/26/08
Re: Bug in Jacobian Amplitude?
Posted: Apr 5, 2013 12:26 AM

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.

Date Subject Author
4/2/13 did
4/2/13 Nasser Abbasi
4/2/13 did
4/2/13 clicliclic@freenet.de
4/3/13 did
4/4/13 clicliclic@freenet.de
4/4/13 Waldek Hebisch
4/5/13 clicliclic@freenet.de
4/5/13 did
4/6/13 clicliclic@freenet.de
4/7/13 Waldek Hebisch
4/8/13 clicliclic@freenet.de
4/8/13 Waldek Hebisch
4/9/13 clicliclic@freenet.de
4/13/13 clicliclic@freenet.de
4/8/13 Axel Vogt
4/3/13 Joe keane