# Conjecture about integral $\int_0^1 K\left(\sqrt{\vphantom1x}\right)\,K\left(\sqrt{1-x}\right)\,x^ndx$

I'm interested in the following integral: $$\mathcal J(n)=\int_0^1 K\left(\sqrt{\vphantom1x}\right)\,K\left(\sqrt{1-x}\right)\,x^ndx,\tag1$$ where $K(z)$ is the complete elliptic integral of the 1ˢᵗ kind: $$K(z)={_2F_1}\left(\begin{array}c\tfrac12,\tfrac12\\1\end{array}\middle|\ z^2\right)\cdot\frac\pi2.\tag2$$ Using numerical integration and inverse symbolic calculation techniques, I found a conjectural formula for this integral, that only though seems to work for $n\in\mathbb N_0$: $$\mathcal J(n)\stackrel?=\frac{\pi^3}{8\cdot4^n}\left(\frac{(2n-1)!!}{n!}\right)^2{_4F_3}\left(\begin{array}c\tfrac12,\tfrac12,-n,-n\\1,\tfrac12-n,\tfrac12-n\end{array}\middle|\ 1\right).\tag3$$ This formula produces the following sequence of results for $n=0,1,2,...$ $$\frac{\pi^3}8,\frac{\pi^3}{16},\frac{11\,\pi^3}{256},\frac{17\,\pi^3}{512},\frac{1787 \,\pi^3}{65536},\frac{3047\,\pi^3}{131072},\frac{42631\,\pi^3}{2097152},\frac{75937\,\pi^3}{4194304},...\tag4$$

• Can we prove the conjecture $(3)$ is correct?
• Is it possible to find a generalization that works for non-integer values of $n$ as well?
• Zhou deals with similar integrals in arxiv.org/pdf/1301.1735. An effective technique is to exploit $$K(k) = 2\sum_{n\geq 0}\frac{P_n(2k-1)}{2n+1}$$ like I did here. Shifted Legendre polynomials give an orthogonal base of $L^2(0,1)$, so $\mathcal{J}(n)$ is easily related with the series $$\sum_{n\geq 0}\frac{(-1)^n}{(2n+1)^3}=\frac{\pi^3}{32}.$$ Aug 4, 2015 at 17:39

Following my answer in this question, we have

\begin{align*}&\; \int^1_0x^nK\left(\sqrt{\vphantom1x}\right)K\left(\sqrt{1-x}\right)dx\\ &=\int^1_0\left(\frac\pi2\sum^{\infty}_{m=0}\frac{(2m)!^2}{2^{4m}(m!)^4}x^{m+n}\right)K\left(\sqrt{1-x}\right)dx\\ &=\frac\pi2\sum^{\infty}_{m=0}\frac{(2m)!^2}{2^{4m}(m!)^4}\int^1_0x^{m+n}K\left(\sqrt{1-x}\right)dx\\ &=\frac\pi2\sum^{\infty}_{m=0}\frac{(2m)!^2}{2^{4m}(m!)^4}\frac{2^{4m+4n+1}((m+n)!)^4}{(2m+2n+1)!^2}\\ &=2^{4n}\pi\sum^{\infty}_{m=0}\frac{(2m)!^2}{(m!)^4}\frac{((m+n)!)^4}{(2m+2n+1)!^2}\\ &=\frac{2^{4n}\pi(n!)^4}{(2n+1)!^2}{}_4F_3\left(\frac12,\frac12,n+1,n+1;1,n+\frac32,n+\frac32\middle|\,1\right). \end{align*} This form checks numerically for non-integer $n$, and I think it should be related to OP's conjectured form via some $_4F_3$ transformation.

As Mathematica does, let's define the complete elliptic integral of the first kind in terms of the parameter $$m=z^2$$ so that we can write the integrand as $$x^{n} K(x)K(1-x)$$.

