Inverse gamma function
In-game article clicks load inline without leaving the challenge.

In mathematics, the inverse gamma function Γ − 1 ( x ) {\displaystyle \Gamma ^{-1}(x)} is the inverse function of the gamma function. In other words, y = Γ − 1 ( x ) {\displaystyle y=\Gamma ^{-1}(x)} whenever Γ ( y ) = x {\textstyle \Gamma (y)=x}. For example, Γ − 1 ( 24 ) = 5 {\displaystyle \Gamma ^{-1}(24)=5}. Usually, the inverse gamma function refers to the principal branch with domain on the real interval [ β , + ∞ ) {\displaystyle \left[\beta ,+\infty \right)} and image on the real interval [ α , + ∞ ) {\displaystyle \left[\alpha ,+\infty \right)}, where β = 0.8856031 … {\displaystyle \beta =0.8856031\ldots } is the minimum value of the gamma function on the positive real axis and α = Γ − 1 ( β ) = 1.4616321 … {\displaystyle \alpha =\Gamma ^{-1}(\beta )=1.4616321\ldots } is the location of that minimum.
Definition
The inverse gamma function may be defined by the following integral representation Γ − 1 ( x ) = a + b x + ∫ − ∞ Γ ( α ) ( 1 x − t − t t 2 − 1 ) d μ ( t ) , {\displaystyle \Gamma ^{-1}(x)=a+bx+\int _{-\infty }^{\Gamma (\alpha )}\left({\frac {1}{x-t}}-{\frac {t}{t^{2}-1}}\right)d\mu (t)\,,} where μ ( t ) {\displaystyle \mu (t)} is a Borel measure such that ∫ − ∞ Γ ( α ) ( 1 t 2 + 1 ) d μ ( t ) < ∞ , {\displaystyle \int _{-\infty }^{\Gamma \left(\alpha \right)}\left({\frac {1}{t^{2}+1}}\right)d\mu (t)<\infty \,,} and a {\displaystyle a} and b {\displaystyle b} are real numbers with b ≧ 0 {\displaystyle b\geqq 0}.
Approximation
To compute the branches of the inverse gamma function one can first compute the Taylor series of Γ ( x ) {\displaystyle \Gamma (x)} near α {\displaystyle \alpha }. The series can then be truncated and inverted, which yields successively better approximations to Γ − 1 ( x ) {\displaystyle \Gamma ^{-1}(x)}. For instance, we have the quadratic approximation:
Γ − 1 ( x ) ≈ α + 2 ( x − Γ ( α ) ) ψ ( 1 ) ( α ) Γ ( α ) . {\displaystyle \Gamma ^{-1}\left(x\right)\approx \alpha +{\sqrt {\frac {2\left(x-\Gamma \left(\alpha \right)\right)}{\psi ^{\left(1\right)}\left(\alpha \right)\Gamma \left(\alpha \right)}}}.}
where ψ ( 1 ) ( x ) {\displaystyle \psi ^{\left(1\right)}\left(x\right)} is the trigamma function. The inverse gamma function also has the following asymptotic formula Γ − 1 ( x ) ∼ 1 2 + ln ( x 2 π ) W 0 ( e − 1 ln ( x 2 π ) ) , {\displaystyle \Gamma ^{-1}(x)\sim {\frac {1}{2}}+{\frac {\ln \left({\frac {x}{\sqrt {2\pi }}}\right)}{W_{0}\left(e^{-1}\ln \left({\frac {x}{\sqrt {2\pi }}}\right)\right)}}\,,} where W 0 ( x ) {\displaystyle W_{0}(x)} is the Lambert W function. The formula is found by inverting the Stirling approximation, and so can also be expanded into an asymptotic series.
Series expansion
To obtain a series expansion of the inverse gamma function one can first compute the series expansion of the reciprocal gamma function 1 Γ ( x ) {\displaystyle {\frac {1}{\Gamma (x)}}} near the poles at the negative integers, and then invert the series.
Setting z = 1 x {\displaystyle z={\frac {1}{x}}} then yields, for the n th branch Γ n − 1 ( z ) {\displaystyle \Gamma _{n}^{-1}(z)} of the inverse gamma function (n ≥ 0 {\displaystyle n\geq 0}) Γ n − 1 ( z ) = − n + ( − 1 ) n n ! z + ψ ( 0 ) ( n + 1 ) ( n ! z ) 2 + ( − 1 ) n ( π 2 + 9 ψ ( 0 ) ( n + 1 ) 2 − 3 ψ ( 1 ) ( n + 1 ) ) 6 ( n ! z ) 3 + O ( 1 z 4 ) , {\displaystyle \Gamma _{n}^{-1}(z)=-n+{\frac {\left(-1\right)^{n}}{n!z}}+{\frac {\psi ^{(0)}\left(n+1\right)}{\left(n!z\right)^{2}}}+{\frac {\left(-1\right)^{n}\left(\pi ^{2}+9\psi ^{(0)}\left(n+1\right)^{2}-3\psi ^{(1)}\left(n+1\right)\right)}{6\left(n!z\right)^{3}}}+O\left({\frac {1}{z^{4}}}\right)\,,} where ψ ( n ) ( x ) {\displaystyle \psi ^{(n)}(x)} is the polygamma function.