Identity concerning complete elliptic integrals

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.


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.