Computing the inverse Jacobi function $\mathrm{arccd}$ with elliptic integrals According to page 42 of 1, $\operatorname{arccd}(x, k)=F\left(\arcsin\left(\sqrt{\frac{1 - x^2}{1 - k^2x^2}}\right), k\right)$, where $F(\phi, k)=\int_0^\phi \frac{dt}{\sqrt{1 - k^2\sin^2t^2}}$, and $\mathrm{arccd}$ is the inverse of the $\mathrm{cd}$ Jacobi elliptic function.
To compute this I have access to a function $F_2(\phi|m)=\int_0^\phi \frac{dt}{\sqrt{1 - m\sin^2t^2}}$ (2). I then figure that $F_2\left(\arcsin\left(\sqrt{\frac{1 - x^2}{1 - mx^2}}\right)\bigg| m\right)$ should work. It does for many values, but $\operatorname{cd}(\operatorname{arccd}(0.2 + i, 0.1 - 0.3i), 0.1 - 0.3i)$, which should return $0.2 + i$, instead returns $-0.2 - i$. Why could this be?
 A: As you can see from your formulas, $\mathrm{arccd}(x,k)$ is defined in [1] as an even function of $x$. This is not quite compatible with being the inverse function of $\mathrm{cd}(x,k)$, which is also even. For instance, we would like to write
\begin{align}
\mathrm{cd}(\mathrm{arccd}(x,k))=x,\tag{1}
\end{align}
but thanks to the parity we should also have
\begin{align}
\mathrm{cd}(\mathrm{arccd}(x,k))=\mathrm{cd}(\mathrm{arccd}(-x,k))=-x.\tag{2}
\end{align}
The seeming contradiction between (1) and (2) is due to the fact that to have (1) the map $\mathrm{cd}$ should be a bijection. This will be okay (mod periods) if, say, $x>0$ but will not work for $x\in\mathbb{R}$. In other words, the formula $\mathrm{arccd}(x,k)=F(\cdot)$ cannot be consistent with (1) for arbitrary $x$.

Maybe a simpler example. Take instead of $\mathrm{cd}$ the even function $\cos x$. The analog of your formula from page 42 will be the definition of $\arccos x$ as being $\arcsin \sqrt{1-x^2}$ (again even). And we will have the same problems as above. 
