Abramowitz & Stegun 17.4.18 gives the following formula for $E(u, -m)$:

$$ E(u,-m) = (1+m)^{1/2} \{E(u(1+m)^{1/2},m(m+1)^{-1}) - m(1+m)^{-1/2} \mathrm{sn}(u(1+m)^{1/2}, m(1+m)^{-1})\; \mathrm{cd}(u(1+m)^{1/2}, m(1+m)^{-1}) \}. $$

However, a quick Mathematica test does not seem to verify this relationship:

u = RandomReal[]; m = RandomReal[]; a = u Sqrt[1 + m]; b = m / (m + 1);

Sqrt[1 + m] (EllipticE[a, b] - m / Sqrt[1 + m] JacobiSN[a, b] JacobiCD[a, b])
EllipticE[u, -m]

>>> 0.136459
>>> 0.214315 + 0. I

Does anyone know the correct equation, or have I made an error somewhere?

  • 1
    $\begingroup$ Common mistake with Mathematica Elliptic functions. The first argument to EllipticE is $\phi$. So to get $E(u,m)$ you need to use $\texttt{EllipticE[JacobiAmplitude[u,m],m]}$. $\endgroup$ – Somos Oct 7 '17 at 18:54
  • $\begingroup$ @Somos, thanks for the reply. I still can't get it working, however; do you have a MWE that I could use? $\endgroup$ – emprice Oct 7 '17 at 19:00
  • $\begingroup$ Compare with NIST 19.7.5 equation for $E(\phi,ik)$ $\endgroup$ – Somos Oct 7 '17 at 19:31


test[u_,m_] := Module[{s, a, b}, s = Sqrt[1 + m]; a = u s; b = m/(1 + m);
{ s EllipticE[JacobiAmplitude[a, b], b] - 
    m / s JacobiSN[a, b] JacobiCD[a, b],
  EllipticE[JacobiAmplitude[u, -m], -m] }];
  • $\begingroup$ Thanks! I think you stumbled on a correction to the formula at the same time as showing me the difference between $u$ and $\phi$... The whole thing would have been multiplied by $s$ according to what's in the book, but this way actually works. $\endgroup$ – emprice Oct 7 '17 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.