[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Re: Incomplete Beta function for negative b ?
From: |
Lionel B |
Subject: |
[Help-gsl] Re: Incomplete Beta function for negative b ? |
Date: |
Tue, 29 Aug 2006 22:44:23 +0100 |
User-agent: |
Thunderbird 1.5 (Windows/20051201) |
Rodney Sparapani wrote:
Lionel B wrote:
Greetings,
I need values of gsl_sf_beta_inc (double a, double b, double x) for 0
< a < 1, -1 < b < 0. The incomplete Beta function is, as far as I
know, well-defined in this case.
I'm a bit stumped - haven't managed to find any identities involving
B(z;a,b) that work for me here...
Hi Lionel:
I stared at that for way too long before I tried it with Mathematica.
It turns out that the result is based on Hypergeometric 2F1 which are
available in GSL as well.
Hi,
Right, that's the way I'd programmed it originally, as it happens (and
sure, it works)... I guess I just wanted to use the incomplete Beta as
it is in some sense a "simpler" function than the hypergeometric - at
least in the sense that it takes fewer arguments.
As it happens, I think I've cracked it via the following identities:
firstly:
B(a,b;z) = B(a,b) - B(b,a;1-z)
to swap the negative b into the first argument position (the negative
argument in B(a,b) is not a problem as it is simple to derive an
equivalent expression in terms of positive arguments using elementary
properties of the Gamma function).
Secondly:
a B(a,b;z) = z^a (1-z)^b + (a+b) B(a+1,b;z)
allows to add one to 1 to the first (now negative) argument which in my
case suffices to yield all positive arguments (sorry if that's a bit
convoluted).
Lionel