10

The code

integrate (H_x)^2 dx, from x=0 to x=1

in Wolfram alpha online calculator, where as you see $H_x$ is a generalized harmonic number, tell us that holds $$\int_0^1 \left(H_x\right)^2 dx\approx 0.413172.$$

I've curiosity about

Question. How one can calculate with analysis or numerical analysis an approximation of $$\int_0^1 \left(H_x\right)^2 dx?$$ Thus you are able to use your knowledges about the harmonic numbers, or well if your approach is using numerical analysis tell us what's your numerical method and how works it. Many thanks.

  • 1
    So basically you're looking for : $$ \int_0^1 \left( \int_0^1 \frac{1-t^x}{1-t} dt \right)^2 dx $$ ? – Zubzub Mar 14 '17 at 12:40
  • Now you are saying it, but I did not know it before, many thanks @Zubzub –  Mar 14 '17 at 13:12
  • 1
    The wanted integral equals $$ \sum_{m,n\geq 1}\int_{0}^{1}\frac{z^2}{mn(m+z)(n+z)},dz =\ \int_{0}^{1}\iint_{(0,+\infty)^2}z^2 e^{-(u+v)z}\log(1-e^{-u})\log(1-e^{-v}),du,dv,dz$$ – Jack D'Aurizio Mar 14 '17 at 16:24
  • 1
    Now we may deal with it in many ways, and probably to exploit the Kummer-Malmsten Fourier series (http://math.stackexchange.com/questions/1008732/integral-that-arises-from-the-derivation-of-kummers-fourier-expansion-of-ln) is tempting, too. – Jack D'Aurizio Mar 14 '17 at 16:26
  • As you see it, it seems a very nice approach. Is not required a quick answer, I am saying this because seems a lot of work. Many thanks will be a nice post @JackD'Aurizio –  Mar 14 '17 at 16:33
  • @user1952009 this is an invitation if you want to read Jack's answer, because is a masterpiece and maybe you are interested. –  Mar 14 '17 at 19:12
  • 1
    Nice question, I have the feeling this question has a closed form. What is the origin of your question ? – Zaid Alyafeai Mar 15 '17 at 05:43
  • Was my invention, I see that $\int_0^1 H_xdx$ or $\int_0^1 xH_xdx$ has closed-form, then I ask Wolfram Alpha about $\int_0^1(H_x)^2dx$, but my main purpose was to know more about generalized harmonic numbers, truly I didn't find about a closed-form since I thought that it could be veru difficult/impossible. I don't know is there are similar questions in the literature. Thanks for your attention @ZaidAlyafeai –  Mar 15 '17 at 08:05
  • @ZaidAlyafeai since you was showing interest about this kind of integrals, this afternoon I am playing the code intgrate H_x Binom[x,N]dx, from x=0 to x=1 with the help of Wolfram Alpha online calculator, for different and simple values of $N$. Is not required a response of this comment, many thanks and good afternoon. –  May 08 '17 at 15:37

3 Answers3

6

This is an interesting question that can be tackled in many ways, there are many chances a good piece of math will come out of it. For now, I will just keep collecting and rearranging observations, till reaching a complete answer.

We have $H_x=\gamma+\psi(x+1)$ and $\int_{0}^{1}\psi(x+1)\,dx = \log\frac{\Gamma(2)}{\Gamma(1)}=0$, hence our integral equals $\gamma^2+\int_{0}^{1}\psi(x+1)^2\,dx$. The function $\psi(x+1)^2$ is positive and convex on $(0,1)$ and values of the $\psi$ function at rational points in $(0,1)$ can be computed in a explicit way through Gauss' Digamma Theorem, hence the numerical evaluation of the given integral is pretty simple through Simpson's rule or similar approaches.

In a right neighbourhood of the origin we have $$ H_x = \zeta(2)x-\zeta(3)x^2+\zeta(4)x^3-\zeta(5)x^4+\ldots\tag{1} $$ hence $$ \int_{0}^{1}H_x^2\,dx = \sum_{m,n\geq 2}\frac{(-1)^{m+n}}{m+n-1}\zeta(m)\zeta(n) = \sum_{j\geq 3}\frac{(-1)^{j+1}}{j}\sum_{k=2}^{j-1}\zeta(k)\,\zeta(j+1-k) \tag{2}$$ where we may recall Euler's theorem about $\sum_{n\geq 1}\frac{H_n}{n^q}$: $$ \sum_{k=2}^{j-1}\zeta(k)\,\zeta(j+1-k) = (2+j)\,\zeta(j+1)-2\sum_{n\geq 1}\frac{H_n}{n^j}=j\,\zeta(j+1)-2\sum_{n\geq 1}\frac{H_{n-1}}{n^j}. \tag{3}$$ This approach should allow us to convert the original integral into a simple series, since $$ \sum_{j\geq 3}(-1)^{j+1}\zeta(j+1) \stackrel{\text{Abel reg.}}{=} 1-\zeta(2)+\zeta(3).$$ In particular, the problem boils down to the approximation/evaluation of the following series: $$ \sum_{n\geq 1}\left[\frac{1-2n}{2n^2}+\log\left(1+\frac{1}{n}\right)\right]H_{n-1} \tag{4}$$ whose general term yet behaves like $\frac{\log n}{n^3}$, leading to pretty fast convergence.
If we apply summation by parts, we get a general term that is simpler but with a slower decay towards zero: $$ \begin{eqnarray*}(4)&=&\lim_{N\to +\infty}\left[\left(-\gamma+\frac{\pi^2}{12}\right)H_{N-1}-\sum_{n=1}^{N-1}\frac{\frac{1}{2}H_n^{(2)}-H_n+\log(n+1)}{n}\right]\\&=&\frac{1}{2}\zeta(3)+\sum_{n\geq 1}\frac{H_n-\log(n+1)-\gamma}{n}\tag{5} \end{eqnarray*}$$

Now we may employ the asymptotic series for harmonic numbers in order to write $(5)$ in terms of Bernoulli numbers, values of the Riemann $\zeta$ function and the series

$$ \sum_{n\geq 1}\frac{\log(n+1)-\log(n)}{n}\stackrel{SBP}{=}\sum_{n\geq 1}\frac{\log(n+1)}{n(n+1)}=\int_{0}^{1}\frac{(1-x)\log(1-x)}{x\log x}\,dx \approx 1.25775 \tag{6}$$ that can be re-written in terms of Gregory coefficients or just as $\sum_{m\geq 1}\frac{(-1)^{m+1}\zeta(m+1)}{m}$.

(Continues)

Jack D'Aurizio
  • 353,855
  • Many thanks, for now I am starting to study it. Feel free if in a next future you want to ask about a community project a related question. –  Mar 14 '17 at 19:11
  • 1
    Any luck with (5) ? – Zaid Alyafeai Mar 15 '17 at 08:18
  • The sum in (5) feels very carefully crafted, being involving the harmonic numbers and the first two terms in the asymptotic in the numerator and simply $n$ in the denominator. I am SHOCKED this isn't a well known sum! – Brevan Ellefsen Mar 19 '17 at 05:06
  • @ZaidAlyafeai Not much better, but we can apply Euler-Maclaurin summation formula to $H_n$ to turn the series into a series of rationals. – Simply Beautiful Art Mar 19 '17 at 22:35
2

We have $H_x=\sum_{k=1}^\infty\frac1k-\frac1{x+k}$, thus, it follows from Cauchy products that we have

$$(H_x)^2=\sum_{k=0}^\infty\sum_{l=0}^k\left(\frac1{l+1}-\frac1{x+1+l}\right)\left(\frac1{k+1-l}-\frac1{x+1+k-l}\right)$$

Integrating term by term, we end up with

$$\int_0^1(H_x)^2\ dx=\sum_{k=0}^\infty\sum_{l=0}^k\left(\frac1{(l+1)(k+1-l)}+\frac{\ln\left(\frac{1+l}{2+l}\right)}{k+1-l}+\frac{\ln\left(\frac{1+k-l}{k-l}\right)}{l+1}+\frac{\ln\left(\frac{(1+l)(2+k-l)}{(2+l)(1+k-l)}\right)}{2l-k}\right)$$

Which, though not optimal, is more elementary than Jack D'Aurizio's answer.

0

$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} \int_{0}^{1}H_{x}^{2}\,\dd x & = \int_{0}^{1}\bracks{\Psi\pars{x + 1} + \gamma}^{\,2}\,\dd x = \gamma^{2} + \int_{0}^{1}\Psi^{\,2}\pars{x + 1}\,\dd x \\[5mm] & = \gamma^{2} + \lim_{q \to \infty}{1 \over q}\sum_{p = 1}^{q}\Psi^{\,2}\pars{{p \over q} + 1} = \gamma^{2} + \lim_{q \to \infty}{1 \over q}\sum_{p = 1}^{q - 1} \bracks{\Psi\pars{p \over q} + {q \over p}}^{2} \end{align}

$\ds{\Psi\pars{p \over q}}$ is evaluated with Gauss Digamma Theorem:

\begin{align} \Psi\pars{p \over q} & = -\gamma - \ln\pars{q} - {1 \over 2}\,\pi\cot\pars{\pi p \over q} + {1 \over 2}\sum_{k = 1}^{q - 1}\cos\pars{2\pi kp \over q} \ln\pars{2 - 2\cos\pars{2\pi k \over q}} \\[2mm] & p \in \mathbb{N}_{\ \geq\ 1}\,,\ q \in \mathbb{N}_{\ \geq\ 2}\,,\quad p < q \end{align}

A 'numerical approximation' $\ds{\,\mc{N}_{q}}$ is given by:

\begin{align} \int_{0}^{1}H_{x}^{2}\,\dd x & \approx \gamma^{2} + {1 \over q}\sum_{p = 1}^{q - 1}\bracks{\Psi\pars{p \over q} + {q \over p}}^{2} \equiv \,\mc{N}_{q} \end{align} The figure shows $\ds{\,\mc{N}_{q}\ \mbox{vs.}\ q}$. enter image description here

Felix Marin
  • 89,464
  • Many thanks for your answer, I've understand details, and your answer is a good introduction to the theory of the digamma function. –  Mar 31 '17 at 07:03
  • @user243301 I'm glad you found tthis answer was useful. – Felix Marin Mar 31 '17 at 20:04