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 FranekJul 23, 2014 at 19:55
-
4$\begingroup$ This earlier question looks to be what you want: Algorithm to compute gamma function. $\endgroup$– SemiclassicalJul 23, 2014 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$– mathamphetaminesJul 23, 2014 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$– hardmathJul 23, 2014 at 20:06
-
1$\begingroup$ A simple method is to use the recursion relation to relate i! to a factorial of a complex number with a large modulus, e.g. (10+i)! and then evaluate (10+i)! using Stirling's formula (taking care to use the correct branch of z^z, exp(-z) etc.) $\endgroup$– Count IblisJul 23, 2014 at 20:09
1 Answer
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:
$$\Gamma(n+1)=n\Gamma(n)$$
This takes care of complex numbers almost entirely. In fact, it helps reduce the problem to purely imaginary inputs if we have:
$$\Gamma(n+a)$$
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$ Jan 21, 2016 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$ Jan 23, 2016 at 0:44
-
1$\begingroup$ And thank you for the challenge. $\endgroup$ Jan 23, 2016 at 1:57