Numeric evaluation of inverse Jacobi elliptic functions is wrong for some inputs. For example,
(%i6) jacobi_dn(float(inverse_jacobi_dn(-2, 3)), 3); (%o6) 2.0000000000000004 - 2.4980018054066022e-16 %i
is clearly wrong; it should be -2, as you can see with the symbolic simplification:
(%i1) jacobi_dn(inverse_jacobi_dn(-2, 3), 3); (%o1) - 2
The reason for this problem is that
inverse_jacobi_dn is computed as
inverse_jacobi_dn(u, m)=elliptic_f(asin(sqrt((1 - u^2)/m)), m). Since that function is even in
inverse_jacobi_dn(-2, 3)=inverse_jacobi_dn(2, 3), which is wrong. It should be computed in some other way.
Presumably this problem will also cause errors with some of the other inverse Jacobi functions, since I think some are defined in terms of
inverse_jacobi_dn for numeric evaluation.
Log in to post a comment.