1) there's the integral formula which might be evaluated either explicitly or numerically (I have forgotten how to do this)
2) there's Stirling's formula which can you give you an approximation of gamma(2.5) =gamma(1.5+1) = 1.258
3) there's the infinite series product formula which you could do in excel; after about 5,000 multiplications I get gamma(2.5)=1.329
4) excel also has a built-in function called gammaln which gives you the log of gamma; so I just took exp(gammaln(2.5)) = 1.32934
5) lastly Wolfram has an evaluator which gives gamma(2.5) = 1.32934 but can give you precision to an arbitrary number of digits
Not sure what numerical method excel or Wolfram are using to arrive at their number but they seem consistent.
.5!=.5√π
Therefore,
1.5!=1.5*5!=1.5*.5√π
and,
2.5!=2.5*1.5!=2.5*1.5*.5√π=1.875√π
So, any half factorials are exceptionally easy for that reason. But, for example, 3.3! would be more difficult. I mean, it'd be
3.3*2.3*1.3*.3!
But how do I figure out what .3! is?
Quote: etony33From what I've gathered, .5!=.5√π
That's how I remember it - "one factorial is one, and one-half factorial is one-half the square root of pi".
Quote: etony33But how do I figure out what .3! is?
It's gamma of 1.3 - which is the integral for x from 0 to infinity of (x(1.3 - 1) / ex) dx.
There's no easy way of reducing that; you need to use a numeric approximation method.
You don't. There is no analytical expression (this is why they create notations like ! or gamma or pi or e). Look it up in a table or run it on a software, you have the numerical value.Quote: etony33But how do I figure out what .3! is?
Quote: kubikulannYou don't. There is no analytical expression (this is why they create notations like ! or gamma or pi or e). Look it up in a table or run it on a software, you have the numerical value.
How does the software or those tables come up with those values then?
Quote: thecesspitHow does the software or those tables come up with those values then?
There are various ways to approximate integrals. For example, Simpson's Rule.
Quote: etony33The gamma function is simple for positive integers. But with any other number, it gets confusing. I tried looking it up, but don't understand what exactly to do. What would, for example, 2.5! be?
Fact(n)=Fact(n-1)
Gamma(n) = Fact(n-1)
Gamma(x) = Gamma(x-1)
Fact(0)=1
Gamma(t) for 0<t<1 is defined by
A function does not have to be algebraic, but it is must be well defined and produce one value for every input. As someone said earlier, there are numerous ways to approximate integrals. A spreadsheet will supply good numerical approximations.
Quote: pacomartinFact(n)=Fact(n-1)
Gamma(n) = Fact(n-1)
Gamma(x) = Gamma(x-1)
Fact(0)=1
Gamma(t) for 0<t<1 is defined by
A function does not have to be algebraic, but it is must be well defined and produce one value for every input. As someone said earlier, there are numerous ways to approximate integrals. A spreadsheet will supply good numerical approximations.
Not quite right.
A: I'm sure this is just a typo, but Fact(n) = n*Fact(n-1) and Gamma(x) = (x-1)*Gamma(x-1)... of course, or the factorials would just be 1, 1, 1, 1, 1, etc.
B: That integral actually converges (and is the answer) for any real number greater than or equal to 1 (and in fact, not for 0 < t < 1, where it blows up around the y-axis), or complex number with a real part greater than or equal to 1. It can be extended to negative non-integers as you say (including complex numbers with whole negative real parts, starting at 1 + bi).
That leaves the problem of the infinite sum. This can be worked out by setting a finite interval - call it 0 through a - in which to explicitly work out the sum, and designating the rest the "tail." a should be greater than t-1, so that we get to use the left endpoints of the tail as the maxima and the right endpoints as the minima. That way, for the upper bound, we're simply adding s*Σ((a + ns)t-1*e-(a+ns)) from n = 0 to ∞, and the lower bound is as easy as subtracting the first term, or would be except for one issue: as far as I know, there's no closed form for that sum. However, it can be said that it'll be strictly less than e-a*at-1*Σ(e*(1+s/a)1-t)-ns, and strictly more than e-a*at-1*Σe-ns. So what we get for the tail - let's call it z - is that s*e-a*at-1/(1 - (1+s/a)st-s/e-s)) > z > s*ea*at-1*(1/(1-e-s) - 1).
So to answer your question, how would you work out 2.5! (although it's more proper to write Π(2.5)), which is equal to Γ(3.5)? We'll set the step length at 1/2, and the length of the interval to be directly calculated at 10, which won't produce a great answer, but it'll serve to illustrate (and to illustrate why you really shouldn't try to do this by hand).
For the finite part, we get:
f(0) ≈ 0
f(0.5) ≈ 0.10722
f(1) = 1/e ≈ 0.36788
f(1.5) ≈ 0.61487
f(2) ≈ 0.76557
f(2.5) ≈ 0.81117
f(3) ≈ 0.77610
f(3.5) ≈ 0.69205
f(4) ≈ 0.58610
f(4.5) ≈ 0.47721
f(5) ≈ 0.37666
f(5.5) ≈ 0.28993
f(6) ≈ 0.21858
f(6.5) ≈ 0.16195
f(7) ≈ 0.11822
f(7.5) ≈ 0.085201
f(8) ≈ 0.060725
f(8.5) ≈ 0.042859
f(9) ≈ 0.029989
f(9.5) ≈ 0.020821
f(10) ≈ 0.014356
So we add this up, and for the interval, get an upper bound of 3.70714 and a lower bound of 2.90315. (Yikes!) Then we work out the tail by the formula above and get 0.020202 > z > 0.011065, so the answer is somewhere between 2.914 and 3.727. There are more sophisticated methods the computers use, but I'm working a bit off the cuff here; with enough computing power, you could, by increasing a and decreasing s, write a program to work it out to arbitrary precision by this method.
(If this post contains any errors - and I know I made and fixed a rather ludicrous sign error in that second paragraph - I blame my old frenemy Wild Turkey. Wolfram gives the answer as 3.32335, so at least I'm not catastrophically wrong.)