Show that $K=K'$ if and only if $k=(\sqrt{2}-1)^2$ (Ahlfors) In Ahlfors' Complex Analysis text, page 240, he defines the following two integrals: $$K=\int_{-1}^1 \frac{dt}{\sqrt{(1-t^2)(1-k^2 t^2)}}, $$ 
$$K'=\int_1^{1/k} \frac{dt}{\sqrt{(t^2-1)(1-k^2t^2)}}. $$
Here $0<k<1$ is a parameter. I want to prove that 

$K=K'$ iff $k=(\sqrt{2}-1)^2$

My attempts:


*

*going "from left to right"


I've expanded $K$ as a power series in $k$:
$$K=\pi \sum_{n=0}^\infty \left[\frac{(2n)!}{2^{2 n} (n!)^2}\right]^2 k^{2n}$$
and I thought trying to do the same for $K'$. Then I realized that this probably won't get me anywhere...
I've also plotted both functions, and it appears that $K$ is increasing with $k$, while $K'$ is decreasing. Although I couldn't prove rigorously that $K'$ is decreasing, this shows that only one solution for $k$ is possible.


*

*going "from right to left"


I have no clue, I guess I should come up with a clever change of variables in the second integral, but I can't find it.
Any help is appreciated!
 A: Here's one way of doing this. Set $t=\sqrt{u}=1/\sqrt{v}$, and $l=k^2$, so
that the integrals become
$$ \int_0^1 \frac{du}{\sqrt{u(1-u)(1-l u)}}, \qquad \frac12\int_l^1 \frac{dv}{\sqrt{v(1-v)(v-l)}}, $$
so look for a change of variable that will bring the second integral to the form of the first. 
The integrand has three singular points, $v=0,1,l$, and the limits are $l$ and $1$, so first look at a fractional-linear transformation $v=\frac{a+bx}{c+dx}$ that will map $1\mapsto1$ and $l\mapsto0$. This is because every automorphism of the complex plane has this form, so this is a natural transformation to look at when trying to map specific points to specific points. The integrand becomes
$$ \frac{(bc-ad)\,dx}{\sqrt{(a+bx)(c+dx)((c-a)+(d-b)x)((a-cl)+(b-dl)x)}}, $$
and the conditions $x(v=1)=1$, $x(v=l)=0$ become
$$ \frac{a-c}{-b+d} = 1, \qquad \frac{a-cl}{-b+dl} = 0. $$
There are four parameters, two equations, and one parameter will be cancelled, so we can impose one more condition by saying that the degree of the polynomial in $x$ inside the square root should be three, rather than four:
$$ b=0. $$
Thus we consider the change of variable
$$ v = \frac{l}{1+(l-1)x}, $$
which makes the second integral
$$ \frac12 \int_0^1 \frac{dx}{\sqrt{x(1-x)(1+(l-1)x)}}. $$
Expressing both integrals in terms of complete elliptic integrals of the first kind, we get the equation
$$ 2K(k) = K(\sqrt{1-k^2}), $$
where $\sqrt{1-k^2}$ is commonly denoted by $k'$.
The equation
$$ K(k')/K(k) = \sqrt{r} $$
is solved by the elliptic lambda function, so setting $r=4$ gives
$$ k = \lambda^*(4) = 3-2\sqrt{2}. $$
Another way to find this is to use a result of Abel (equation 1 there), and p.525 of Whittaker and Watson, to find that
$$ k=\tan^2\frac\pi8, \quad\Rightarrow\quad K(k') = 2K(k). $$
This follows from Landen's transformation:
$$ K(k_1')/K(k_1) = 2K(k')/K(k), \quad\text{when}\quad k_1 = \frac{1-k'}{1+k'}, $$
and $K(k)=K(k')$ when $k=k'=1/\sqrt{2}$, so $k_1 = 3-2\sqrt{2}$, and $k_1'=\sqrt{1-k_1^2}$. 
Landen's transformation, in turn, is based on the AGM representation of the complete elliptic integral of the first kind. Let $M(a,b)$ be the AGM function, so that for any $a$ we have
$$ K(k) = \frac{\pi a}{2 M(a,ak')}. $$
Then with $k_1 = \frac{1-k'}{1+k'}$, we get
$$ K(k_1) = \frac{1+k'}{2}K(k), $$
and also
$$ K(k) = \frac{\pi a}{2 M(a(1+k),a(1-k))}, $$
$$ K(k_1') = (1+k')K(k'), $$
so that $K(k_1')/K(k_1) = 2K(k')/K(k). $
A: Ahlfors probably intended the reader to notice that
$2K$ and $2iK'$ are the fundamental real and imaginary periods of
the elliptic integral 
$$
\int \frac{dt}{\sqrt{(1-t^2)(1-k^2 t^2)}},
$$
and thus that $K=K'$ iff the period lattice is square,
which in turn happens iff the branch points $t=\pm 1$ and $t=\pm 1/k$
have fourfold symmetry.  Now there are various ways to finish; for instance,
compute that the fractional linear transformation that takes
$-1/k$ to $-1$ to $+1$ to $+1/k$ is
$$
t \mapsto \frac{(k+1)t - k + 3}{(3k-1)t + k+1}
$$
and this map cycles $+1/k$ back to $-1/k$ iff $(k+1)(k^2-6k+1)=0$,
whose only root in $0<k<1$ is $k = 3 - 2\sqrt{2} = (\sqrt{2} - 1)^2$.
[The algebraic conjugate $k = (\sqrt{2} + 1)^2$ also gives rise to
an elliptic integral with a square period lattice, while $k=-1$
is spurious.]
[added later] For any choice of $k>1$ the branch points $t=\pm1$ and
$t=\pm1/k$ go to half-lattice points $0, K, iK', K+iK'$ modulo the
period lattice $\Lambda = {\bf Z} K + {\bf Z} iK'$ (in some order depending
on which of these branch points is chosen for the base point).
Any 1:1 map of ${\bf C}/\Lambda$ that takes the set of half-lattice points to itself
descends to an automorphism of the projective line (a.k.a. the Riemann sphere) 
with coordinate $t$, and that automorphism permutes the four branch points.
The involution $z \leftrightarrow -z$ of ${\bf C}/\Lambda$ 
acts as $(t,u) \leftrightarrow (t,-u)$, and thus acts trivially on
the $t$-line.  Translations by the half-lattice points
which descend to double transpositions: $t \leftrightarrow -t$ (from
translation by $K$) and $t \leftrightarrow \pm 1 / kt$ 
(from translation by $iK'$ and $K+iK'$).
For generic $k$ these translations and their compositions with
$z \leftrightarrow -z$ are the only choices, but when $K=iK'$ 
there's the new map $z \mapsto iz$.  This map fixes $0$ and $K+iK'$
and switches the other two half-lattice points, so descends to an involution
that fixes two of the branch points, such as $1$ and $-1/k$,
and switches the other two.  Composing this map with translation by $K$
yields a 4-cycle $0 \mapsto K \mapsto K+iK' \mapsto iK' \mapsto 0$,
and that's the 4-cycle I used in my answer.
A: My answer is not fundamentally different to Noam D. Elkies'. I hope, however, that it offers another perspective, which might be easier to follow, as it does not require any knowledge of elliptic functions.
We have $$F(w) = \int_0^w \frac{dw}{\sqrt{(1-w^2)(1-k^2w^2)}},$$ which maps the upper half plane $H$ to rectangle $R_0$ (as in Fig. 6-2 in Ahlfors).
Since $F(w)$ is a conformal mapping from $H$ to $R_0$, an automorphism of $R_0$ automatically induces an automorphism of $H$.
One obvious automorphism of $R_0$ is a rotation by $\pi$ around the center of $R_0$, this induces an automorphism of $H$, i.e., $f(z) = -\frac{1}{kz}$.
When $R_0$ is a square, a rotation by $\pi/2$ (or $-\pi/2$) around the center of $R_0$ is also an automorphism of $R_0$. This induces an automorphism of $H$, which maps $-\frac{1}{k}, -1, 1, \frac{1}{k}$ to $-1, 1, \frac{1}{k}, -\frac{1}{k}$ (or $\frac{1}{k}, -\frac{1}{k}, -1, 1$).
An automorphism of $H$ must be of the form $$f(w) = \frac{aw+b}{cw+d},$$ where $a,b,c,d \in R$ and $ad-bc=1$.
With five unknowns ($a$, $b$, $c$, $d$, and $k$) and five equations (four from the mapping and one from the condition $ad-bc=1$), we find $k=(\sqrt{2}-1)^2$.
(For the actual calculation, one can refer to Noam D. Elkies' answer.)
