[Anfang] [Hauptseite] [Suchen] [LDFM]
I need work with the Jacobian elliptic functions. In Maple they are given by the functions:
JacobiSN(x,k), JacobiCN(x,k) etc.....
Unfortunately using this function I get results which do not agree with the results given by library functions of different authors (for example, the Numerical Recipes or the IMSL). Drawing the numerical results given by Maple V version 6 they have not good aspect.
Please, would anybody tell me if these functions have been tested?
Rob Corless (20.12.00)
Indeed they have been tested. The numerical evaluation is done by ascending Landen transformations (the arithmetic-geometric mean algorithm).
IMSL is a good source, but as most people are aware, the codes in Numerical Recipes do not have a good reputation for robustness or accuracy.
Please give more details---for which values of x and k are the functions "wrong"? For example, here are some values for which they are right:
> alias(sn=JacobiSN,cn=JacobiCN,dn=JacobiDN,am=JacobiAM);
sn, cn, dn, am
> zero := (x,k) -> evalf(sn(x,k)^2*k^2 + dn(x,k)^2-1);
2 2 2
zero := (x, k) -> evalf(sn(x, k) k + dn(x, k) - 1)
> zero(0.3,0.5);
-9
-.1 10
> zero(-0.001,0.999);
-9
-.6 10
> Digits := 50;
Digits := 50
> z := rand()/Float(1,12) + I*rand()/Float(1,12);
z := .427419669081 + .321110693270 I
> k := rand()/Float(1,12);
k := .343633073697
> zero(z,k);
-49 -50
-.5 10 - .5 10 I
Further, taking 80 terms of the Taylor series for sn(x,k) gives us the same value of sn(z,k), to 50 places.
Remember that there are two conventions in the literature for the Jacobian elliptic functions, regarding the use of k versus the use in Abramowitz & Stegun of m=k^2 (this is less useful---see the book by D. F. Lawden).
You may be running into that. Or, perhaps you have found values of x or k for which the Maple code really does fail---without more details, it is impossible to tell.
Alain Goriely (2.1.01)
I stongly believe that the Jacobi Elliptic functions are wrong indeed in Version 6.0.
A couple years ago, I wrote a paper in classical mechanics and we produced a lot of graphs with Maple 5.1 using elliptic and Jacobi functions (we checked them independently).
Recently, I tried to use the same program with Maple 6.0 and got completely wrong results.
For instance (the example form the help menu) in Maple 5.1
JacobiSN(1.0,(0.5));
.8226355779
This is the right result (verified with Mathematica 4 (that uses JacobiSN(x,m=k^2) and not JacobiSN(x,k)):
Mathematica 4: JacobiSN[1.0, 0.5^2] =0.822636
BUT in Maple 6.0
JacobiSN(1.0,(0.5));
.9219859263
The error is in the JacobiAM function (all the other Jacobi functions are simple trig combination of it and therefore the test of Robert Corless: sn^2+dn^2=1 is just a test on the trig functions not on the Jacobi).
According to the help menu (and the theory of Elliptic functions) the JacobiAM should satisfy
JacobiAM(EllipticF(sin(phi),k),k) = phi
it works fine in (Maple 5.1):
> JacobiAM(EllipticF( sin(1.23456789),0.5),0.5);
1.234567890
BUT IN MAPLE 6.0
JacobiAM(EllipticF(sin(1.23456789),0.5),0.5);
1.368202834
At first I suspected a simple error between k and k^2 (the two most used parameters for sn and cn) but one can check that
fsolve(JacobiAM(EllipticF(sin(1.23456789),k),0.5)-1.23456789,k=0..1);
has no root. So the error is not in the choice of parameter. As far as I can tell the EllipticF and others are fine.
THIS IS A VERY SERIOUS MISTAKE for anybody using Maple for professional purpose.
IT SHOULD BE FIXED AS SOON AS POSSIBLE. We pay a lot of money for upgrades that have nice GUI and other functions but the stability of Maple for the evaluation of elementary and special functions is a cornerstone of its power and use.
I hope that somwhow I am wrong and made a trivial mistake. In any cases, Maple should be consistent with its own help page.
J. Pelaez (2.1.01)
The problem seems associated to the version 6.0. In the version 6.01 there are not similar problems.
In the version 6.0, if you plot the functions sn(x,m),cn(x,m), dn(x,m) for x in [0,1] and m=sin^2(alpha)=1/2, you get a very big different picture than the similar picture shown in classical book, like the Abramowitz & Stegun one.
Chris Eilbeck (9.1.01)
This seems to be OK on my Sun (Unix) workstation (in Maple 6.0) :
> JacobiSN(1.0,(0.5));
.8226355779
> JacobiAM(EllipticF(sin(1.23456789),0.5),0.5);
1.234567890
Willard, Daniel Dr (11.1.01)
| Prof. Alain Goriely wrote: ...
I second the author's last sentence in particular.
Heike Koch-Beuttenmueller (17.1.01)
| Prof. Alain Goriely wrote: ...
It is corrected in Maple6.01:
|\^/| Maple 6 (DEC ALPHA UNIX)
._|\| |/|_. Copyright (c) 2000 by Waterloo Maple Inc.
\ MAPLE / All rights reserved. Maple is a registered trademark of
<____ ____> Waterloo Maple Inc.
| Type ? for help.
> JacobiAM(EllipticF( sin(1.23456789),0.5),0.5);
1.234567890
> JacobiSN(1.0,(0.5));
.8226355779
> interface(version);
TTY Iris, Maple 6.01, DEC ALPHA UNIX, Jun 9 2000 Build ID 79514
[Anfang] [Hauptseite] [Suchen] [LDFM]