Approximations based on hypergeometric functions of scalar argument#

See also Koev and Edelman [417], Butler and Wood [174], Butler [172].

Hypergeometric function \({}_1F_1\) for matrix argument (Butler’s approximation)#

ctx.hypermat_1f1_butler(res, a, b, X)#

where ctx is dec, mpm, fpm, gmp or apm.

Returns Butler’s approximation to Kummer’s confluent hypergeometric function for matrix argument, \({}_1F_1(a;b;\textbf{T})\), which is defined as (see {NIST})

\[{}_1F_1(a;b;\textbf{T}) = \sum_{k=0}^\infty \frac{1}{k!} \sum_{|\kappa|=k} \frac{\left[a\right]{\kappa}}{\left[b\right]{\kappa}} Z_{\kappa}(\textbf{T})\]

with \(-b+\tfrac{1}{2}(j+1) \notin \mathbb{N}, 1 \leq j \leq m; ||\textbf{T}||<1\). Here \(Z_{\kappa}(\textbf{T})\) is a zonal polynomial.

Butler’s approximation takes the form

\[{}_1{F}_1(a;b;X) \approx \frac{b^{pb-p(p+1)/4}}{\sqrt{R_{1,1}}} \times \prod_{i=1}^p \left[\left(\frac{y_i}{a}\right)^a \left(\frac{1-y_i}{b-a} \right)^{b-a} e^{x_i y_i} \right], \quad \text{where }\]
\[X=\text{diag}(x_1,\ldots,x_p, y_i=\frac{2a}{b-x_i+\sqrt{(x_i-b)^2 + 4ax_i}}, \text{ and }\]
\[R_{1,1} = \prod_{i=1}^p \prod_{j=i}^p \left[\frac{y_i y_j}{a}+\frac{(1-y_i)(1-y_j)}{b-a}\right].\]

An example (CDF):

>>> from mpfunlab import fpm, mpm
>>> mpm.dps = 40; x = 12; nu = 10; nc = 30
>>> dx = dec.hypermat_1f1_butler(x, nu, nc); mx = mpm.hypermat_1f1_butler(x, nu, nc)
>>> ix = ipm.hypermat_1f1_butler(x, nu, nc); fx = fpm.hypermat_1f1_butler(x, nu, nc)
>>> gx = gmp.hypermat_1f1_butler(x, nu, nc); ax = apm.hypermat_1f1_butler(x, nu, nc)
>>> mpm.show([dx, mx, ix, fx, gx, ax])
dec:  3.113877423416836055714616090074444149943E-1
mpm:  3.113877423416836055714616090074444149943e-1
ipm:  3.113877423416836055714616090074444149944e-1 (4.147e-38%)
fpm:  3.11387742341684E-01
gmp:  3.113877423416836055714616090074444149943E-01
ipm:  3.113877423416836055714616090074444149943e-1 (4.055e-38%)

Comparisons with MATLAB: some results#

Text for examples

Matlab insert

EXAMPLE 1: CF of log MeansRatio RV with and n = 5 and alpha = 7/2

1n     = 5;
2alpha = 7/2;
3t     = linspace(-100,100,201);
4cf    = cf_LogRV_MeansRatioW(t,n,alpha);
5figure; plot(t,real(cf),t,imag(cf)); grid on;
6title('CF of log MeansRatio RV with and n = 5 and alpha = 7/2')

Hypergeometric function \({}_2F_1\) for matrix argument (Butler’s approximation)#

ctx.hypermat_2f1_butler(res, a, b, c, X)#

where ctx is dec, mpm, fpm, gmp or apm.

Returns Butler’s approximation to the Gauss hypergeometric function for matrix argument, \({}_2F_1(a, b; c; \textbf{T})\), which is defined as (see {NIST})

\[{}_2F_1(a,b;c;\textbf{T}) = \sum_{k=0}^\infty \frac{1}{k!} \sum_{|\kappa|=k} \frac{\left[a\right]{\kappa}\left[b\right]{\kappa}}{\left[c\right]{\kappa}} Z_{\kappa}(\textbf{T})\]

with \(-c+\tfrac{1}{2}(j+1) \notin \mathbb{N}, 1 \leq j \leq m; ||\textbf{T}||<1\). Here \(Z_{\kappa}(\textbf{T})\) is a zonal polynomial.

Butler’s approximation takes the form

\[{}_2{F}_1(a,b;c;X) \approx \frac{c^{pc-p(p+1)/4}}{\sqrt{R_{2,1}}} \times \prod_{i=1}^p \left[\left(\frac{y_i}{a}\right)^a \left(\frac{1-y_i}{c-a} \right)^{c-a} (1-x_i y_i)^{-b} \right],\]

where \(X=\text{diag}(x_1,\ldots,x_p)\), \(S_i = x_i y_i (1-y_i)/(1-x_i y_i)\), \(\tau_i = x_i(b-a)-c\),

\[y_i=\frac{2a}{\sqrt{t_i^2 - 4ax_i(c-b)}-\tau_i}, \text{ and }\]
\[R_{2,1} = \prod_{i=1}^p \prod_{j=i}^p \left[\frac{y_i y_j}{a}+\frac{(1-y_i)(1-y_j)}{c-a}-\frac{b}{a(c-a)} S_i S_j \right].\]

An example (CDF):

>>> from mpfunlab import fpm, mpm
>>> mpm.dps = 40; x = 12; nu = 10; nc = 30
>>> dx = dec.hypermat_2f1_butler(x, nu, nc); mx = mpm.hypermat_2f1_butler(x, nu, nc)
>>> ix = ipm.hypermat_2f1_butler(x, nu, nc); fx = fpm.hypermat_2f1_butler(x, nu, nc)
>>> gx = gmp.hypermat_2f1_butler(x, nu, nc); ax = apm.hypermat_2f1_butler(x, nu, nc)
>>> mpm.show([dx, mx, ix, fx, gx, ax])
dec:  3.113877423416836055714616090074444149943E-1
mpm:  3.113877423416836055714616090074444149943e-1
ipm:  3.113877423416836055714616090074444149944e-1 (4.147e-38%)
fpm:  3.11387742341684E-01
gmp:  3.113877423416836055714616090074444149943E-01
ipm:  3.113877423416836055714616090074444149943e-1 (4.055e-38%)

Comparison with MATLAB: some results#

Text for examples

Matlab insert

EXAMPLE 1: CF of log MeansRatio RV with and n = 5 and alpha = 7/2

1n     = 5;
2alpha = 7/2;
3t     = linspace(-100,100,201);
4cf    = cf_LogRV_MeansRatioW(t,n,alpha);
5figure; plot(t,real(cf),t,imag(cf)); grid on;
6title('CF of log MeansRatio RV with and n = 5 and alpha = 7/2')