Re: Beta[x,a,b]: how to get around bug
- To: mathgroup at smc.vnet.net
- Subject: [mg94387] Re: [mg94356] Beta[x,a,b]: how to get around bug
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 11 Dec 2008 07:27:21 -0500 (EST)
- Reply-to: hanlonr at cox.net
Since you know the workaround, define your own function.
beta[z_, a_, b_, n_: 10] :=
Module[{rz, ra, rb},
{rz, ra, rb} = Rationalize[{z, a, b}, 0];
N[Beta[rz, ra, rb], n]]
beta[-1.7, 1.39646, -0.37188]
-0.2065655322-0.6124813175 I
Bob Hanlon
---- "gam at iap.fr" <gam at iap.fr> wrote:
=============
I've encountered a bug with the incomplete Beta function (both
versions 6.0 and 7.0), which I just submitted to support.wolfram.com.
Beta[-1.7, 1.39646, -0.37188]
returns 0. + 0. i
however
Beta[N[-17/10, 10], N[139646/100000, 10], N[-37188/100000, 10]]
provides the correct answer: -0.20657 - 0.6125 i
There is a relation between Beta[z,a,b] and Hypergeometric functions
Beta[z,a,b] = z^a/a Hypergeometric2F1[a,1-b,a+1,z] = z^a/a
Hypergeometric1F1[1-b,a+1,z].
If I estimate Hypergeometric2F1[a,1-b,a+1,z] for my values of z=-1.7,
a=1.39646, b=-0.37188, I get
Hypergeometric2F1[1.39646, 1.37188, 2.39646, -1.7]
returns 0
However, if I use Hypergeometric1F1[1-b,a+1,z]:
Hypergeometric1F1[1.37188, 2.39646, -1.7]
this returns a plausible value of 0.420134
So I believe that Beta and Hypergeometric2F1 are bugged, but not
Hypergeometric1F1.
--
Bob Hanlon