# Beta function, harmonic numbers, and integral values

A problem of Mathematical Physics that I am working on involves the computation of a certain integral. Part of the result reads:

$$I_k:= [\beta_x( -1 - k, 0) + H_{-2 - k}]x^k$$

where $$\beta_x( -1 - k, 0)$$ is the incomplete Beta function, with $$x\in(0, \, 1)$$, and $$H_{-2-k}$$ is an harmonic number.

From physical considerations, I expect this integral to be well defined for $$0. Of special importance are the cases of $$k\ge 2$$ and $$k\in\mathbb{N}$$.

Question. Is there a way to compute the analytical expression of the limit $$\lim_{k\to n} I_k$$ where $$n$$ is an integer number $$\geq 2$$? Is there a way to compute, at least, $$\lim_{k\to2} I_k$$?

I hope that $$I_n$$ can be expressed as a function / special function / series of the argument $$x$$ in the domain $$x\in(0,\, 1)$$.

• The $x$-dependence is more complicated: For $x\rightarrow 1$ I find that $x^{-k}I_k(x)\rightarrow-\ln(1-x)$. For $x\rightarrow 0$ I find $x^{-k}I_k(x)\rightarrow -[(k+1)x^{k+1}]^{-1}$. – Carlo Beenakker May 3 at 14:14
• Note that the regularized Gaussian Hypergeometric function with $a=-k-1$, a negative integer, is a polynomial in $x$ of order $k+1$, and also its derivative for the third parameter $c$ (even if it is the set to $c=-k$) is. So the first term in the parentheses of Carlo's second equation is a finite sum. When writing the hypergeometric function as its defining sum, the derivative for the first parameter (i.e., the second term in the parentheses of the final formula of Carlo Beenaker) seems to collapse to : $(-1)^{k} x^{k+1} (k+1)! (\ln(1-x)+H_{k+1})$ , but I have to check the details. – Johannes Trost May 3 at 20:46
• @PeterTaylor, no, the plots in the domain $x\in(0,1)$ simply do not match. Johannes, if you manage to further simplify the expression found by Carlo please let me know. – AndreaPaco May 3 at 22:07
• @JohannesTrost --- I added the closed-form expressions for $k=2,3,4,5$ --- I hope you can identify the pattern and convert those into the full result! – Carlo Beenakker May 4 at 6:35
• @CarloBeenakker many thanks! – AndreaPaco May 4 at 7:10

TL;DR

Peter Taylor pointed out that the expressions below reduce to

$$\lim_{n\rightarrow k}x^{-n}I_n(x)= (x-1) \sum_{i=0}^k \frac{H_{k+1} - H_i}{x^{i+1}} -2 \,\text{arctanh}\,(1-2 x)$$

$$\newcommand\HGF{_2\!\tilde{F}_1}$$Mathematica is able to compute these limits, the result is in terms of a partial derivative of the regularized hypergeometric function $$\HGF$$. For $$k=2$$ I find $$\lim_{k\rightarrow 2}x^{-k}I_k(x)=\frac{11}{3}-\gamma_{\text{Euler}}+\ln x-\frac{1}{6x^3}\left({\HGF^{(0,0,1,0)}}(-3,1,-2;x)+{\HGF^{(1,0,0,0)}}(-3,1,-2;x)\right).$$ The superscript notation is Mathematica's way of indicating which variable to differentiate. As a test, for $$x=1/2$$ the right-hand-side evaluates to $$-4.833333\cdots=-29/6$$, which agrees with a numerical evaluation of $$\lim_{k\rightarrow 2}[\beta_x( -1 - k, 0) + H_{-2 - k}]$$.

The corresponding formula for integer $$k\geq 2$$ is $$\lim_{n\rightarrow k}x^{-n}I_n(x)=c_k-\gamma_{\text{Euler}}+\ln x-\frac{1}{(k+1)!x^{k+1}}\left({\HGF^{(0,0,1,0)}}(-k-1,1,-k;x)+ {\HGF^{(1,0,0,0)}}(-k-1,1,-k;x)\right).$$ The fraction $$c_k$$ is twice the constant term in an expansion of $$H_{-2-n}$$ around $$n=k$$. I don't have a closed-form expression for $$c_k$$, the first few values are $$11/3, 25/6, 137/30, 49/10, 363/70$$, for $$k=2,3,4,5,6$$.

Update: As pointed out by Peter Taylor: $$c_k=2H_{k+1}$$.

Mathematica code.

 k=6;