For nonnegative integers $$n$$, the result can also be expressed as $$\int_{0}^{1} x^{n} K(x) K(1-x) \, \mathrm dx = \frac{\pi}{2} \frac{(-1)^{n}}{n!} \lim_{\alpha \to 0} \frac{\mathrm d^{n}}{\mathrm d \alpha^{n}} \left( K(- \alpha)\right)^{2}.$$

I will use contour integration to show this.

The principal branch of $$K(z)$$ has a branch cut on $$[1, \infty)$$.

On the lower side of the branch cut, $$K(z) = \frac{1}{\sqrt{z}} \, K \left(\frac{1}{z}\right) - i K(1-z), \quad z >1.$$ While on the upper side of the branch cut, $$K(z) = \frac{1}{\sqrt{z}} \, K \left(\frac{1}{z}\right) + i K(1-z), \quad z >1.$$

(See this answer for an explanation.)

At $$z=1$$, $$K(z)$$ has the series expansion $$K(z) = - \frac{1}{2} \, \ln \left(1-z \right) +O(1).$$

And as $$|z| \to \infty$$, $$K(z)$$ has the asymptotic form $$K(z) \sim \frac{\ln(-z)}{2\sqrt{-z}}.$$

So by integrating the function $$f(z) = \frac{\left(K(z)\right)^{2}}{\alpha+z}, \quad \alpha >-1,$$ around a keyhole contour that is deformed around the branch cut, we get

\begin{align} \oint f(z) \, \mathrm dz &= \int_{1}^{\infty} \frac{\left(\frac{1}{\sqrt{x}} \, K \left(\frac{1}{x}\right) + i K(1-x) \right)^{2}}{\alpha+x} \, \mathrm dx + \int_{\infty}^{1} \frac{\left(\frac{1}{\sqrt{x}} \, K \left(\frac{1}{x}\right) - i K(1-x) \right)^{2}}{\alpha +x} \, \mathrm dx \\ &= 4i \int_{1}^{ \infty} \frac{K \left(\frac{1}{x} \right)K(1-x)}{\sqrt{x} (\alpha+x)} \, \mathrm dx \\ &= 2 \pi i \operatorname*{Res}_{z=-\alpha} \frac{\left(K(z)\right)^{2}}{\alpha +z} \\ &= 2 \pi i \, \left(K(- \alpha)\right)^{2}. \end{align}

Therefore, $$\int_{1}^{\infty} \frac{K \left(\frac{1}{x} \right)K(1-x)}{\sqrt{x} (\alpha+x)} \, \mathrm dx = \frac{\pi}{2} \, \left(K(-\alpha)\right)^{2}.$$

And by making the substitution $$u = \frac{1}{x}$$, we have $$\int_{0}^{1} \frac{K(u) K \left(1- \frac{1}{u} \right)}{(1+\alpha u) \sqrt{u}} \, \mathrm du \overset{\spadesuit}{=} \int_{0}^{1} \frac{K(u) K(1-u)}{1+\alpha u} \, \mathrm du = \frac{\pi}{2} \left(K(-\alpha)\right)^{2}.$$

If we differentiate both sides of the above equation $$n$$ times and then let $$\alpha \to 0$$, we get $$(-1)^n \, n! \int_{0}^{1} u^{n} K(u) K(1-u) \, \mathrm du = \frac{\pi}{2} \lim_{\alpha \to 0} \frac{\mathrm d^{n}}{\mathrm d \alpha^{n}} \left(K(-\alpha) \right)^{2}.$$

For $$n=0$$, we have $$\int_{0}^{1} K(x) K(1-x) \, \mathrm dx = \frac{\pi}{2} \left(K(0) \right)^{2} = \frac{\pi}{2} \left(\frac{\pi}{2} \right)^{2} = \frac{\pi^{3}}{8}.$$

For $$n=1$$, we have $$\int_{0}^{1} x K(x) K(1-x) \, \mathrm dx = - \frac{\pi}{2} \lim_{\alpha \to 0} 2 K(-\alpha) \frac{\mathrm d}{\mathrm d \alpha} K(-\alpha) = -\pi \left(\frac{\pi}{2} \right) \left(-\frac{\pi}{8} \right) = \frac{\pi^{3}}{16}.$$

