# Confusion regarding the incomplete elliptic integral of the first kind

I am trying to manipulate a conformal map from the half-plane to a square $z \rightarrow w(z)$ defined by:

$$w(z) = \int \limits^{z} dx \frac{1}{\sqrt{(1-x^2)x}} = \sqrt{2} \; F\left(\sqrt{z+1},\frac{\sqrt{2}}{2}\right)$$

where $F$ is the incomplete elliptic integral of the first kind according to this.

My problem is that the incomplete elliptic integral built into Mathematica as EllipticF does not seem to behave like this function, as its derivative is not singular at $z=1$ as the formula is telling us.

Proof that the Mathematica derivative is finite:

D[EllipticF[Sqrt[x + 1], Sqrt/2], x] /. x -> 1 // N


gives me

0.63491


I am very unfamiliar with these functions; is it a convention difference between the two?

(I just knew someone would ask this someday...)

I had talked (ranted?) about this issue at some length here, so I'd like you to read that first. I'll just give an executive summary here: Mathematica uses the parameter convention, while the formula you found on Wikipedia is based on the modulus convention (quickly betrayed by the comma separating the two arguments).

In fact, even the convention in the first argument is different, so EllipticF[] is not exactly the Mathematica function you want. What you need here, in Mathematica's convention, is denoted as InverseJacobiSN[]:

D[InverseJacobiSN[Sqrt[x + 1], 1/2], x] /. x -> 1 // FullSimplify
ComplexInfinity


After looking through my Schwarz-Christoffel notes, I'm not sure where the Wikipedia formula was obtained. In any case, allow me to present a short demonstration of the conventional conformal mapping between the upper half plane and a rectangle (though I cheat here and use the inverse map, JacobiSN[], in the following code):

a = 1/2; b = 1; (* 2 a × b rectangle *)
m = ModularLambda[I b/a];

{ParametricPlot[With[{w = JacobiSN[EllipticK[m] (u + I v)/a, m]},
{Re[w], Im[w]}], {u, -a, a}, {v, 0, 99 b/100},
BoundaryStyle -> AbsoluteThickness, Mesh -> 15,
MeshStyle -> {Directive[AbsoluteThickness, ColorData[97, 1]],
Directive[AbsoluteThickness, ColorData[97, 2]]},
PlotRange -> {{-5, 5}, {0, 10}}],
ParametricPlot[{u, v}, {u, -a, a}, {v, 0, 99 b/100},
BoundaryStyle -> AbsoluteThickness, Mesh -> 15,
MeshStyle -> {Directive[AbsoluteThickness, ColorData[97, 1]],
Directive[AbsoluteThickness, ColorData[97, 2]]}]}
// GraphicsRow As a check of correctness, try restricting the range of v to {0, b/2}. The mapping on the left should yield a semicircular region with radius m^(-1/4).

• P.S. You'll want to use ParametricPlot[] to visualize conformal mappings. – J. M. will be back soon Nov 1 '15 at 20:25
• @ J.M. how do you relate the integral w to the function InverseJacobiSN? Plotting them shows they are rather different. – Dr. Wolfgang Hintze Nov 2 '15 at 7:26
• @Dr. Hintze, due to branch cuts, things are a little murkier. In fact, the actual mapping function is something like Sqrt (EllipticK[1/2] - InverseJacobiSN[Sqrt[1 - x], 1/2]). – J. M. will be back soon Nov 2 '15 at 7:37
• @ J.M. In fact we have -Im[Sqrt (EllipticK[1/2]-InverseJacobiSN[Sqrt[1-z],1/2])] = f for z>=1. Hence my function f gives the complete solution for the intergal w in terms of incomplete (F) and complete (K) elliptic integrals - as I said in my answer. – Dr. Wolfgang Hintze Nov 2 '15 at 7:50
• Well, the OP uses $1-x^2$, while you use $x^2-1$; maybe that explains the discrepancy, @Dr. Hintze? – J. M. will be back soon Nov 2 '15 at 7:52

I would prefer to have consistency within the framework of Mathematica and hence start off with the original definition of your function as an integral taken here between 1 and z:

f =
Integrate[1/Sqrt[x (x^2 - 1)], {x, 1, z}, Assumptions -> z > 1]

(*
Out= -2 EllipticF[ArcSin[1/Sqrt[z]], -1] + 2 EllipticK[-1]
*)


This is obviously different from the result you quote from Wikipedia. Hence the validity of the latter should be clarified first.

• It seems that there's a confusion in the definitions, as J.M. has just pointed out. – Dr. Wolfgang Hintze Nov 1 '15 at 20:17
• This might be of interest. – J. M. will be back soon Nov 2 '15 at 8:05