# Second derivative of Hypergeometric function

I'm looking for the following second derivative

$$\kappa_2 := \left . \frac{d^2}{d\lambda^2} \ln \left({_2F_1}\!\left(\tfrac{1}{2},\,- \lambda;\,1;\,\alpha\right)\right) \right \vert_{\lambda = 0} ,$$

where $\alpha$ is a real parameter in $[0,1]$. As you may have guessed I'm trying to compute the variance of a certain probability distribution.

The first moment is simple and is given by

$$m_1 = 2 \ln \frac{1 + \sqrt{1-\alpha}}{2}.$$

The second moment can be shown to be equal to the following

$$m_2 = \frac{2}{\pi} \int_{0}^{1} \frac{\left [ \ln(1-\alpha y^2) \right ]^2}{\sqrt{1-y^2}} dy$$

Mathematica can evaluate the above integral in terms of various function and polylogarithms (in fact dilogarithms). However the resulting expression is not even manifestly real. The above integral expression for $m_2$ is so far the best I found to deal with but there are many others. In essence I am trying to find a "nice" expression for that integral ($m_2$).

I'd be happy if I'm given an expression which is manifestly real. I suspect that the combination $\kappa_2 = m_2 - (m_1)^2$ (which is equal to the first equation) might look nicer and that some identity involving dilogarithms should be used.

An alternative representation for $m_2$ (obtained using the series of the Hypergeometric) is the following

$$m_{2}=2\sum_{n=2}^{\infty}\left(\begin{array}{c} -1/2\\ n \end{array}\right)\frac{H_{n-1}}{n}\left(-\alpha\right)^{n} \, ,$$

where $H_n$ are the Harmonic numbers, i.e.

$$H_n \, = \, \sum_{p=1}^n \frac{1}{p}$$

So far this is the best I could get:

$$\kappa_2 \,=\, -4 \log ^2\left(\sqrt{1-\alpha }+1\right)+4 \log \left(4-4 \sqrt{1-\alpha }\right) \log \left(\sqrt{1-\alpha }+1\right)+4 i \pi \log \left(\frac{2}{\sqrt{1-\alpha }+1}\right)+4 \log (2) \log \left(\frac{1}{\alpha }\right)+4 \text{Li}_2\left(\frac{2 \left(\sqrt{1-\alpha }+1\right)}{\alpha }\right)-4 \text{Li}_2\left(\frac{-\alpha +2 \sqrt{1-\alpha }+2}{\alpha }\right)$$

I would like to avoid the explicitly imaginary (third) term which is compensated by the dilogarithm to produce a real result. Does anybody know an identity for dilogarithm that can be used here?

• Can you include Mathematica's output? We might be able to make its reality manifest. – Semiclassical Sep 6 '14 at 3:13
• Can you post Mathematica's input ? – Claude Leibovici Sep 6 '14 at 3:45
• I am unable to get the analytical expression of $m_2$. Did you make a change of variable ? – Claude Leibovici Sep 6 '14 at 4:07
• @ClaudeLeibovici: Here is the output. – Lucian Sep 6 '14 at 6:19
• I know this is an old question, but the series the OP obtained can be written in the form $$2 \sum_{n=2}^\infty \frac{(2n)! ~H_{n-1}}{n!^2 ~n} \frac{\alpha^n}{4^n}$$ which is perfectly real and converges very fast (and has rational terms for rational $\alpha$). – Yuriy S Apr 23 '18 at 13:10

I will start from scratch. For any $$R\geq 1$$ we have $$(R-e^{i\theta})(R-e^{i\theta}) = (R^2+1)-2R\cos\theta \tag{1}$$ $$1-\frac{2R}{R^2+1}\cos\theta = \frac{R^2}{R^2+1}\left(1-\frac{e^{i\theta}}{R}\right)\left(1-\frac{e^{-i\theta}}{R}\right)\tag{2}$$ hence by setting $$\frac{2R}{R^2+1}=\frac{1}{A}$$ we have $$A\geq 1$$ and $$\log\left(1-\frac{1}{A}\cos\theta\right) = \log\left(\frac{A+\sqrt{A^2-1}}{2A}\right)+\sum_{n\geq 1}\frac{\cos(n\theta)}{n R^n}.\tag{3}$$ By integrating both sides of $$(3)$$ on $$(0,\pi/2)$$ we have $$\int_{0}^{1}\frac{\log\left(1-\frac{x}{A}\right)}{\sqrt{1-x^2}}\,dx = \frac{\pi}{2}\log\left(\frac{A+\sqrt{A^2-1}}{2A}\right)-2\operatorname{Im}\operatorname{Li}_2\left(iA-i\sqrt{A^2-1}\right)\tag{4}$$ and similarly $$\int_{0}^{1}\frac{\log\left(1+\frac{x}{A}\right)}{\sqrt{1-x^2}}\,dx = \frac{\pi}{2}\log\left(\frac{A-\sqrt{A^2-1}}{2A}\right)+2\operatorname{Im}\operatorname{Li}_2\left(iA+i\sqrt{A^2-1}\right)\tag{5}$$ such that by summing $$(4)$$ and $$(5)$$ $$\int_{0}^{1}\frac{\log\left(1-\frac{x^2}{A^2}\right)}{\sqrt{1-x^2}}\,dx =\\= -\frac{\pi}{2}\log\left(2A\right)+2\operatorname{Im}\operatorname{Li}_2\left(iA+i\sqrt{A^2-1}\right)-2\operatorname{Im}\operatorname{Li}_2\left(iA-i\sqrt{A^2-1}\right).\tag{6}$$ Similarly we may integrate $$\frac{\log\left(1\pm\frac{x}{A}\right)}{\sqrt{1-x^2}}$$ on sub-intervals of $$(0,1)$$, always in terms of $$\log$$ and $$\operatorname{Im}\operatorname{Li}_2$$. Actually it turns out you do not need $$\text{Im}\text{Li}_2$$ to compute $$\kappa_2$$, just $$\text{Li}_2$$. From $$H_{n}=\int_{0}^{1}\frac{1-x^n}{1-x}\,dx$$ it follows that the computation of $$\sum_{n\geq 2}\left[\frac{1}{4^n}\binom{2n}{n}\right]\frac{\alpha^n H_{n-1}}{n}$$ boils down to the computation of
$$\int_{0}^{1}\left[\frac{1}{x}\log\left(\frac{1+\sqrt{1-\alpha x}}{2}\right)-\log\left(\frac{1+\sqrt{1-\alpha}}{2}\right)\right]\frac{dx}{1-x},$$ which by integration by parts and partial fraction decomposition reduces to the determination of the integrals over $$(0,1)$$ of $$\frac{\log(x)}{\sqrt{1-\alpha x}},\frac{\log(1-x)}{\sqrt{1-\alpha x}},\frac{\log(x)}{1+\sqrt{1-\alpha x}},\frac{\log(1-x)}{1+\sqrt{1-\alpha x}}.$$ The former two are equivalent to each other and elementary, the latter two depend on $$\int_{0}^{1}\frac{\log(x)}{1+\sqrt{1-\alpha x}}\,dx = \frac{1}{2}\,\phantom{}_4 F_3\left(\tfrac{1}{2},1,1,1;2,2,2;\alpha\right)$$ which reduces (up to elementary terms) to $$\int_{\sqrt{1-\alpha}}^{1}\frac{x\log(1-x^2)}{1+x}\,dx$$ then to $$\operatorname{Li}_2\left(\frac{1-\sqrt{1-\alpha}}{2}\right)$$. Some details needs to be filled but you have all the necessary ingredients.
• @lcv: it finds $\kappa_2$. – Jack D'Aurizio Mar 25 at 14:39
The definition of $$\operatorname{Li}_2$$ used in the last formula is $$\operatorname{Li}_2(z) = -\operatorname{Li}_2 \left( \frac 1 z \right) - \frac {3 \ln^2(-z) + \pi^2} 6, \quad |z| > 1.$$ Therefore $$\kappa_2 = 4 \operatorname{Li}_2 \left( \frac \alpha {\omega - \alpha} \right) - 4 \operatorname{Li}_2 \left( \frac \alpha \omega \right) + 2\ln^2 \left( \frac \omega \alpha - 1 \right) - 2\ln^2 \left( \frac \omega \alpha \right) + \\ 4 \ln \left( \frac \omega 2 \right) \ln \left( \frac {4 (4 - \omega - \alpha)} \alpha \right) - \ln(16) \ln(\alpha), \\ \omega = 2 + 2 \sqrt {1 - \alpha}.$$
• The polylogarithm terms are real after the substitution, and $\ln^2 z = (\ln(-z) + i \pi)^2$ for negative $z$. The three imaginary terms cancel out. – Maxim Mar 25 at 16:57