14

$\quad$What is the value of the integral $$\int_0^1\int_0^1\frac{x^a(1-y)^b}{(1-xy)^c}\,{\rm d}x\,{\rm d}y?$$ for nonnegative integers $a,b,c$?

$\quad$For example, setting $b=4$, $c=3$, and letting $a$ vary, it seems that $\displaystyle\int_0^1\int_0^1\frac{x^a(1-y)^4}{(1-xy)^3}\,{\rm d}x\,{\rm d}y$ takes values according to the following table: $$\begin{array}{c|cc}\displaystyle a&0&1&2&3&4\\\hline \iint&\frac7{24},&\frac16,&\pi^2-\frac{39}4,&\frac{119}6-2\pi^2,&\pi^{2}-\frac{235}{24},\\\hline a&5&6&7&8&9\\\hline \iint&\frac1{15},&\frac7{120},&\frac{109}{2100​},&\frac{131}{2800},&\frac{1879}{44100}​ \end{array}$$ That is, seemingly, $\displaystyle\int_0^1\int_0^1\frac{x^a(1-y)^4}{(1-xy)^3}\,{\rm d}x\,{\rm d}y$ is rational for all nonnegative integers $a$ except for $a=2,3,4$. At least, that's assuming I didn't fall victim to a rounding error. (These values were computed using Wolfram Alpha, which refused to disclose its computation method.) For another example, at $(a,b,c)=(0,0,1)$, the integral somewhat famously evaluates to $\dfrac{\pi^2}6$.

$\quad$So, what's the pattern? Is there one? I'd be content to know at least when the integral is rational, or what the coefficient of the $\pi^2$ term is when it shows up.