For $$n=2$$, we have \begin{align} \int_{0}^{1} x^{2} K(x) K(1-x) \, \mathrm dx &= \frac{\pi}{2} \frac{1}{2!} \lim_{\alpha \to 0} 2\left(\left(\frac{\mathrm d}{\mathrm d \alpha }K(-\alpha) \right)^{2} +K(-\alpha) \frac{\mathrm d^{2}}{\mathrm d \alpha^{2}} K(-\alpha) \right) \\ &= \frac{\pi}{2} \left( \left(-\frac{\pi}{8} \right)^{2}+\left(\frac{\pi}{2} \right) \left(\frac{9 \pi}{64} \right) \right) \\ &= \frac{11 \pi^{3}}{256}. \end{align}

And so on.

The derivatives of $$K(-\alpha)$$ at $$\alpha=0$$ can be extracted from coefficients of the Maclaurin series $$K(-\alpha) = \frac{\pi}{2} \, _1F_{2} \left(\frac{1}{2}, \frac{1}{2}; 1; -\alpha \right) = \frac{\pi}{2} \sum_{n=0}^{\infty} \left(\frac{(2n)!}{2^{2n} (n!)^{2}} \right)^{2} (-\alpha)^{n}.$$

$$\spadesuit$$ For $$u >0$$, we have

\begin{align} \frac{1}{\sqrt{u}} \, K \left(1- \tfrac{1}{u} \right) &= \frac{1}{\sqrt{u}} \int_{0}^{\pi/2} \frac{d\theta}{\sqrt{1-\left(1-\tfrac{1}{u}\right)\sin^{2}(\theta})} \\ &= \int_{0}^{\pi/2} \frac{\mathrm d \theta}{\sqrt{u-(u-1)\sin^{2}(\theta)}} \\ &= - \int_{\pi/2}^{0} \frac{\mathrm d \phi}{\sqrt{u-(u-1) \sin^{2}(\pi/2- \phi)}} \\ &= \int_{0}^{\pi/2} \frac{\mathrm d \phi}{\sqrt{u-(u-1) \cos^{2}(\phi)}} \\ &= \int_{0}^{\pi/2} \frac{\mathrm d \phi}{\sqrt{u-(u-1) (1-\sin^{2}(\phi))}} \\ &= \int_{0}^{\pi/2} \frac{\mathrm d \phi }{\sqrt{1-(1-u) \sin^{2}(\phi)}} \\ &=K(1-u). \end{align}

• This is a neat result! (+1) Jan 2 at 1:59
• The result has a wide application and I am willing to have more discussions on that. Feb 1 at 12:03
• @SetnessRamesory I have a few other results. For example, integrating $\frac{\left(E(z)\right)^{2}}{(z+\alpha)^{\color{red}{2}}}$ shows that $$\int_{0}^{1} \frac{E(u)-(1-u)K(u)}{u(1+ \alpha u)^{2}} \, \left(E(1-u)-uK(1-u) \right) \, \mathrm du = \frac{\pi}{2} \left(E(-\alpha)\left(\frac{E(-\alpha) - K(-\alpha)}{\alpha} \right) -1\right).$$ I assume you have lots of results. Feb 1 at 19:38

Zhou deals with similar integrals in arxiv.org/pdf/1301.1735. An effective technique is to exploit: $$K(k) = 2\sum_{n\geq 0}\frac{P_n(2k-1)}{2n+1}$$ like I did here.

The shifted Legendre polynomials give an orthogonal base of $L^2(0,1)$, so $\mathcal{J}(n)$, for any $n\in\mathbb{N}$, is easily related with the series: $$\sum_{n\geq 0}\frac{(-1)^n}{(2n+1)^3}=\frac{\pi^3}{32}$$ that is a particular case of the series computed here.