I've come across an equation that needed use of the gamma function's functional inverse, and I know that you can't represent the functional inverse of the gamma function by any combination of elementary functions. I thought that there might be an approximation out there that I could use. However, I couldn't find any useful approximations of the inverse. Is there any chance someone might have one under their belt?
-
this answer has a decent approximation, but not an exact inverse. – robjohn May 13 '19 at 17:22
-
Closely related to, if not a duplicate of this question. – robjohn May 13 '19 at 17:26
-
@robjohn. The key issue with democracy is that we have the right to disagree and I do : decent is (for me) the most inappropriate qualifier for this approximation. For readers, it is beautiful ! – Claude Leibovici May 14 '19 at 09:58
1 Answers
I tried approaching it different ways, and one of them did, in fact, work out. For the first method, I tried inverting Stirling's approximation, but that didn't work. For the second, I tried rearranging terms in Stirling approximation and then inverting it, but that also turned up nothing. For method #3, I used a representation of $Γ(x+\frac12)$ and substituted all the gamma functions for Stirling's approximation and then tried to invert it, which worked.
METHOD #3: $Γ(x+\frac12)=\frac{Γ(2x+1)\sqrt{\pi}}{4^xΓ(x+1)}$
$Γ(x+1)\approx\sqrt{2\pi x}(\frac{x}{e})^x$
$Γ(x+\frac12)\approx\frac{\sqrt{4\pi x}{(\frac{2x}{e})}^{2x}\sqrt{\pi}}{4^x\sqrt{2\pi x}(\frac{x}{e})^x}=\frac{{2}^{2x}\sqrt{2\pi}{(\frac{x}{e})}^{2x}}{4^x(\frac{x}{e})^x}=\sqrt{2\pi}(\frac{x}{e})^x$
So $Γ(x+\frac12)\approx\sqrt{2\pi}(\frac{x}{e})^x$, which means that $Γ(x)\approx\sqrt{2\pi}{(\frac{x-\frac12}{e})}^{x-\frac12}$
Inverting...
$x=\sqrt{2\pi}{(\frac{y-\frac12}{e})}^{y-\frac12}$
$\frac{\ln(\frac{x}{\sqrt{2\pi}})}{e}=\frac{y-\frac12}{e}\ln(\frac{y-\frac12}{e})$
$W(\frac{\ln(\frac{x}{\sqrt{2\pi}})}{e})=\ln(\frac{y-\frac12}{e})$
${e}^{W(\frac{\ln(\frac{x}{\sqrt{2\pi}})}{e})+1}=y-\frac12$
${e}^{W(\frac{\ln(\frac{x}{\sqrt{2\pi}})}{e})+1}+\frac12=y$
So, an approximation for the functional inverse of the gamma function is ${e}^{W(\frac{\ln(\frac{x}{\sqrt{2\pi}})}{e})+1}+\frac12$, where $W(x)$ is the Lambert W Function.
-
When plotting it looks more like $+1/2$ rather than $-1/2$ – Benedict W. J. Irwin May 13 '19 at 16:16
-
For example I put Plot[{Exp[1+ProductLog[Log[Gamma[x]/Sqrt[2*Pi]]/E]]+1/2,x},{x,0,6}] into Wolfram Alpha. This relationship is pretty good for $x>2$. I think I remember seeing this formula a few years ago when I searched for inverse Gamma functions. – Benedict W. J. Irwin May 13 '19 at 16:20
-
https://mathoverflow.net/questions/12828/inverse-gamma-function This links it – Benedict W. J. Irwin May 13 '19 at 16:27
-