$\quad$It would probably be nicer to know the value of $\displaystyle\int_0^1\int_0^1\frac{x^ay^b}{(1-xy)^c}\,{\rm d}x\,{\rm d}y$ for nonnegative integers $a,b,c$, but this seems not to converge most of the time. (In fact I'm unsure how to tell when either integral converges.)

  • (I'm particularly interested in the special case where $a=2c-1$ and $b=3c-1$.) – Akiva Weinberger Aug 02 '24 at 02:25
  • In that special case, it is$$ \frac{1}{{6c^2 }}{}_3F_2 \left( {\begin{array}{*{20}c} {1,c,2c} \ {1 + 2c,1 + 3c} \ \end{array};1} \right)$$ – Gary Aug 02 '24 at 03:00
  • @Gary How can this be computed? I know nothing about hypergeometric functions. In particular, this seems to always be $r+s\pi^2$ for rationals $r$ and $s$ - how can these rationals be found? – Akiva Weinberger Aug 02 '24 at 03:01
  • 1
    I asked Wolfram Mathematica. It probably follows from http://dlmf.nist.gov/15.6.E1 and http://dlmf.nist.gov/16.5.E2 – Gary Aug 02 '24 at 03:10
  • 1
    If $c<1+b$, \begin{align}J(a,b,c)&=\int_0^1\int_0^1\frac{x^a(1-y)^b}{(1-xy)^c}dxdy\ &=J(1+b-c,b,b+1-a) \end{align} Numerically, $J(2;1,1)=\dfrac{1}{4}$ – FDP Aug 02 '24 at 06:44
  • 1
    Mathematica gives $$-\frac{-\frac{24 (a-3) (a-2) H_{a-4}}{a-4}-a ((a-14) a+1)+\frac{16}{a-1}+\frac{36}{a}-92}{2 (a-3)^2 (a-2)^2},$$where $H_a$ is the harmonic number at $a$, for the case you mentioned, $b = 4$ and $c = 3$. Interestingly, the function is not defined for $a = 0, 1, 2, 3, 4$, but if you take the limit you will get the results on your table, so it somewhat explains why $\pi$ appears among the initial values. Also, this confirms that the function will always yield a rational number for $a \geq 5$. I'd be very surprised if there is a "good" closed formula for all cases of $a,b,c$. – huh Aug 03 '24 at 03:18
  • 1
    @huh This simplifies to $$\frac{12H_{a-4}}{(a-4)(a-3)(a-2)}+\frac{a^5-15a^4+15a^3+91a^2-144a+36}{2(a-3)^2(a-2)^2(a-1)(a)}$$though I'm not sure how much that helps. – Akiva Weinberger Aug 04 '24 at 01:35
  • @AkivaWeinberger I ran a few tests with various values of $b$ and $c$ while letting $a$ vary and I noticed that the value of $b$ always indicates when $\pi^2$ stops showing up. That is, for $b$ and $c$ where the integral converges (which I believe is $2+b > c$, but likely converges in other regions as well), the results are always rational when $a > b$. I'm not sure how you could prove that though. – huh Aug 04 '24 at 10:04
  • Wait, expanding it into a series demystifies it completely. I'll write something up later, but it should be irrational precisely when $c-1\le a\le b$. @huh In particular, the case where $b=4,c=3$ is$$-\frac{4!}{2!}\left(\frac{H_a}{(2-a)(3-a)(4-a)}+\frac{H_2}{(a-2)(3-2)(4-2)}+\frac{H_3}{(a-3)(2-3)(4-3)}+\frac{H_4}{(a-4)(2-4)(3-4)}\right),$$unless $a=2,3,4$, in which case we take limits and use the convention $\frac{d}{dn}H_n=\frac{\pi^2}6-1-\frac14-\dotsb-\frac1{n^2}$. The general case replaces the range ${2..4}$ with ${c-1..b}$. – Akiva Weinberger Aug 06 '24 at 21:04
  • 2
    In general the pi part should be $\displaystyle-(-1)^{a+c}\frac{\pi^2}6\frac{b!}{(b-a)!(a-c+1)!(c-1)!}$, if I haven't messed up. – Akiva Weinberger Aug 06 '24 at 22:49
  • @AkivaWeinberger It seems to be correct. It worked on all cases that I tried. – huh Aug 07 '24 at 04:13

2 Answers2

1

Let us first assume $(a,b,c)\in \Bbb {(R^+)}^3$. Then $$ \int_0^1\int_0^1 \frac{x^a(1-y)^b}{(1-xy)^c}dxdy {= \int_0^1\int_0^1 \sum_{n=0}^\infty\frac{\Gamma(n+c)}{n!\Gamma(c)}x^{n+a}(1-y)^by^ndxdy \\= \sum_{n=0}^\infty\frac{1}{n+a+1}\frac{\Gamma(n+c)}{n!\Gamma(c)}\int_0^1(1-y)^by^ndy \\= \sum_{n=0}^\infty\frac{1}{n+a+1}\frac{\Gamma(n+c)}{n!\Gamma(c)}\frac{\Gamma(b+1)n!}{\Gamma(b+n+2)} \\= \frac{\Gamma(b+1)}{\Gamma(c)} \sum_{n=0}^\infty\frac{1}{n+a+1}\frac{\Gamma(n+c)}{\Gamma(b+n+2)}, } $$ where we used $(1-u)^{-c}=\sum_{n=0}^\infty\frac{\Gamma(n+c)}{n!\Gamma(c)}u^n$ for $|u|<1$. At this point, due to the non-negativity of the arguments of the summands and integrals, we can deduce the conditions of convergence, which is $c<b+2$. From now on, we assume $(a,b,c)\in (\Bbb Z^{\ge 0})^3$ and $c\ge 1$. Therefore, $$ \frac{\Gamma(n+c)}{\Gamma(b+n+2)} { = \frac{(n+c-1)!}{(b+n+1)!} =\sum_{i=0}^\infty\frac{A_i}{b+n+1-i}, } $$ where $$ A_i {= \lim_{n\to i-b-1}\frac{(b+n+1-i)(n+c-1)!}{(b+n+1)!} \\= \lim_{n\to i-b-1}\frac{(b+n+1-i)}{\prod_{j=0}^{b-c+1}(b+n+1-j)} \\= \frac{(-1)^{b-c-i+1}}{i!(b-c-i+1)!}. } $$ Replacement results in $$ \int_0^1\int_0^1 \frac{x^a(1-y)^b}{(1-xy)^c}dxdy { = \frac{\Gamma(b+1)}{\Gamma(c)} \sum_{n=0}^\infty\frac{1}{n+a+1}\frac{\Gamma(n+c)}{\Gamma(b+n+2)} \\= \frac{b!}{(c-1)!} \sum_{i=0}^{b-c+1}\sum_{n=1}^\infty\frac{1}{n+a}\frac{A_i}{b+n-i} \\= \frac{b!}{(c-1)!} \sum_{i=0,i\ne b-a}^{b-c+1}A_i\frac{H_a-H_{b-i}}{a-b+i} \\+ \frac{b!}{(c-1)!} A_{b-a}\left(\frac{\pi^2}{6}-H^{(2)}_a\right)\Bbb{I}_{c-1\le a\le b} \\= \binom{b}{c-1} \sum_{i=0,i\ne a-c+1}^{b-c+1}\binom{b-c+1}{i}(-1)^{i}\frac{H_a-H_{c+i-1}}{a-c-i+1} \\+ \binom{b}{a}\binom{a}{c-1} (-1)^{a-c+1}\left(\frac{\pi^2}{6}-H^{(2)}_a\right)\Bbb{I}_{c-1\le a\le b}. } $$ Therefore, finally

$$ \int_0^1\int_0^1 \frac{x^a(1-y)^b}{(1-xy)^c}dxdy { = \binom{b}{c-1} \sum_{i=0,i\ne a-c+1}^{b-c+1}\binom{b-c+1}{i}(-1)^{i}\frac{H_a-H_{c+i-1}}{a-c-i+1} \\+ \binom{b}{a}\binom{a}{c-1} (-1)^{a-c+1}\left(\frac{\pi^2}{6}-H^{(2)}_a\right)\Bbb{I}_{c-1\le a\le b}. } $$

Some special cases

$$ { \int_0^1\int_0^1 \frac{x^a(1-y)^b}{(1-xy)^{b+1}}dxdy = \frac{H_a-H_{b}}{a-b}\Bbb{I}_{a\ne b} + \left(\frac{\pi^2}{6}-H^{(2)}_a\right)\Bbb{I}_{a=b} \\ \int_0^1\int_0^1 \frac{x^a(1-y)^b}{(1-xy)^{a+1}}dxdy = \binom{b}{a}\left(\frac{\pi^2}{6}-H^{(2)}_a\right) + \binom{b}{a} \sum_{i=1}^{b-a}\binom{b-a}{i}(-1)^{i}\frac{H_{a+i}-H_a}{i} } $$

Python code for checking the integrity of the results

import numpy as np
from math import factorial
from numpy import pi
import matplotlib.pyplot as plt
from tqdm import tqdm

def H(n): return sum(1/np.arange(1,n+1))

def H2(n): return sum(1/np.arange(1,n+1)**2)

def binom(n,m): return factorial(n)/factorial(m)/factorial(n-m)

def GammaFuncValue(a,b,c,N=10): return sum([1/(n+a+1)/np.prod(np.arange(n+c,n+b+2)) for n in range(0,N)])*factorial(b)/factorial(c-1)

def MonteCarloValue(a,b,c,N=10000): x=np.random.rand(N) y=np.random.rand(N) z=xa*(1-y)b/(1-xy)*c return sum(z)/N

def ClosedForm(a,b,c):

values=[]

for i in range(b-c+2):

    if i==a-c+1:
        values.append(
            binom(b,a)*binom(a,c-1)*np.cos(np.pi*(a-c+1))*(pi**2/6-H2(a))
            )
    else:
        values.append(
            binom(b,c-1)*binom(b-c+1,i)*np.cos(pi*i)*(H(a)-H(c+i-1))/(a-c-i+1)
            )

return sum(values)




if name=="main":

n=100
progbar=tqdm(total=n,position=0)
monte_carlo_values=[]
gamma_func_values=[]
closed_form_values=[]
for i in range(n):

    a=np.random.randint(1,10)
    b=np.random.randint(1,10)
    c=np.random.randint(1,b+2)

    # print(&quot;===========================&quot;)
    # print(f&quot;a = {a} , b = {b} , c = {c}&quot;)
    # print(f&quot;MonteCarloValue = {MonteCarloValue(a,b,c,100000)}&quot;)
    # print(f&quot;GammaFuncValue  = {GammaFuncValue(a,b,c,10000)}&quot;)
    # print(f&quot;ClosedForm      = {ClosedForm(a,b,c)}&quot;)
    monte_carlo_values.append(MonteCarloValue(a,b,c,100000))
    gamma_func_values.append(GammaFuncValue(a,b,c,10000))
    closed_form_values.append(ClosedForm(a,b,c))

    progbar.update(1)

plt.plot(monte_carlo_values)
plt.plot(gamma_func_values)
plt.plot(closed_form_values)

Mostafa Ayaz
  • 33,056
0

Here is a general, straightforward procedure for evaluating the integral as a function of $a$ with fixed chosen parameters $b$ and $c$. To illustrate, we carry out the computation for the case $b=4$ and $c = 3$. Although the final summation grows quite involved when $b$ and $c$ become large, it is nonetheless a standard series that any CAS can handle with ease. We evaluate the integral $$ I(a) = \int_0^1 \int_0^1 \frac{x^a (1-y)^4}{(1-xy)^3} \, dx \, dy. $$ First, we expand the term $(1-xy)^{-3}$ using its series representation $$ (1-xy)^{-3} = \sum_{n=0}^\infty \frac{(3)_n}{n!} (xy)^n, $$ where $(k)_n$ denotes the Pochhammer symbol. Substituting this series into the integral and interchanging the summation and integration (which requires $a>-1$ for convergence) yields $$ I(a) = \sum_{n=0}^\infty \frac{(3)_n}{n!} \left( \int_0^1 x^{a+n} \, dx \right) \left( \int_0^1 y^n (1-y)^4 \, dy \right). $$ Next, we evaluate the two integrals separately. The $x$-integral evaluates to $$ \int_0^1 x^{a+n} \, dx = \frac{1}{a+n+1}. $$ The $y$-integral corresponds to the Beta function $B(n+1, 5)$, evaluating as $$ \int_0^1 y^n (1-y)^4 \, dy = B(n+1, 5) = \frac{\Gamma(n+1)\Gamma(5)}{\Gamma(n+6)} = \frac{n! \, 4!}{(n+5)!} = \frac{24 \, n!}{(n+5)!}. $$ Substituting these results back into the series expression for $I(a)$ results in $$ I(a) = \sum_{n=0}^\infty \frac{(3)_n}{n!}\frac{1}{a+n+1}\frac{24 \, n!}{(n+5)!} = 24 \sum_{n=0}^\infty \frac{(3)_n}{(a+n+1)(n+5)!}. $$ We can simplify the above using $(3)_n = \frac{(n+2)!}{2}$ and $(n+5)! = (n+5)(n+4)(n+3)(n+2)!$. This leads to $$ I(a) = 24 \sum_{n=0}^\infty \frac{(n+2)!/2}{(a+n+1)(n+5)!} = 12 \sum_{n=0}^\infty \frac{1}{(n+a+1)(n+3)(n+4)(n+5)}.$$ Now, we apply partial fraction decomposition to the summand. Assuming $a \notin \{2, 3, 4\}$, we can write $$ \frac{1}{(n+a+1)(n+3)(n+4)(n+5)} = \frac{A}{n+3} + \frac{B}{n+4} + \frac{C}{n+5} + \frac{D}{n+a+1}, $$ where the coefficients $A, B, C, D$ depend on $a$. The sum can then be evaluated using the Digamma function $\psi(z)$, utilizing identities related to sums of the form $\sum (\frac{1}{n+x} - \frac{1}{n+y})$. Evaluating the sum using this method gives $$ \sum_{n=0}^\infty \frac{1}{(n+a+1)(n+3)(n+4)(n+5)} = \frac{\psi(a+1)}{P(a)} - \frac{\psi(3)}{2(a-2)} + \frac{\psi(4)}{a-3} - \frac{\psi(5)}{2(a-4)}, $$ where $P(a) = (a-2)(a-3)(a-4)$. To obtain the final expression for $I(a)$, we multiply by $12$ and substitute the known values $\psi(3) = 3/2 - \gamma$, $\psi(4) = 11/6 - \gamma$, and $\psi(5) = 25/12 - \gamma$. The final result is $$ I(a) = \frac{12(\psi(a+1) + \gamma)}{(a-2)(a-3)(a-4)} - \frac{9}{a-2} + \frac{22}{a-3} - \frac{25}{2(a-4)}. $$

huh
  • 1,017