Series[Gamma[a]x^a Hypergeometric2F1Regularized[a,1-b,a+1,x],{a,-1-k,0}]/.b->0//Normal// FullSimplify;
%/.a->-1-x;
Series[HarmonicNumber[-2-x],{x,k,0}]//Normal;
%+%%//FullSimplify


The asympotics near $$x=0$$ and $$x=1$$ is $$\lim_{n\rightarrow k}x^{-n}I_n(x)\rightarrow\begin{cases} -\frac{1}{(k+1)x^{k+1}}&\text{for}\;\;x\rightarrow 0\\ -\ln(1-x)&\text{for}\;\;x\rightarrow 1 \end{cases}$$

Here is a plot of $$\lim_{n\rightarrow k}x^{-n}I_n(x)$$ for $$k=2$$.

Special cases:

$$k=2:\quad\lim_{k\rightarrow 2}x^{-k}I_k(x)=\frac{(x-1) (11 x^2+5 x+2)}{6 x^3}-2 \,\text{arctanh}\,(1-2 x)$$

$$k=3:\quad\lim_{k\rightarrow 3}x^{-k}I_k(x)=\frac{(x-1) (25 x^3+13 x^2+7 x+3)}{12 x^4}-2 \,\text{arctanh}\,(1-2 x)$$

$$k=4:\quad\lim_{k\rightarrow 4}x^{-k}I_k(x)=\frac{(x-1) (12 + 27 x + 47 x^2 + 77 x^3 + 137 x^4)}{60 x^5}-2 \,\text{arctanh}\,(1-2 x)$$

$$k=5:\quad\lim_{k\rightarrow 5}x^{-k}I_k(x)=\frac{(x-1)(10 + 22 x + 37 x^2 + 57 x^3 + 87 x^4 + 147 x^5)}{60 x^6}-2 \,\text{arctanh}\,(1-2 x)$$

$$k=6:\quad\lim_{k\rightarrow 6}x^{-k}I_k(x)= \frac{(x-1) (1089 x^6+669 x^5+459 x^4+319 x^3+214 x^2+130 x+60)}{420 x^7}-2 \,\text{arctanh}\,(1-2 x)$$

$$k=\mathbf{10}:\quad\lim_{k\rightarrow 10}x^{-k}I_k(x)= \frac{(x-1) (83711 x^{10}+55991 x^9+42131 x^8+32891 x^7+25961 x^6+20417 x^5+15797 x^4+11837 x^3+8372 x^2+5292 x+2520)}{27720 x^{11}}-2 \,\text{arctanh}\,(1-2 x)$$

$$k=\mathbf{14}:\quad\lim_{k\rightarrow 14}x^{-k}I_k(x)= \frac{(x-1) (1195757 x^{14}+835397 x^{13}+655217 x^{12}+535097 x^{11}+445007 x^{10}+372935 x^9+312875 x^8+261395 x^7+216350 x^6+176310 x^5+140274 x^4+107514 x^3+77484 x^2+49764 x+24024)}{360360 x^{15}}-2 \,\text{arctanh}\,(1-2 x)$$

The pattern suggests this general form:

$$\lim_{n\rightarrow k}x^{-n}I_n(x)=\frac{x-1}{a_k x^{k+1}}\left(\sum_{p=0}^k b_{p,k} x^p\right) -2 \,\text{arctanh}\,(1-2 x)$$

with $$a_k$$ in OEIS:A003418 and $$b_{p,k}$$, $$p=0,1,2\ldots k$$, the rows of the triangle in OEIS:A027446.

• Mathematica needs some hand-holding. I used the representation of the incomplete beta function in terms of the $_2\!\tilde{F}_1$ function; I have added the code to the answer box. – Carlo Beenakker Apr 29 at 13:35
• Some of the $_2\!\tilde F_1$'s were formatted differently from the others (without the negative space correction), which I assumed was accidental, so I edited to introduce a macro to format them consistently. – LSpice Apr 29 at 13:53
• perhaps there is a way (for $x=1/2$ I seem to get simple fractions like -29/6, -103/12, -887/60, -1517/60), but I don't have any simpler form than this hypergeometric function; but at least this representation gives you accurate numerical results. – Carlo Beenakker Apr 29 at 14:48
• $c_k$ looks suspiciously like $2H_{k+1}$, which probably counts as a closed form for this purpose. – Peter Taylor May 3 at 9:20
• The coefficients in the polynomials seem to correspond to OEIS A027446. – Peter Taylor May 4 at 7:21