# Evaluating the Gamma function

So I found out about the gamma function yesterday and I spent a bunch of time trying to evaluate certain values like $0.5!=\Gamma \left(1.5\right)$. I used multiple integration by parts, and in the end I always get $0=0$. How can someone compute gamma function values for all real numbers manually? I want to evaluate the integral by hand without using previous simplified equations for certain values. Thank you.

• Do you have some work people could look at? – Epiousios Aug 8 '17 at 16:44
• There's no good way for general values. At the half integers $\pi$ enters: see en.wikipedia.org/wiki/Gamma_function – Ethan Bolker Aug 8 '17 at 16:44
• Possible duplicate of Why is $\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$ ? – user296602 Aug 8 '17 at 16:44
• i dont want to use simplified functions, i want to know how to compute the integral by hand, Ethan. – David Sousa Aug 8 '17 at 16:46
• Is this question focused on $\Gamma(3/2)$ or is it supposed to be more general? – Simply Beautiful Art Aug 8 '17 at 16:48

## 1 Answer

First off, the sad truth is that there are no known closed forms of the Gamma function for irrational values.

So, if you wanted to approximate the Gamma function for irrational values, presumably by hand, you might wish to implement the following limit formula, a consequence of the Bohr-Mollerup theorem.

$$\Gamma(s)=\lim_{n\to\infty}\frac {n^s(n!)}{s^{(n+1)}}$$

Where we use the rising factorial to denote $s^{(n+1)}=s(s+1)\dots(s+n)$.

As an example,

$$\Gamma(1/2)=\lim_{n\to\infty}\frac{\sqrt n(n!)}{(1/2)^{(n+1)}}=\lim_{n\to\infty}\frac{\sqrt n(n+1)4^{n+1}(n!)^2}{(2n+2)!}$$

Approximating with $n=9$, one finds that

$$\Gamma(1/2)\approx1.70264$$

Which is pretty close to $\sqrt\pi=1.77245$.

Anyways, to the fun stuff!

It's easy to see by integration by parts that

$$\Gamma(x+1)=x\Gamma(x)$$

And thus,

$$\Gamma(3/2)=\frac12\Gamma(1/2)$$

From there, I recommend browsing through these answers.

A perhaps more useful formula might be

$$\Gamma(s)\Gamma(1-s)=\frac\pi{\sin(\pi s)}$$

A variety of proofs from the integral definition may be found from One-line proof of the Euler's reflection formula. However, this formula provides no light on how to evaluate other values, such as

$$\Gamma(1/3)=\frac{\pi^{2/3}2^{2/3}}{3^{1/12}\operatorname{agm}(1,3^{1/4}2^{-1/2})^{1/2}}$$

$$\Gamma(1/4)=\frac{2^{1/2}\pi^{3/4}}{\operatorname{agm}(1,2^{-1/2})}$$

where $\operatorname{agm}$ is the arithmetic-geometric mean defined by

$$\operatorname{agm}(x,y)=\lim_{n\to\infty}a_n\\a_0=x,~g_0=y\\a_{n+1}=\frac{a_n+g_n}2,\quad g_n=\sqrt{a_ng_n}$$

This is the closest thing to a closed form one can provide for rational values that are not halves of integers.

Portions on how to find values at such values are given in this PDF.

To find the values of $\Gamma(1/2)$ and $\Gamma(1/4)$, note that

$$\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}=\int_0^1t^{x-1}(1-t)^{y-1}~\mathrm dt$$

Setting $x=y=\frac12$, we find that

$$\Gamma(1/2)^2=\int_0^1t^{-1/2}(1-t)^{-1/2}~\mathrm dt$$

Let $t=u^2$ to get

$$\Gamma(1/2)^2=2\int_0^1\frac{\mathrm du}{\sqrt{1-u^2}}$$

This may be solved either geometrically (consider the arc length formula applied to a circle) or with a trig substitution, and it ultimately yields

$$\Gamma(1/2)^2=\pi\\\Gamma(1/2)=\sqrt\pi$$

For $\Gamma(1/4)$, let $2x=y=\frac12$ to get

$$\frac{\Gamma(1/4)}{\Gamma(3/4)}\sqrt\pi=\int_0^1t^{-3/4}(1-t)^{-1/2}~\mathrm dt$$

Let $t=u^4$ to get

$$\frac{\Gamma(1/4)}{\Gamma(3/4)}\sqrt\pi=4\int_0^1\frac{\mathrm du}{\sqrt{1-u^4}}$$

This is a complete elliptic integral, which gives

$$\frac{\Gamma(1/4)}{\Gamma(3/4)}\sqrt\pi=4\mathrm K(i)=\frac{2\pi}{\operatorname{agm}(1,\sqrt2)}$$

Applying the reflection formula,

$$\Gamma(3/4)=\frac\pi{\sin(\pi/4)\Gamma(1/4)}=\frac{\pi\sqrt2}{\Gamma(1/4)}$$

$$\Gamma(1/4)^2=\frac{2^{3/2}\pi^{3/2}}{\operatorname{agm}(1,\sqrt2)}$$

$$\Gamma(1/4)=\frac{2^{3/4}\pi^{3/4}}{\operatorname{agm}(1,\sqrt2)^{1/2}}$$

By useing $\operatorname{agm}(ax,ay)=a\operatorname{agm}(x,y)=a\operatorname{agm}(y,x)$, the above may be rewritten as

$$\Gamma(1/4)=\frac{2^{1/2}\pi^{3/4}}{\operatorname{agm}(1,2^{-1/2})^{1/2}}$$

• Thank you for all the work that you put into righting this ! Im curious how did Euler reach to that formula ? I cant find a proof of it. Thank you – David Sousa Aug 9 '17 at 0:12
• Do you mean this one?$$\Gamma(x)\Gamma(1-x)=\frac\pi{\sin(\pi x)}$$If so, see here – Simply Beautiful Art Aug 9 '17 at 0:33
• yes that one @SimplyBeautifulArt – David Sousa Aug 10 '17 at 21:20
• @DavidSousa Well, one approach involves the Weierstrass factorization theorem. – Simply Beautiful Art Aug 10 '17 at 23:02