Message Boards Message Boards

3
|
4912 Views
|
1 Reply
|
3 Total Likes
View groups...
Share
Share this post:

Curious behavior of EllipticF for complex-valued arguments

Posted 5 years ago

It appears that MMA produces unexpected evaluations for incomplete elliptic integrals of the first kind for complex-valued arguments. Naively speaking, one would define EllipticF for complex-valued arguments by analytically continuing its standard integral representation. However, numerical experiments (see attached file) reveal that EllipticF evaluations sometimes differ from this integral representation by an amount of 2EllipticK.

I have a hunch that MMA evaluates EllipticF for generic inputs by numerically inverting JacobiAmplitude (the latter function has period 2EllipticK, which explains the aforementioned offset), rather than adhering to a more straightforward integral representation. Is that the case?

POSTED BY: Yajun Zhou

If still somebody is looking for this problem with elliptic integrals and elliptic functions:

The implementation of the elliptic function complex including EllipticF and the JacobiNM functions is

1) buggy with the respect to complex values of the modulus k especially around k=1

2) numerically not usable in graphics routines, because of an incredible overhead in argument testing, that causes windows memory exceptions (Windows 10 8GB memory, 2023).

The reason for this error seems to be the reduction of the knowlegde of the theory of elliptic functions, e.g. Hurwitz, to the unreadable table literature, e.g. Gradshteyn/Ryzhik, to be used analogously to the trigonometic tables.

Jacobi already discarded this first attempt and instead introduced the rational field of Jacobi Theta functions, that as Fourier sums display their periodicities by formula inspection.

Especially for the JacobiAmplitude and its inverse, the EllipticF:

E.g in Gradshteyn/Ryzhik there is nothing like an indefinite integral

Integrate[  ((1-z^2)(1-k^2 z^2) )^(-1/2), z ]

In section 3.152 of definite integrals of elementary functions one finds a long table of definite integrals with fixed upper or lower limits at

{-inf,  -1/k -1 , 0, +1, +1/k,  +inf}  /; 0 < k < 1

The reason for this approach is, that the 4th order polynomial under the inverse of the square root has single zeros at +-1, +-1/k and a pole z^4 at infinity. It follows, that the integrand has cuts along the real segments. So take instead

Integrate[  (  (z^2-1) *(1-k^2 z^2) ) ^ (-1/2), z ]  /; 1 < z < 1/k 

For k>1 one makes a Landen transform

k^2 Sin[x]^2   ->  Sin[u]^2  

and gets the same elliptic integrand with 1/k^2 Sin[u]^2 and some factors, that now has a a zero at 0<k<1 instead at 1/k > 1.

For k<1 the JacobiAmplitude solves the pendulum equation for the rotating pendulum

(D[#,{t,2}]+TrigExpand[Sin[ # ]]&)[JacobiAmplitude[ \[Omega]/2 t, 4/[Omega]/2^2]] /;\[Omega] >2

In earlier implementations this worked for [Omega] <2 too. At least since vs 11 of Mathematica the JacobiAmplitude has jumps by 4 Pi at full periods. That does no harm to sin(am)=sn and cos(am)=cn in a pendulum animation graphics, but as an oscillating solution of the pendulum equation it counts the number of oscillations by jumps of 4 Pi :-)

Regards Roland Franzius

POSTED BY: Roland Franzius
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract