Since the gamma function is an analytic continuation of the factorial function, we can find the factorial of complex values. How does one go about doing so? I've looked far and wide on the internet and am able to find values via wolfram alpha, but how can I calculate them myself. This is out of pure curiosity. Can we use the integral definition of the Gamma function and then some numerical technique like Simpson's Rule to approximate the complex integral? Please if someone could point me in the right direction or if its not too much to ask provide an example. Thank you very much.

  • $\begingroup$ What exactly do you mean by "calculate" (resp "find"). You mean, numerically, to a few decimal places? $\endgroup$ – Peter Franek Jul 23 '14 at 19:55
  • $\begingroup$ Use the definition of $\Gamma(z+1)$ and plug it in? Or use a convergent series of your choice when in its radius of convergence? $\endgroup$ – AlexR Jul 23 '14 at 19:56
  • 4
    $\begingroup$ This earlier question looks to be what you want: Algorithm to compute gamma function. $\endgroup$ – Semiclassical Jul 23 '14 at 19:57
  • 1
    $\begingroup$ I want to find how i! is calculated. Since gamma(n)=(n-1)!, I would think that gamma(i+1)=i!. Which definition of the gamma function will work here? $\endgroup$ – mathamphetamines Jul 23 '14 at 20:00
  • 1
    $\begingroup$ Glendon Pugh's thesis (2004), An analysis of the Lanczos Gamma approximation, will give more information about the complex domain than the Wikipedia article does. $\endgroup$ – hardmath Jul 23 '14 at 20:06

Since there are no answers and some good ideas in the comments, I will try to make this a nice coherent answer.

As one noticed:


This takes care of complex numbers almost entirely. In fact, it helps reduce the problem to purely imaginary inputs if we have:


And $a$ is any integer.

However, the methods we use to solve this problem work for complex values and imaginary values: we use approximations.

Imagine trying to find $\Gamma(0.5)$. The best (simplest?) way to solve this is to write it out as an integral and solve the integral the same way we solve an unsolvable integral, we use the summation method. And amazingly, the summation method works for complex numbers.

Also note that the summation converges very rapidly, so we only have to approximate the summation. That is, solve the integral from $x=0$ to $x=10$ using approximated rectangles with a width of $\Delta x=0.001$. Doing this, we get a very good approximation for $\Gamma(0.5)$. Want to get a better approximation? Reduce $\Delta x$ or increase the integral closer to $\infty$.

Apply the same method for complex numbers.

  • $\begingroup$ So I can use Riemann Sums to evaluate the integral definition of the gamma function for complex values? $\endgroup$ – mathamphetamines Jan 21 '16 at 3:28
  • $\begingroup$ @mathamphetamines Yes, I would believe so. (to be honest, calculus isn't my strongest area) You can see from the definition of the gamma function that it will converge because of how fast the exponential goes to $0$ compared to $x^{z-1}$, which won't grow fast enough to make the integral diverge. $\endgroup$ – Simply Beautiful Art Jan 23 '16 at 0:44
  • $\begingroup$ And thank you for the challenge. $\endgroup$ – Simply Beautiful Art Jan 23 '16 at 1:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.