A method for approximating a hypergeometric function to an elementary function

196 Views Asked by At

I found the following hypergeometric function as the antiderivative of some function in the interval where x is between 0 and 1.

${}_2F_1(-\frac{1}{k}, \frac{1}{k}; 1 + \frac{1}{k}; x^k)x$

Or by limiting it to a definite integral over the interval between 0 and 1.

$\frac{Γ(1 + \frac{1}{k})^2}{Γ(\frac{2 + k}{k})}$

More precisely, above functions are the definite and the indefinite integral of the function

$(1 - x^k)^{\frac{1}{k}}$.

I expected this(first one) function to fulfill my purpose sufficiently, but calculating the above functions in an environment where I need to use this function consumes computational resources excessively. Therefore, to solve this, I try to use an elementary approximation function that has a form similar to the above function.

What I'm struggling with in this problem is that the parameter k is free. It cannot be approximated by a simple series expansion. I'd like to ask if there is any known good way to do this. Thank you.

*In addition, k has a Log-normal distribution centered at k = 1.

1

There are 1 best solutions below

3
On

I don't know how much accuracy you need but here are some approximations that are not too difficult to write down. Write

$$F_k(x) = \int_0^x (1 - t^k)^{\frac{1}{k}} \, dt.$$

We want some simple approximations for $x \in [0, 1]$ and $k$ a parameter. I assume that $k \ge 1$. The simplest nontrivial bound available here is Bernoulli's inequality $(1 - t^k)^{\frac{1}{k}} \le 1 - \frac{t^k}{k}$ (these are the first two terms of the Taylor series), which gives

$$F_k(x) \le \int_0^x \left( 1 - \frac{t^k}{k} \right) \, dt = x - \frac{x^{k+1}}{k(k+1)}$$

which should be very accurate (the error is $O(x^{2k+1})$) for small $x$ and fairly accurate as long as $x$ is not too close to $1$. To pick some specific numbers, WolframAlpha gives $F_{10}(0.8) \approx 0.79920$ while the approximation above gives $\approx 0.7992 \color{red}{2}$.

If $x$ is close to $1$ (more precisely, once $x$ gets to around $1 - O \left( \frac{1}{k} \right)$) then the $t^k$ term gets close to $1$ and this approximation will become worse; in that case we should change variables to $y = 1 - x$ and $s = 1 - t$. This gives

$$\begin{align*} F_k(x) &= \int_0^1 (1 - t^k)^{\frac{1}{k}} \, dt - \int_x^1 (1 - t^k)^{\frac{1}{k}} \, dt \\ &= F_k(1) - \int_0^y (1 - (1 - s)^k)^{\frac{1}{k}} \, ds \end{align*}$$

where

$$1 - (1 - s)^k = 1 - (1 - ks + O(k^2 s^2)) = ks + O(k^2 s^2)$$

(this approximation requires $s$ to be $o \left( \frac{1}{k} \right)$ to really be valid or else we should be doing something else), giving $(1 - (1 - s)^k)^{\frac{1}{k}} = (ks)^{\frac{1}{k}} (1 + O(ks))^{\frac{1}{k}} = (ks)^{\frac{1}{k}} (1 + O(s))$ and, altogether,

$$\begin{align*} F_k(1 - y) &= F_k(1) - k^{\frac{1}{k}} \int_0^y \left( s^{\frac{1}{k}} + O \left( s^{1 + \frac{1}{k}} \right) \, \right) ds \\ &= F_k(1) - k^{\frac{1}{k}} \left( \frac{ky^{1 + \frac{1}{k}}}{k+1} + O \left( y^{2 + \frac{1}{k}} \right) \right). \\ \end{align*}$$

Again to pick some specific numbers, WA gives that $F_{10}(0.95) \approx 0.94381$ while the approximation above gives $0.98573 - 0.04241 \approx 0.943\color{red}{32}$, giving ourselves the freedom to ask WA to evaluate $F_k(1)$. Our previous approximation gives $0.94\color{red}{483}$ which is still pretty good, only about twice as much error.

It remains to estimate $F_k(1)$. We can use the exact evaluation in terms of the Gamma function. Skipping over some tedious calculations we can ask WolframAlpha for the Taylor series of $\frac{\Gamma(1 + x)^2}{\Gamma(1 + 2x)}$ and WA happily reports that it is $1 - \frac{\pi^2 x^2}{6} + O(x^3)$, which gives

$$F_k(1) = \frac{\Gamma \left( 1 + \frac{1}{k} \right)^2}{\Gamma \left( 1 + \frac{2}{k} \right)} = 1 - \frac{\pi^2}{6k^2} + O \left( \frac{1}{k^3} \right).$$

Picking some specific numbers again, WA gives $F_{10}(1) \approx 0.98573$ while the above gives $0.98\color{red}{355}$ and our very first approximation gives $0.9\color{red}{9091}$. If more accuracy is desired you could use the cubic term of the Taylor series too.

Altogether this gives the following:

$$\boxed{ F_k(x) \approx \begin{cases} x - \frac{x^{k+1}}{k(k+1)} & \text{ if } x \text{ not too close to } 1 \\ 1 - \frac{\pi^2}{6k^2} - \frac{k^{1 + \frac{1}{k}}}{k+1} (1 - x)^{1 + \frac{1}{k}} & \text{ if } x \text{ close to } 1 \end{cases} }$$

where the switch between the two cases happens somewhere around $x = 1 - O \left( \frac{1}{k} \right)$ as described previously but it might be better to do numerical experiments to check. This approximation is noticeably worse near $1$ than near $0$; all the arguments used here could be tightened up to produce better approximations (taking more terms of various Taylor series) so it just depends on what regimes you need accuracy in and how much accuracy.