Composite Gamma function simplification

235 Views Asked by At

I'm running some python code using the gamma function and it involves dividing one gamma function with another. Unfortunately because both the numerator and denominator are so large, python outputs a maths range error, even though the fraction is equivalent to a small finite number. Therefore it needs to be simplified.

Here is the function I therefore need to simply ( attached as a picture):

Composite gamma functions that need to be simplified

2

There are 2 best solutions below

1
On BEST ANSWER

HINT: Use the Beta function and ist symmetry in the two arguments.

It holds: $\Gamma(m + \beta + 1) \Gamma(k + \alpha + 1) = B(m + \beta + 1, k + \alpha + 1) \Gamma(m+k+ \beta + \alpha + 2)$.

In the denominator it holds a similar identity; use the symmetry of the Beta function to simplify.

0
On

I do not know the kind of accuracy you expect. So, forgive me if I am off-topic.

What I should do is : take the logarithms and for each logarithm of any gamma function, use Stirling series (http://en.wikipedia.org/wiki/Stirling%27s_approximation) $$\log(n!)=n\log(\frac ne) + \frac 12 \log(2\pi n)+\log(1+\frac{1}{12 n}+\frac{1}{288 n^2}-\frac{139}{51840 n^3}+\cdots)$$ When all terms will have been added, exponentiate the result.