1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Gamma Function

  1. Jul 20, 2009 #1
    Hello all,

    Is there any way to make the Gamma function [tex]\Gamma[z][/tex] defined at z=0? Because in my calculations, I have a single case among many other cases where the argument of the gamma function equals zero.

  2. jcsd
  3. Jul 20, 2009 #2
    How did you arrive at Gamma(0) in your calculations?
  4. Jul 20, 2009 #3
    I used table of integrals for a specific form where it has the condidtion [tex]\mu>v[/tex], but I have a case when [tex]\mu=v[/tex], so I guess because of this I got Gamma[0].
  5. Jul 20, 2009 #4
    [tex]\Gamma[/tex] has a pole at [tex]0[/tex]. So maybe you need to do some residue calculation taking into account a zero in some other factor?
  6. Jul 20, 2009 #5
    How? Give me a simple example, if possible, please?
  7. Jul 20, 2009 #6


    User Avatar
    Homework Helper

    It would probably be easier if you posted the integral. From what you've posted so far it's not clear if

    a) the gamma function appears in the integrand or

    b) as part of the solution of the integral.

    I would guess it's case b), in which case since the solution of the integral is only valid for u > v, you would need to redo the integral for the case u = v - if the integral is even finite, that is. It could also be the case that the integral diverges for u = v, in which case Gamma(0) diverging gives the correct result.

    If case a), then either you need something else in the integrand that can kill the divergence of the Gamma function a la L'Hopital's rule, or the derivation of the integral itself needs to be redone as you might get a different integral to evaluate if u = v.
  8. Jul 20, 2009 #7
    Your guess was right, the Gamma function appears as a part of the solution of the integral. I used this integral from the table of integrals:


    The conditions are: [tex]\text{Re}\{\mu\}>\text{Re}\{v\}\text{ and }\text{Re}\{\alpha+\beta\}>0[/tex]

    where [tex]K_v(.)[/tex] is the modified Bessel function of the second kind and [tex]v^{th}[/tex] order, and [tex]F(,;;) [/tex] is the Gauss hypergeometric function. But in my case, I have a situation where [tex]\mu=v[/tex]. Can anything be done to overcome this problem?

  9. Jul 21, 2009 #8
    Say you want [tex]z\Gamma(z)[/tex] at [tex]z=0[/tex] ... In this case you could use L'Hopital's rule, but let me do it another way to illustrate what I was talking about.
    The Laurent series of [tex]\Gamma(z)[/tex] at [tex]0[/tex] is:
    [tex]\Gamma(z) = \frac{1}{z}-\gamma+ \left( 1/12\,{\pi }^{2}+1/2\,{\gamma}^{2} \right) z+\dots [/tex]
    where [tex]\gamma[/tex] is Euler's constant. The first numerator [tex]1[/tex] is the residue calculation that is important here. Therefore [tex]z\Gamma(z)[/tex] looks like [tex]1 - \gamma z + \dots[/tex], so you know how it behaves at [tex]0[/tex].
  10. Jul 21, 2009 #9
    But, how can I do that in my case? I mean I have [tex]\Gamma[z][/tex] which can be re-written as: [tex]z\Gamma[z-1][/tex] , so the pole is now at z=1. How to solve this?

  11. Jul 21, 2009 #10
    [tex]\Gamma(z-1)[/tex] has a simple pole at [tex]1[/tex] with residue [tex]1[/tex], and [tex]z[/tex] has value [tex]1[/tex] at [tex]z=1[/tex], so [tex]z\Gamma(z-1)[/tex] has a pole at [tex]z=1[/tex] with residue [tex]1[/tex].

    But you are wrong ... [tex]\Gamma(z) \ne z\Gamma(z-1)[/tex]. If you want [tex]\Gamma(z) = (z-1)\Gamma(z-1)[/tex], note that [tex]z-1[/tex] has a zero at [tex]z=1[/tex] so do what I did before to conclude that [tex]\Gamma(z)[/tex] is regular at [tex]z=1[/tex] with value [tex]1[/tex]
  12. Jul 22, 2009 #11
    Yes you are right, [tex]\Gamma[z]=(z-1)!=(z-1)\Gamma[z-1][/tex]. So, if we re-write [tex]\Gamma[z][/tex] as [tex](z-1)\Gamma[z-1][/tex], then we eliminate the problem mathematically, don't we?

  13. Jul 22, 2009 #12


    User Avatar
    Science Advisor

    David I think the integral just diverges for [itex]\mu \leq v[/itex] and that's it.

    The convergence problems all happen as x goes to zero (the "x goes to infinity" end is no problem for this integrand). I'm pretty sure that if you look at the limiting behaviour of [itex]K_v(x)[/itex] as x goes to zero you'll find it approaches [itex]{\rm const} / x^v[/itex]. So the part that's causing the problem basically reduces to something like,

    [tex]{\rm const} \, \int_{x=0}^{+\epsilon} x^{(u-v)-1} \, dx[/tex].

    It just diverges for [itex]\mu \leq v[/itex].
  14. Jul 23, 2009 #13
    Thanks all for replying.

    I am not deeply involved in mathematics, but what if I write [tex]\Gamma[0][/tex] as [tex]\Gamma[0^+][/tex], where [tex]0<0^+<10^{-12}[/tex]? Is this a valid step?

  15. Jul 23, 2009 #14


    User Avatar
    Homework Helper

    As uart said, the integral appears to diverge as x -> 0 if [itex]\mu \leq \nu[/itex], so no amount of playing tricks like replacing 0 with [itex]0^+[/itex] is going to save it from diverging. "[itex]\Gamma(0^+)[/itex]" is still arbitrarily large.

    If you were actually deriving something that led to the integral

    [tex]\int_0^\infty dx~x^{-\mu-1}e^{-\alpha x}K_\mu(\beta x)[/tex]

    then it looks like either you need to doublecheck the derivation that lead to that integral to make sure you didn't make any mistakes which gave you a divergent integral, or there needs to be some sort of cutoff imposed at the lower end of the integral to keep it finite (but taking that cutoff to zero after doing the integral would again lead to an infinite result).
  16. Jul 23, 2009 #15
    I am almost sure about the derivation 98%, but I will check again later to make it 100%. But can you explain to me what do you mean by "cutoff"? and can not we simply discard the case when the integral diverges? Since I have multiple sums inside each others, whose indices are involved in the integral, and just one case of all possible combinations is not satisfied.

  17. Jul 24, 2009 #16


    User Avatar
    Homework Helper

    By cutoff I meant replacing the lower limit of integration with a finite lower bound, which would prevent the integral from diverging but gives you this odd cutoff there that you don't really want in your calculations.

    Now, since you say that the integral in question occurs inside a multiple sum where the indices, this raises some other possibilities. I suppose for some reason the divergent case could be thrown out, but it can't legitimately be thrown out on the basis of it diverging. You could leave it out and see if the results you get match what you should be getting.

    Some questions to consider when thinking about this:

    i) You're absolutely sure you should be getting a finite result?

    ii) Is there anything in your derivation that should have restricted [itex]\mu > \nu[/itex], thus preventing the problem entirely?

    iii) At any point in your derivation, did you interchange the order of integration and summation?

    This last point could be very important, as it is not always valid to do so! If you did that, then you may need to carefully check whether or not that was a valid move. Typically in many physical problems there's no trouble doing that, but in principle such a move could potentially be the source of the diverging term.
  18. Jul 24, 2009 #17
    Dear Mute,

    I have the following integral:

    Based on the table of integrals
    [tex]N_A+k\text{ must be greater than }n+1[/tex]
    So, in all cases, except for max of n, the condition is satisfied.

    By the way, I tried to include the divergence case by replacing the 0 in the Gamma function by [tex]0^+[/tex], and I compared it with the result when I completely excluded the divergence case, they were the same, at least for the first 6-7 digits (the default precision in Mathematica).

    The results are as expected, decaying smoothely, and between 0 and 1.

    Based on these information, is it valid to exclude the divergence case?

    Best regards
  19. Jul 27, 2009 #18


    User Avatar
    Homework Helper

    What exactly is the sum you're trying to compute? And not just the sum - any terms multiplying the sum if you used those in the computation you did on mathematica. It's hard to tell what could be causing your problems if we don't have enough information. Given only the divergent integral we can only really say the integral diverges.

    You say you have a sum over this general integral and it looks like one of the terms diverges, but yet when you compute it numerically the divergent term doesn't seem to matter? That seems odd, and I'd be hesitant to just toss the term out and continue without being fairly sure of why I'm getting the results I'm getting.
  20. Jul 27, 2009 #19
    Actually, all the sums appear are from binomial and multinomial expansions.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook