Identity concerning complete elliptic integrals It can be easily checked that both the complete elliptic integrals $K(k), K'(k)$ satisfy the same second order differential equation $$kk'^{2}\frac{d^{2}y}{dk^{2}} + (1 - 3k^{2})\frac{dy}{dk} - ky = 0$$ and hence from the theory of second order differential equations there is a relation of the form $$K'(k) = cK(k)\cdot\log k + f(k)$$ where $c$ is some constant and $f(k)$ is some analytic function of $k$. The exact relation between $K(k)$ and $K'(k)$ is given by $$K'(k) = \frac{2K(k)}{\pi}\log\left(\frac{4}{k}\right) - 2\left[\left(\frac{1}{2}\right)^{2}\left(\frac{1}{1\cdot 2}\right)k^{2} + \left(\frac{1\cdot 3}{2\cdot 4}\right)^{2}\left(\frac{1}{1\cdot 2} + \frac{1}{3\cdot 4}\right)k^{4} + \cdots\right]$$ It can be verified with some patience that the RHS does satisfy the differential equation given above and thereby the relation between $K'(k)$ and $K(k)$ can be established.
However is there an alternative proof based on the definition of $K'(k)$ and $K(k)$ as complete elliptic integrals or using the hypergeometric relation $$\frac{2K(k)}{\pi} =\,_{2}F_{1}\left(\frac{1}{2}, \frac{1}{2}; 1; k^{2}\right)$$ which can be presented to someone unaware of the theory of second order differential equations?
 A: Let $\tau$ be a suitable period ratio with positive imaginary part (suitable meaning that $\tau$ is in a certain fundamental domain) and let $q=\mathrm{e}^{\pi\mathrm{i}\tau}$ be the nome. Then
$$\frac{\mathrm{i}K'}{K} = \tau = \frac{1}{\pi\mathrm{i}}\log q$$
Now consider that
$$k^2 = \frac{\vartheta_2^4(q)}{\vartheta_3^4(q)} = 16 q + \mathrm{O}(q^2)$$
where $\vartheta_2$, $\vartheta_3$ are known Jacobi thetanull functions. The relationship between $k^2$ and $q$ allows local inversion, so
$q = \frac{k^2}{16}\left(1+\mathrm{O}(k^2)\right)$, hence
$$\frac{\mathrm{i}K'}{K}=\frac{2}{\pi\mathrm{i}}\log\frac{k}{4}+\mathrm{O}(k^2)$$
which is the sought relation.
A: We will use the hypergeometric representation of the elliptic integral
\begin{equation}
 K'(k)=\frac\pi2\,_{2}F_{1}\left(\frac{1}{2}, \frac{1}{2}; 1; 1-k^{2}\right)
\end{equation}
and the linear transformation of the variable
\begin{align}
 \mathbf{F}\left({a,b\atop a+b+m};z\right)=&\frac{1}{\Gamma\left(a+m\right)
\Gamma\left(b+m\right)}\sum_{s=0}^{m-1}\frac{(a)_{s}(b)_{s}(m-s-1)!}{s!}(z-1)^{s}-\\
&\hspace{1cm}-\frac{(z-1)^{m}}{\Gamma\left(a\right)\Gamma\left(b\right)}\sum_{s=0}^{
\infty}\frac{(a+m)_{s}(b+m)_{s}}{s!(s+m)!}(1-z)^{s}\\
&\hspace{2cm}\left[\ln\left(1-z\right)
-\psi\left(s+1\right)-\psi\left(s+m+1\right)+\right.\\
&\hspace{2cm}\left.+\psi\left(a+s+m\right)+\psi\left(
b+s+m\right)\right]
\end{align}
which is valid if $m$ is a non negative integer and if $\left|z-1\right|<1,\left|\arg(z-1)\right|<\pi$. Here $\psi$ is the digamma function and $\mathbf{F}$ is regularized Olver's hypergeometric function. When $a+b+m=1$, it is identical to the standard hypergeometric function and if $m=0$, the first summation cancels. By taking $a=1/2,b=1/2,c=1,m=0$, we obtain
\begin{align}
 K'(k)=-\frac\pi2\frac{1}{\Gamma(1/2)^2}&\sum_{s=0}^{
\infty}\left( \frac{(1/2)_s}{s!} \right)^2 k^{2s}\left[\ln\left(k^2\right)
-2\psi\left(s+1\right)+2\psi\left(s+1/2\right)\right]
\end{align}
or
\begin{equation}
 K'(k)=-\sum_{s=0}^{
\infty}\left( \frac{(1/2)_s}{s!} \right)^2 k^{2s}\left[\ln\left(k\right)
-\psi\left(s+1\right)+\psi\left(s+1/2\right)\right]
\end{equation}
From the properties of the digamma function, for $s\ge1$,
\begin{align}
 \psi\left(s+1\right)&=\sum_{p=1}^{s}\frac{1}{p}-\gamma\\
 \psi\left(s+\tfrac{1}{2}\right)&=-\gamma-2\ln 2+2\sum_{p=1}^{s}\frac{1}{2p-1}
\end{align}
we deduce
\begin{equation}
 \psi\left(s+\tfrac{1}{2}\right)-\psi\left(s+1\right)=-2\ln2+2\sum_{p=1}^{s}\frac{1}{2p(2p-1)}
\end{equation}
for $s\ge1$ and $\psi\left(\tfrac{1}{2}\right)-\psi\left(1\right)=-2\ln2$.
Recognizing the series expansion for the elliptic integral, we deduce
\begin{equation}
 K'(k)=\frac{2}{\pi}\ln\left( \frac{4}{k} \right)K(k)-2\sum_{s=1}^{
\infty}\left( \frac{(1/2)_s}{s!} \right)^2 k^{2s}\sum_{p=1}^{s}\frac{1}{2p(2p-1)}
\end{equation}
which is the proposed result.
