I'm attempting to implement an equation (for calculating magnetic forces between coils, eqs (22–24) in the linked paper) that requires the use of elliptic integrals.
Unfortunately these equations require the evaluation of the elliptic integrals far outside their standard parameter range of $0\le m\le 1$ and the numerical implementations I have available to evaluate them give inconsistent results.
I believe that Mathematica is correct in its answer:
EllipticF[ArcSin[Sqrt[1/c5]], c5] //. c5 -> 817.327 => 0.054961 - 1.17196*10^-17 i
Whereas Matlab's MuPad engine gives:
mfun('EllipticF',asin(sqrt(1/817.327)),sqrt(817.327)) => 0.054961 - 0.000707i
(Mma's function takes parameter $m=k^2$ whereas MuPad takes modulus $k$, explaining the
While I can use Mathematica for my own work, my colleagues only have Matlab available and I'd like them to be able to use this code.
I'm a pretty unfamiliar with the theory behind elliptic integrals, but Baker's ‘Elliptic Functions’ says
We shall see later on that the quantity $k^2$ [...] can always be considered real and less than unity.
Which leads me to ask: can the arguments to these elliptic integrals be re-stated in terms of an input of $k>1$, such as I seem to require above?