How to evaluate the gamma function for non-integers

In summary: But I can't really explain what this pattern is, or how to make it into a number. :(In summary, the gamma function can be approximated for non-integers by taking a Limit as n approaches infinity. This approximation is based on the fact that the function is continuous and equal to the factorial evaluated for positive integers.
  • #1
David Carroll
181
13
Hello, everyone. After my discovery some time ago of the gamma function \int_a^b x^{-n}e^{-x}dx
(where b = infinity and a = 0...sorry, haven't quite figured out LaTex yet...and actually the foregoing is the factorial function [I think it's silly that the argument has to be shifted down by one]), I've tried my darnedest to evaluate this integral for non-integer values.

I've figured out how to do it for n = 1/2 by using the u-substitution x = u^2 and then converting to polar coordinates to yield \int_a^b x^{-n}e^{-x}dx = (pi^.5)/2. But I'm stuck as far as using any other rational numbers, much less irrational numbers for n.

When I try to evaluate the function for non-integers, the only sensible thing to do, it seems, is to integrate by parts. But then I get an infinite number of parts (all of which create a pattern, but I don't know how to make numberical sense out of this pattern).

Could someone help me out here?
 
Physics news on Phys.org
  • #2
Woah. That is one ugly post! Sorry about botching the latex, guys. And that should be a positive "n" in the integrand...not a negative "n".
 
  • #3
There isn't really one way to calculate the gamma function at any point. There are however several identities one can use in special cases - you just established one with your transformation x=u^2 (but your result might be off by a factor of 2).
For half-integers for instance, you can make use of $$\Gamma(z)\Gamma(z+\frac{1}{2})=2^{1-2z}\sqrt{\pi}\Gamma(2z)$$.
Now depending on which non-integers you are interested in, such formulas may or may not be enough - in the general case, they aren't, and you will need to use a numerical solution, typically based on a series.

Have a look at http://en.wikipedia.org/wiki/Gamma_function, and if you want many more, go for Abramowitz and Stegun (a math library will have a copy) which has a wealth of formulas of all sorts related to the Gamma function - among others.

Or you could just type for instance "0.17!" in a google search bar, to get ##\Gamma(1.17)## : )
 
Last edited:
  • #4
Thank you.
 
  • #5
1. I did discover a way to approximate the factorial function for non-integer values. It is only useful insofar as it is taken as granted that evaluating the factorial for positive integers is straightforward whereas evaluating it for non-integers is not so straightforward.

2. Consider some real number r, where 0 < r < 1. An approximate solution for r! is [(n!)(n + 1)^r]/[(n + r)(n + r - 1)(n + r - 2)***(1 + r)], where n is a positive integer, and the limit of this "function" as n approaches infinity is equal to r! [or gamma(r + 1)].

3. I'm still trying to find a proof of this approximation, which I discovered on my own (*pats own back*...*toots own trumpet*). Up to now, I've only gotten as far as saying that the above is intuitively plausible.

4. It is intuitively plausible because of the following: Consider a tentative definition of the factorial function for non-integers to be this: (n + r)! = (n!)(n + 1)^r - where n is a positive integer and r is greater than or equal to zero but less than or equal to 1. This will ensure that the function is A) continuous throughout the positive real number line AND B) that the function is equal to what we know to be the factorial evaluated for positive integers. For example, 6! is (5 + 1)! = (5!)(5 + 1)^1...or, equivalently, 6! is (6 + 0)! = (6!)(6 + 1)^0.

5. To approximate the ACTUAL factorial evaluated at r (i.e. in addition to having qualities A and B above, we have (C), the function is differentiable throughout the positive real number line), pick some arbitrarily large integer "n" and perform the aforementioned operation in paragraph 2 above. Intuitively, the larger n is, the smaller the error is between the actual factorial function and (n!)(n + 1)^r...and therefore performing the latter operation and dividing the result by (n + r)(n + r - 1)(n + r - 2)***(1 + r) will yield an approximate solution for r!
 
  • #6
This, incidentally, results in an interesting way to approximate pi:

Pi = lim(n approaches infinity) [4(n!)^2(n + 1)]/[(n + r)^2(n + r - 1)^2(n + r - 2)^2***(1 + r)^2]

The above identity could possibly be important as far as proving the Riemann hypothesis. I'm still toying with it.
 
  • #7
Well done. As far as I can tell, your approximation is indeed correct, it is very close (up to a factor that is fairly close to one in your case, and converges to one) to a formula due to Gauss which does converge to Gamma(r+1), so it looks like you're on the right track.
 
  • #8
Actually, I was wrong about the reason why it works. An infinite number of possible functions could have all three of the above quoted characteristics and yet only one of these is the gamma function(...+ 1).

For example, imagine a sine-wavey sort of function which has a derivative of zero twice between each integer.

So, to tell you the truth I don't know why my "function" converges correctly.
 
  • #9
Well, it was a good move coming up with the formula already. There's a proof using Stirling's formula (here) but otherwise I don't know either. Maybe someone else on the forum can tell us more.
 
  • #10
