# Why is the gamma function so complex?

1. Jun 11, 2007

### ktoz

Hi

The compound summation formula

$$v = \frac{(m + l)!(al + a + cm)}{m!(l + 1)!}$$

listed in the "Solve v = f(x) for x" thread uses factorials and in an effort to extend it to non-integral values of "m" and "l", I stumbled across the gamma function http://en.wikipedia.org/wiki/Gamma_function" [Broken]. Why was it necessary to create such a complicated function just to extend fatorials to non-integers?

Before looking it up, I took a crack at creating a factorial extension and mine seem much more straightforward. Standard factorials are defined like this.

m! = m(m - 1)(m - 2)(m - 3)...(m - m + 1)

if you start from zero, rather than m, you get the exact same answer but it's much easier to calculate.

1 * 2 * 3 * 4 ... * m

Extending this for non integral factorials seems like it would be as simple as

1a * 2a * 3a * 4a ... *ma

Which can be simplified to

a^m * m!

Here, "a" could be any type of number, positive, negative, real, even complex and it seems to be a simple, logical way to extend factorials, so I'm wondering why the gamma is so complex, incorporating integrals, "e" limits etc... and what benefits that complexity adds to the mix.

Last edited by a moderator: May 2, 2017
2. Jun 11, 2007

### ktoz

Never mind

Sorry. I tried a few examples with my method and got absurd values (like $$\pi! = 186$$) and had no way to handle $$(\frac{a}{b})!$$

3. Jun 11, 2007

### lalbatros

If you look the graph of Gamma(x) for x real and x>=1 , you will realize that it is not at all a complicated function.
If you think at the values for x<1 or x<0, maybe you find it makes sense.
Additionally, the integral definition of Gamma appears naturally and very often in physics and statistics. Why then choosing something else.
Futher, you should try to make a graph of the function you defined and compare it to Gamma.
(maybe you need to refine your definition)

Postscriptum
=========
My understanding of your definition is that it would be based on the neearest integer below the value of x.
So if y = int(x), then you would define x! = (x/y)^y y!, isn't it?

Last edited: Jun 11, 2007
4. Jun 11, 2007

### matt grime

This is supposed to be m!, right? So how do you get to choose what a is given m? Or is it (ma)!, and in that case given x how do I choose from the infinitely many choices of decomposition for x=am with m an integer?

5. Jun 11, 2007

### Gib Z

The best way to see if your function is a generalization of the factorial is to see if its values match up with it. Of course sometimes you can make "a" to fit the solution, but sometimes you can't.

6. Jun 11, 2007

### ktoz

That was he main issue as "a" isn't intrinsic to m. My methosd only works correctly if a = 1. Otherwise you get strange results like $$\pi! > 186$$ where logic would indicate that $$3! < \pi! < 4!$$

I'll take another look at the gamma and try to figure it out.

Thanks all

7. Jun 11, 2007

### matt grime

Why would logic dictate that? There is no reason to suppose that whatever the factorial generalizes to, that it must map R to R and also be monoton increasing.

8. Jun 11, 2007

### ktoz

If not logic then intuition

$$3 < \pi < 4$$
$$3^2 < \pi^2 < 4^2$$
$$a3 < a\pi < a4$$

Doesn't mean any of the above has any bearing on a!, but it seems to be the most intuitive place to start for those who've never heard of the gamma function.

After thinking about the problem more, it's obvious that my method doesn't cut it so I'm going to try to understand gamma.

9. Jun 11, 2007

### matt grime

Of course, your third example or 'intuition' is wrong if a is not a strictly positive number. Have you considered applying sin, cos, tan, arcsin (would be a complex result), the function x^4 - x^3+3*floor(x^1/8), or any other function that is not monotone increasing?

10. Jun 11, 2007

### ktoz

Heh, nope. Strike three for intuition : )

Bottom line, I know I'm wrong, so will seek out the right factorial extension and that seems to be gamma

11. Jun 11, 2007

### uart

$$1.1 < 1.5 < 1.9$$

BUT

$$\Gamma(1.5) < \Gamma(1.1)$$

and

$$\Gamma(1.5) < \Gamma(1.9)$$

12. Jun 16, 2007

### ktoz

I looked at the gamma and am getting a handle on it but, just for curiosity's sake, say you want to construct a function that calculates the points between integer factorials such that

f(n) = n!
f(n) < f(n + 1/10) < f(n + 11/100) < f(n + 111/1000) etc, to any degree of precision, and have the calculated values be proportionally correct?

I tried the following, along with several other methods, but nothing seemed to work.

(n + 1)! = n! + a*((n + 1)! - n!)

When a = 1, this works and the thought was that for numbers with fractional parts, setting a=fractional part would yeild a smooth curve, but it doesn't.

The basic problem seems to be choosing a unit for n that yeilds the "natural" or "intuitive" value.

$$\frac{a}{b} \times \frac{a - n}{b} \times \frac{a - 2n}{b} \times \frac{??}{b}$$

Anyone have an idea if this is possible? Or if not, an explanation as to why it's not?

Last edited: Jun 16, 2007
13. Jun 16, 2007

### JohnDuck

I don't have a whole lot to add, just a few observations. The first is that any function which generalizes the factorial couldn't possibly be strictly increasing, because 0! = 1! = 1. The closest you could achieve would be monotone increasing (replace "less than" with "less than or equal"), but this wouldn't be a smooth function, because between 0 and 1 there would be a horizontal line before it sharply "takes off" at 1.

Secondly, I don't quite follow your idea, but it seems to be based off using the "fractional part" of a number--but what about irrational numbers? They can't be expressed as fractions (i.e., a ratio of two integers). Irrational numbers don't have a "fractional part", so any generalization which relies on that would exclude them.

Thirdly, the gamma function is probably about the simplest, nicest generalization of factorials to be found. Honestly, if there were something simpler or "better" do you really think Euler would have overlooked it?

14. Jun 16, 2007

### ktoz

Both http://en.wikipedia.org/wiki/Factorial" [Broken] state that 0! is a convention which means an alternate convention of 0! = 0 could be adopted for a strictly increasing generalization.

I was thinking in terms of approximations of irrationals. We have techniques for calculating irrational approximations and I was thinking that some modification of these techniques could be used somehow to create these "artificial factorials."

I have no illusions about improving on Euler but it seemed like an interesting problem - trying to come up with a function that produces a smooth curve passing through all factorials.

Plus, I never studied Calculus, so whenever I see an integral (like http://en.wikipedia.org/wiki/Gamma_function" [Broken]), my brain locks up and interprets it as "math voodoo happens here" and voila! The correct answer!

Last edited by a moderator: May 2, 2017
15. Jun 18, 2007

### uart

I assume you meant,

(n + a)! = n! + a*((n + 1)! - n!)

Where 0 <= a < 1 is the "fractional" part.

That's only linear interpolation between the integer points (as in plot the integer points and then join the dots with straight lines). Just how smooth do you really expect that to be?

You could do higher order intepolation (or spline) using several points to get something smoother.

Also note that the Gamma function would be useful even if it didn't have that properly of extending factorial to non-integers. It has other applications as well, for example it's extensively in probabilty theory for reasons quite unrelated to its factoral connection.

Last edited: Jun 18, 2007