Incomplete Gamma Function

12182013, 06:02 AM
(This post was last modified: 01172014 05:19 AM by Namir.)
Post: #1




Incomplete Gamma Function
This program implements an incomplete Gamma function base don an HP25 program by Peter Henrici.
Memory Map R0 = X R1 = A R2 = L(n2) R3 = L(n1) R4 = s R5 = gamma(n) R6 = n R7 = tolerance Listing Code: 1 LBL a Usage 1. Enter the tolerance value and press [f][A]. The program automatically resumes with step 2. 2. Enter the values for A and X, and then press [A]. 3. The program pauses to display the improvements in the calculated incomplete gamma function. When these improvements are less than the tolerance value, the program displays the result. If you press [R/S] after viewing the value of the incomplete gamma, the program flow resumes with step 2. 

03262015, 10:41 PM
Post: #2




RE: Incomplete Gamma Function
Namir,
I wonder if you can enlighten me on this program. I am no expert on Gamma nor a mathematician, but I have run other programs that compute both Gamma and Incomplete Gamma. I have run this program as well as the one on page 223 of Henrici's book. Using the examples he gives on page 229, I get the same results with both programs IF I use a=0. I am confused on: 1. What should one use for "a"? (I see a reference to a < 0 on p. 223) 2. Am I correct that the argument you want the result for is x? 3. With other incomplete gamma programs I have run, if I use a=0.5 and x=>35, I get a result close to 1.77245, comparable to an actual gamma function. I guess I am just trying to figure out how to relate the Henrici Incomplete Gamma to others. Do you think you can shed any light on this for me? I would just like to be able to understand what I am getting. Thanks, Bob 

03262015, 11:10 PM
(This post was last modified: 03262015 11:18 PM by Dieter.)
Post: #3




RE: Incomplete Gamma Function
(03262015 10:41 PM)bshoring Wrote: Do you think you can shed any light on this for me? I would just like to be able to understand what I am getting. There are different Gamma functions. 1. The "normal" Gamma function Γ(a). For integer a this is equal to (a–1)!. So Γ(5) = 4! = 24. This, let's say "complete" Gamma function Γ(a) can be expressed as an integral from 0 to infinity. 2. The incomplete Gamma functions γ(a, x) and Γ(a, x). These are the integrals from 0 to x resp. from x to infinity. So they sum up to Γ(a). Example: γ(5, 3) + Γ(5, 3) = 4,4337 + 19,5663 = 24 = Γ(5). Since Γ(a) is the integral from 0 to infinity, and Γ(a, x) is the integral from x to infinity, it's clear that Γ(a, 0) = Γ(a). 3. The regularized Gamma functions P(a, x) and Q(a, x). These are simply γ(a, x) resp. Γ(a, x) divided by Γ(a). So they sum up to 1. Example: P(5, 3) + Q(5, 3) = 4,4337/24 + 19,5663/24 = 0,18474 + 0,81526 = 1. Dieter 

03272015, 07:26 PM
Post: #4




RE: Incomplete Gamma Function
OK, I'm starting to see it. It appears to me the Henrici program gives us the Γ(a, x). Given (5,3), it yields 19,5663, which, if added to y(5,3), or 4,4337, gives us 24.
Then, would the above program be called the upper incomplete gamma? Thanks, Bob (03262015 11:10 PM)Dieter Wrote:(03262015 10:41 PM)bshoring Wrote: Do you think you can shed any light on this for me? I would just like to be able to understand what I am getting. 

03292015, 06:18 PM
Post: #5




RE: Incomplete Gamma Function
(03272015 07:26 PM)bshoring Wrote: OK, I'm starting to see it. It appears to me the Henrici program gives us the Γ(a, x). Given (5,3), it yields 19,5663, which, if added to y(5,3), or 4,4337, gives us 24. Yes, it seems to return Γ(a, x) if the arguments are entered a [ENTER] x. (03272015 07:26 PM)bshoring Wrote: Then, would the above program be called the upper incomplete gamma? That's how you may call it. Dieter 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)