I suppose it has something to do with minimizing arc length. I tried to do this by using the arc-length formula Integral(0 to x) sqrt(1 + {[t!]'}^2)dt, then differentiating that via the Second Fundamental Theorem of Calculus and equating the result to zero, obtaining sqrt(1 + {[x!]'}) = 0, but then I realized several mistakes:

a) the arc-length is not minimized for just any value of x!, but only throughout the entire positive real number line in total. Otherwise, if we chose x = 1, we'd simply get a straight line from 0! to 1! to minimize that particular section of the arc length.

b) Even if we minimized the arc length, it doesn't follow that the derivative of the arc length formula would equal to zero. If that were the case, we'd get x! = x*(imaginary unit), which is patently false.

c) We're assuming that (x!)' is defined. And since the whole purpose of this excursion is to define f(x) = x!, it would be silly to assume we've already defined f'(x) = (x!)'.

So, I'm at an utter loss.
 
  • #11
Why would it have to do with minimizing arclength ? That would be true if the Gamma function satisfied a specific second order differential equation - maybe it does, but I'm not aware of it.
 
  • #12
I don't find the proof from Stirling's formula satisfying here because it seems this just moves the substance of the proof, which becomes proving Stirling's formula. But maybe you could start from there though, look at Stirling's formula's existing proofs of try doing one from scratch.
 
  • #13
Well, I don't know how to prove it, but it seems to me that the gamma function (again, with the argument shifted up one: Gamma(r + 1)) satisfies the following three conditions:

Define the factorial function such that:

1) it is continuous throughout the entire positive real number line
2) it is differentiable throughout the entire positive real number line
3) the arc length throughout the entire positive real number line is minimized
 
  • #14
I don't know about condition 3. As far as I know it's not part of the definition and I don't have a reason to think it holds true.

What is part of the definition, or at least does hold true, is that the Gamma function is analytic over the complex plane (minus it's poles). This is I think what defines it uniquely as an extension of the factorial over integers, together with the relation between its values at z and z+1.
 
  • Like
Likes David Carroll
  • #15
wabbit said:
What is part of the definition, or at least does hold true, is that the Gamma function is analytic over the complex plane (minus it's poles). This is I think what defines it uniquely as an extension of the factorial over integers, together with the relation between its values at z and z+1.

No, the conditions for uniqueness are given in the Bohr-Mollerup theorem.
 
  • #16
Does the gamma function minimize not the arc length, but the "bending energy" of its curve (for x > 0)? I.e. is it the only solution to its iterative functional equation ([itex]\Gamma(x+1) = x \Gamma(x)[/itex]) with the minimal bending energy? (The bending energy is the integral of the squared _curvature_ with respect to the arc-length _parameterization_)
 
  • #17
pwsnafu said:
No, the conditions for uniqueness are given in the Bohr-Mollerup theorem.
Oops, yes, thanks for the correction.
 
  • #18
sshai45 said:
Does the gamma function minimize not the arc length, but the "bending energy" of its curve (for x > 0)? I.e. is it the only solution to its iterative functional equation ([itex]\Gamma(x+1) = x \Gamma(x)[/itex]) with the minimal bending energy? (The bending energy is the integral of the squared _curvature_ with respect to the arc-length _parameterization_)

I'll have to brush up on my formulas for curvature, but it sounds promising, sshai45.

What I was trying to hit on is based on the following intuitive notion:

Define the factorial function so that it is differentiable and continuous throughout the entire positive real number line. Now, given those stipulations, imagine a string that is tied at one end to 0! and that approaches infinity at the other "end" (paradoxical as that may sound). Draw and tighten this string until it is completely taut and such that the resulting function that this string represents is still differentiable throughout the entire positive real number line.

This, I believe, is the minimization of arc length that I was trying to grasp at. I also believe that everything else (analytic continuation, function values for negative numbers, etc.) will follow. For example, given that (n-1)! is equal to n!/n, we should know immediately that the function will diverge at negative integers. I.e. 0!/0 diverges, therefore (-1)! diverges and so does (-2)!, etc.
 

Related to How to evaluate the gamma function for non-integers

1. What is the gamma function and why is it important?

The gamma function is a mathematical function that extends the concept of factorial to real and complex numbers. It is important because it has applications in various fields such as statistics, physics, and engineering.

2. How is the gamma function evaluated for non-integer values?

The gamma function can be evaluated using various methods, such as the Lanczos approximation or the Stirling's approximation. These methods involve complex mathematical algorithms and are often implemented in computer software or calculators.

3. Can the gamma function be evaluated by hand for non-integer values?

No, the gamma function cannot be evaluated by hand for non-integer values as it involves complex mathematical calculations and the use of special functions.

4. Are there any special cases for evaluating the gamma function for non-integer values?

Yes, there are some special values for which the gamma function can be evaluated easily. For example, the gamma function of 1/2 is equal to the square root of pi, and the gamma function of 1 is equal to 1.

5. Can the gamma function be used to solve real-world problems?

Yes, the gamma function has many applications in solving real-world problems, such as in calculating probabilities, determining the area under a curve, and in statistical analysis.

Similar threads

Replies
3
Views
1K
Replies
9
Views
3K
Replies
6
Views
2K
Replies
1
Views
2K
Replies
200
Views
25K
Replies
2
Views
2K
Replies
1
Views
1K
Back
Top