Asymptotic behavior of elliptic integral (first kind) I came accross some obstacles in proving that the time $T(\delta)$ taken by a pendulum to travel from $\theta=\pi-\delta$ to a considerably distant angle $\theta=\theta_0\in(0,\pi/4)$ diverges logarithmic-ally with respect to $\delta$.
Here is my work so far. 
The expression of $T(\delta)$ is
$$T(\delta)=-\int_{\pi-\delta}^{\theta_0}\frac{1}{\sqrt{\frac{2g}{L}[\cos{\theta}+\cos{\delta}]}}d\theta.$$
I was able to make a heuristic argument by taking $\cos{\delta}\approx 1$ (since a cosine function is 1 up to the second order) and directly doing the integration. It indeed is a logarithm blow-up. 
Not being convinced by my own argument (okay for my physics-oriented self by skeptical for my math-oriented self because $\delta$ appears both in the integral limit and in the integrand, and thus taking the limit only in the integrand seems un-justified), I came to the solution of the integral, the elliptical integral of the first kind.
What I get so far is by a standard change-of-variable (learned from Zorich) $\sin{\theta}=\frac{\sin{\psi/2}}{\sin{\phi_0/2}}$ where $\phi_0=\pi-\delta$, I changed it to a complete elliptic integral (plus a finite constant)
$$T(\delta)=\int_0^{\pi/2}\frac{1}{\sqrt{1-k^2\sin^2{\theta}}}d\theta=K(k)$$
where $k=\sin{\phi_0/2}=\sin{(\pi/2-\delta/2)}$.
It seems the remaining task is to show that 
$$\lim_{\delta\rightarrow0}\frac{K(\sin{(\pi/2-\delta/2)})}{\ln{\delta}}=const\neq0.$$
I'm not so familiar with the elliptic integrals and did not get readable results about this asymptotic behavior of K in Google. I'd very appreciate it if there is any derivation on this.
Thanks in advance for any answer or remark!!
 A: I prefer to have the singular behaviour near $0$ rather than at $\frac{\pi}{2}$, so let's make the substitution $\varphi = \frac{\pi}{2} - \theta$. We obtain
$$K(k) = \int_0^{\frac{\pi}{2}} \frac{d\varphi}{\sqrt{1 - k^2\cos^2\varphi}}.$$
Split the integral at $\frac{\pi}{4}$. The part
$$\int_{\frac{\pi}{4}}^{\frac{\pi}{2}} \frac{d\varphi}{\sqrt{1 - k^2\cos^2\varphi}}$$
remains harmless as $k \to 1$ and tends to
$$\int_{\frac{\pi}{4}}^{\frac{\pi}{2}} \frac{d\varphi}{\sin \varphi}.$$
For the other part, write $1 = \sin^2 \varphi + \cos^2 \varphi$ to obtain $1 - k^2\cos^2\varphi = \sin^2 \varphi + (1-k^2)\cos^2 \varphi$. Let $\varepsilon = \sqrt{1-k^2}$. Then
\begin{align}
\int_0^{\frac{\pi}{4}} \frac{d\varphi}{\sqrt{1 - k^2\cos^2 \varphi}} &= \int_0^{\frac{\pi}{4}} \frac{\cos^2 \varphi + \sin^2 \varphi}{\sqrt{\cos^2 \varphi + \sin^2 \varphi}\cdot \sqrt{\sin^2 \varphi + \varepsilon^2 \cos^2\varphi}}\,d\varphi\\
&= \int_0^{\frac{\pi}{4}} \frac{1 + \tan^2\varphi}{\sqrt{1 + \tan^2 \varphi}\cdot \sqrt{\varepsilon^2 + \tan^2 \varphi}}\,d\varphi \tag{$t = \tan \varphi$}\\
&= \int_0^1 \frac{dt}{\sqrt{1+t^2}\cdot \sqrt{\varepsilon^2 + t^2}}\\
&= \int_0^1 \frac{dt}{\sqrt{\varepsilon^2 + t^2}} - \int_0^1 \Biggl(1 - \frac{1}{\sqrt{1+t^2}}\Biggr) \frac{dt}{\sqrt{\varepsilon^2 + t^2}}.
\end{align}
Since
$$1 - \frac{1}{\sqrt{1+t^2}} = \frac{\sqrt{1+t^2}-1}{\sqrt{1+t^2}} = \frac{t^2}{\sqrt{1+t^2}\cdot (1 + \sqrt{1+t^2})},$$
the last integral remains bounded and tends to
$$\int_0^1 \frac{t \,dt}{1 + t^2 + \sqrt{1+t^2}}$$
as $\varepsilon \to 0$.
And the substitution $t = \varepsilon u$ gives us
\begin{align}
\int_0^1 \frac{dt}{\sqrt{\varepsilon^2 + t^2}} &= \int_0^{\frac{1}{\varepsilon}} \frac{du}{\sqrt{1+u^2}}\\
&= \operatorname{Ar sinh} \frac{1}{\varepsilon}\\
&= \log \biggl(\frac{1}{\varepsilon} + \sqrt{1 + \frac{1}{\varepsilon^2}}\biggr)\\
&= \log \frac{1}{\varepsilon} + \log 2 + \log \frac{1 + \sqrt{1+\varepsilon^2}}{2}.
\end{align}
Thus we have
$$K(k) = \log \frac{1}{\sqrt{1-k^2}} + O(1) = \frac{1}{2}\log \frac{1}{1-k} - \frac{1}{2}\log (1+k) + O(1) = \frac{1}{2}\log \frac{1}{1-k} + O(1).$$
In our specific case, with $k = \sin \bigl(\frac{\pi}{2} - \frac{\delta}{2}\bigr) = \cos \frac{\delta}{2}$, we have $\varepsilon = \sqrt{1-k^2} = \sin \frac{\delta}{2} = \frac{\delta}{2} + O(\delta^3)$, so
$$\log \frac{1}{\varepsilon} = \log \frac{2}{\delta} + O(\delta^2)$$
and overall
$$K\bigl(\cos \tfrac{\delta}{2}\bigr) = \log \frac{1}{\delta} + O(1),$$
where the $O(1)$ term is not only bounded, it in fact converges as $\delta \to 0$. We have the relevant terms:
$$K\bigl(\cos \tfrac{\delta}{2}\bigr) = \log \frac{1}{\delta} + 2\log 2 + \int_0^1 \frac{t\,dt}{1+t^2+\sqrt{1+t^2}} + \int_{\frac{\pi}{4}}^{\frac{\pi}{2}} \frac{d\varphi}{\sin \varphi} + o(1).$$
A: Let $k=\cos(\delta/2)$ be the modulus and
and $k'=\sqrt{1-k^2}=\sin(\delta/2)$ be the complementary modulus; then the asymptotic expansion for small $\delta$ is given by formula 900.05 in the book by
Paul F. Byrd and Morris D. Friedman "Handbook of Elliptical Integrals for Engineers and Physicists", https://doi.org/10.1007/978-3-642-65138-0
$$
K=\sum_{m\ge 0} \left(\binom{-1/2}{m}\right)^2\left[\ln(\frac{4}{k'})-b_m\right]k'^{2m}.
$$
Note that a square is missing on the right hand side in the first edition of the book.
The coefficients are recursively a set of alternating harmonic sums
$$ b_0=0$$
$$ b_m=2\sum_{j=1}^{2m}\frac{(-1)^{j-1}}{j}=b_{m-1}+\frac{1}{m(2m-1)}$$.
