Application of Continued Fractions to the Computation of the Beta Function
Abstract Generated abstract
This paper develops continued fraction approximations for numerical evaluation of the beta function. Starting from a hypergeometric representation of the beta function, it rewrites the function as a sum of two hypergeometric terms at argument minus one and replaces each term by convergents of a known continued fraction, yielding explicit fractional rational approximations and general formulas for even and odd orders. The paper also derives bounds for the corresponding remainders, with simplified forms for the symmetric case x equals y. Numerical examples and a table of relative errors indicate that the sixth approximation gives relative error below 0.00003 for variables in the interval from 2 to 3.
Full Text
APPLICATION OF CONTINUED FRACTIONS TO THE COMPUTATION OF THE BETA FUNCTION
V. E. KORNILOV
(Presented by the Department of Higher Mathematics)
The article considers the question of an approximate representation of the beta function by the sum of two convergents of a known continued fraction [1].
- It is known that the function
\[ F(\alpha,1;\gamma;-z)=\sum_{\kappa=0}^{\infty}\frac{(\alpha)_\kappa}{(\gamma)_\kappa}(-z)^\kappa,\quad |z|<1,\ \gamma\ne 0,-1,\ldots, \tag{1} \]
where
\[ (a)_\kappa=a(a+1)\ldots(a+\kappa-1),\quad (a)_0=1 \tag{2} \]
is expressed by means of the integral [2], p. 308,
\[ F(\alpha,1;\gamma;-z)= \frac{(\gamma-1)z^{1-\gamma}}{(1+z)^{\alpha-\gamma+1}} \int_{0}^{z}\frac{t^{\gamma-2}\,dt}{(1+t)^{\gamma-\alpha}}, \quad \gamma>1, \tag{3} \]
and is represented in the form of the continued fraction [1], p. 320,
\[ F(\alpha,1;\gamma;-z)= \frac{1}{1+\dfrac{\alpha z}{\gamma+\cdots+ \dfrac{\kappa(\gamma-\alpha+\kappa-1)z}{\gamma+2\kappa-1+ \dfrac{(\gamma+\kappa-1)(\alpha+\kappa)z}{\gamma+2\kappa+\cdots}}}} \tag{4} \]
The beta function can be expressed by means of the gamma function [3], p. 28,
\[ \mathrm{B}(x,y)=\Gamma(x)\Gamma(y):\Gamma(x+y) \tag{5} \]
and is represented by the functional series [2], p. 291,
\[ \mathrm{B}(x,y)=\frac{1}{x}F(1-y,x;x+1;1) =\sum_{k=0}^{\infty}\frac{(1-y)_k}{k!(x+k)}. \tag{6} \]
Series (6) is of little use for computing the beta function because of its slow convergence.
For computing the beta function, we represent it in the form of the sum of two series [4], p. 112:
\[ \mathrm{B}(x,y)=2^{1-x-y}\left[\frac{1}{x}F(1-y,1;x+1;-1)+\frac{1}{y}F(1-x;1;y+1;-1)\right]. \tag{7} \]
Each of the series on the right-hand side of equality (7) is represented by the continued fraction (4). Let us compute several convergents of the continued fraction (4):
\[ \left\{ \begin{aligned} 3)\;& \frac{(\gamma)_2+(\gamma-\alpha)z}{(\gamma)_2+\gamma(\alpha+1)z}; \\[4pt] 4)\;& \frac{(\gamma)_3+(\gamma+1)[(\alpha+2)(\gamma-2)+4]z} {(\gamma)_3+2(\gamma)_2(\alpha+1)z+\gamma(\alpha)_2z^2}; \\[4pt] 5)\;& \frac{(\gamma)_4+(\gamma+1)_2[(\alpha+4)(\gamma-3)+12]z+2(\gamma-\alpha)_2z^2} {(\gamma)_4+2(\gamma)_3(\alpha+2)z+(\gamma)_2(\alpha+1)_2z^2}; \\[4pt] 6)\;& \frac{(\gamma)_5+2(\gamma+1)_3[(\alpha+3)(\gamma-2)+6]z+} {(\gamma)_5+3(\gamma)_4(\alpha+2)z+3(\gamma)_3(\alpha+1)_2z^2+} \\ &\qquad \frac{+\,[3(\alpha+2)(\gamma+1)_2(\gamma-3\alpha)+(\alpha)_2(\gamma+2)_3]z^2} {+\,(\gamma)_2(\alpha)_3z^3}; \end{aligned} \right. \tag{8} \]
Summing successively the convergents (3)—(6), in accordance with equalities (7) and (8), we obtain the following fractional-rational approximations of the beta function:
\[ \left\{ \begin{aligned} \mathrm{B}(x,y)=3)\;& \frac{(x+y)(x+y+2)(x^2+y^2+5x+5y+4)} {2^{x+y-1}(x)_2(y)_2(x-y+4)(y-x+4)} +r_3(x,y); \\[6pt] 4)\;& \frac{2^{2-x-y}(x+y)_2(x+y+4)(x^2+y^2+9x+9y+16)} {(x)_2(y)_2[(x-y)^2+9x-7y+16][(x-y)^2+9y-7x+16]} \\ &\qquad +\,r_4(x,y); \\[6pt] 5)\;& \frac{(z)_2(z+4)\{[(z^2+9z+18)^2-4z^2]-xy(4z^2+35z+57)+3x^2y^2\}} {2^{z-2}(x)_3(y)_3[(x-y)^2+13x-11y+36][(x-y)^2+13y-11x+36]} \\ &\qquad +\,r_5(x,y); \\[6pt] 6)\;& \frac{3\cdot 2^{2-z}(z)_3(z+6)\{[(z^2+13z+38)^2-4z^2]-} {(x)_3(y)_3[36-(x-y)^2][(x-y)^2+15x-} \\ &\qquad \frac{-\,xy(4z^2+51z+137)+3x^2y^2\}} {-\,9y+38][(x-y)^2+15y-9x+38]} +r_6(x,y);\quad \text{where } z=x+y. \end{aligned} \right. \tag{9} \]
In the case \(x=y\), both terms of equality (7) are similar, and the approximations of the beta function will be simpler:
\[ \left\{ \begin{aligned} \mathrm{B}(x,x)=6)\;& \frac{(x+3)(2x+1)(x^2+27x+38)} {3\cdot 2^{2x-1}(x)_3(3x+19)} +r_6(x,x); \\[6pt] 7)\;& \frac{(2x+1)[(x+3)_2(x^2+47x+66)+12x(x+1)]} {3\cdot 2^{2x+1}(x)_4(x+11)} +r_7(x,x). \end{aligned} \right. \tag{10} \]
Along with the approximations of the beta function, according to formulas (9), one can give the general form of the sum of the convergents for the beta function [5], p. 23:
\[ \left\{ \begin{aligned} 2\kappa) B(x,y)={}& \frac{ \displaystyle \sum_{n=1}^{\kappa} \left[ \sum_{m=0}^{\kappa-n} C_{\kappa}^{m+n}(-1)^m \frac{(x+\kappa)_{n+m}}{(1-y+m)_n (x)_{m+1}} \right] }{ \displaystyle 2^{x+y-1}\sum_{n=0}^{\kappa} C_{\kappa}^{n}\left[(x+\kappa)_n:(1-y)_n\right] } \\[1.2em] &+ \frac{ \displaystyle \sum_{n=1}^{\kappa} \left[ \sum_{m=0}^{\kappa-n} C_{\kappa}^{n+m}(-1)^m \frac{(y+\kappa)_{n+m}}{(1-x+m)_n (y)_{m+1}} \right] }{ \displaystyle 2^{x+y-1}\sum_{n=0}^{\kappa} C_{\kappa}^{n}\frac{(y+\kappa)_n}{(1-x)_n} } +r_{2\kappa}(x,y); \end{aligned} \right. \tag{11} \]
\[ \left\{ \begin{aligned} 2\kappa+1) B(x,y)={}& \frac{ \displaystyle \sum_{n=0}^{\kappa} \left[ \sum_{m=0}^{\kappa-n} C_{\kappa}^{n+m}(-1)^m \frac{(x+\kappa+1)_{n+m}(1-y)} {(1-y+m)_{n+1}(x)_{m+1}} \right] }{ \displaystyle 2^{x+y-1}\sum_{m=0}^{\kappa} C_{\kappa}^{n}\left[(x+\kappa+1)_n:(2-y)_n\right] } \\[1.2em] &+ \frac{ \displaystyle \sum_{n=0}^{\kappa} \left[ \sum_{m=0}^{\kappa-n} C_{\kappa}^{n+m}(-1)^m \frac{(y+\kappa+1)_{n+m}(1-x)} {(1-x+m)_{n+1}(y)_{m+1}} \right] }{ \displaystyle 2^{x+y-1}\sum_{n=0}^{\kappa} C_{\kappa}^{n}\left[(y+\kappa+1)_n:(2-x)_n\right] } +r_{2\kappa+1}(x,y). \end{aligned} \right. \tag{12} \]
- The remainder term \(r_n(x,y)\) on the right-hand side of equalities (11) and (12) can be represented as the sum of two infinite functional series of Leibniz type [6], p. 12; therefore \(|r_n(x,y)|\) is less than the sum of the absolute values of two terms (one first term from each functional series):
\[ \left\{ \begin{aligned} |r_{2\kappa}(x,y)| <{}& \kappa!(x+y)_\kappa 2^{1-x-y}\times \\ &\times \left\{ 1:\left[ |(x)_{\kappa+1}|(2-y)_\kappa \sum_{m=0}^{\kappa} C_{\kappa}^{m}\frac{(x+\kappa)_m}{(1-y)_m} \right] \left| \sum_{m=0}^{\kappa} C_{\kappa}^{m}\frac{(x+\kappa+1)_m}{(2-y)_m} \right| \right. \\ &\qquad\left. + 1:\left[ |(y)_{\kappa+1}|(2-x)_\kappa \sum_{m=0}^{\kappa} C_{\kappa}^{m}\frac{(y+\kappa)_m}{(1-x)_m} \right] \left| \sum_{m=0}^{\kappa} C_{\kappa}^{m}\frac{(y+\kappa+1)_m}{(2-x)_m} \right| \right\}; \\ &0<x\le 3,\quad 0<y\le 3;\quad \kappa=2,3,\ldots . \end{aligned} \right. \tag{13} \]
\[ \left\{ \begin{aligned} |r_{2\kappa+1}(x,y)| <{}& \kappa!(x+y)_\kappa 2^{1-x-y}\times \\ &\times \left\{ 1:\left[ |(x)_{\kappa+1}|(2-y)_\kappa \sum_{m=0}^{\kappa} C_{\kappa}^{m}\frac{(x+\kappa+1)_m}{(2-y)_m} \right] \left| \sum_{m=0}^{\kappa+1} C_{\kappa+1}^{m}\frac{(x+\kappa+1)_m}{(1-y)_m} \right| \right. \\ &\qquad\left. + 1:\left[ |(y)_{\kappa+1}|(2-x)_\kappa \sum_{m=0}^{\kappa} C_{\kappa}^{m}\frac{(y+\kappa+1)_m}{(2-x)_m} \right] \left| \sum_{m=0}^{\kappa+1} C_{\kappa+1}^{m}\frac{(x+\kappa+1)_m}{(1-x)_m} \right| \right\}; \\ &0<x\le 3,\quad 0<y\le 3;\quad \kappa=1,2,\ldots . \end{aligned} \right. \tag{14} \]
In the case \(x=y\) we obtain:
\[ |r_{2\kappa}(x,x)|< \frac{ 2^{2-2x}\kappa!(2x)_\kappa\cdot (x)_{\kappa+1}|(2-x)_\kappa| }{ \left| \displaystyle\sum_{m=0}^{\kappa} C_{\kappa}^{m}\frac{(x+\kappa)_m}{(1-x)_m} \right| \left| \displaystyle\sum_{m=0}^{\kappa} C_{\kappa}^{m}\frac{(x+\kappa+1)_m}{(2-x)_m} \right| }; \tag{15} \]
\[ \left|r_{2k+1}(x,x)\right|< \frac{2^{2-2x} k! (2x)_k (x)_{k+1}\left|(2-x)_k\right|} {\left|\displaystyle\sum_{m=0}^{k} C_k^m \frac{(x+k+1)_m}{(2-x)_m}\right| \left|\displaystyle\sum_{m=0}^{k+1} C_{k+1}^m \frac{(x+k+1)_m}{(1-x)_m}\right|}. \tag{16} \]
- Let us compile a table of relative errors for the beta function in the case where, for its computation, the 6th approximation of the equalities (9) is applied \((0.0000074 = 0.0^{5}74)\).
Table 1
| \(x \backslash y\) | 2.1 | 2.3 | 2.5 | 2.7 | 2.9 |
|---|---|---|---|---|---|
| 2.2 | \(0.0^{5}74\) | \(0.0^{4}12\) | \(0.0^{4}17\) | \(0.0^{4}20\) | \(0.0^{4}13\) |
| 2.4 | \(0.0^{4}14\) | \(0.0^{4}16\) | \(0.0^{4}20\) | \(0.0^{4}20\) | \(0.0^{4}14\) |
| 2.6 | \(0.0^{4}19\) | \(0.0^{4}20\) | \(0.0^{4}21\) | \(0.0^{4}21\) | \(0.0^{4}16\) |
| 2.8 | \(0.0^{4}17\) | \(0.0^{4}18\) | \(0.0^{4}19\) | \(0.0^{4}18\) | \(0.0^{4}14\) |
Applying formula (10, 6), we compute the beta function for \(x=y=2.5\):
\[ \text{6)}\quad \mathrm{B}(2.5; 2.5) \approx \frac{1.639}{22.25}=0.07362983. \]
It is known that
\[ \mathrm{B}(2.5; 2.5)=\frac{3}{128}\pi=0.07363108\ldots \]
Then for the 6th approximation \(\Delta = 0.0^{5}125\), and the relative error is
\[ |\delta_x|<\frac{0.00000125}{0.07363}<0.000017. \]
Conclusion
Applying the 6th fractional-rational approximation of the beta function, when the variables \(x\) and \(y\) vary on the interval \([2,3]\), one can compute the beta function with relative error
\[ |\delta_{xy}|<0.00003. \]
References
-
A. A. Markov. Selected Works on the Theory of Continued Fractions and the Theory of Functions Least Deviating from Zero. Moscow—Leningrad, Gostekhizdat, 1948.
-
I. M. Ryzhik. Tables of Integrals, Sums, Series, and Products. Moscow—Leningrad, Gostekhizdat, 1948.
-
N. N. Lebedev. Special Functions and Their Applications. Moscow, Gostekhizdat, 1953.
-
H. Bateman and A. Erdélyi. Higher Transcendental Functions (Hypergeometric Function, Legendre Functions). Moscow, Fizmatgiz, 1965.
-
V. E. Kornilov. Application of continued fractions to the computation of integrals of binomial differentials. Izv. TPI, vol. 131, 1965.
-
A. N. Khovanskii. Applications of Continued Fractions and Their Generalizations to Problems of Approximate Analysis. Moscow, GITTL, 1956.