Re: Bug in definite integral over Gamma function?
- To: mathgroup at smc.vnet.net
 - Subject: [mg116746] Re: Bug in definite integral over Gamma function?
 - From: Bob Hanlon <hanlonr at cox.net>
 - Date: Sat, 26 Feb 2011 06:05:51 -0500 (EST)
 
$Version
"8.0 for Mac OS X x86 (64-bit) (November 6, 2010)"
Integrate[x^4*Exp[-x]*Gamma[2, x], {x, 0, Infinity}]
21/8
$Version
"7.0 for Mac OS X x86 (64-bit) (February 19, 2009)"
Integrate[x^4*Exp[-x]*Gamma[2, x], {x, 0, Infinity}]
-(363/8)
Limit[Integrate[x^4*Exp[-x]*Gamma[2, x], {x, 0, a}], a -> Infinity]
21/8
Limit[Integrate[x^4*Exp[-x]*Gamma[2, x], {x, a, Infinity}], a -> 0]
21/8
Integrate[x^4*Exp[-x]*Gamma[2, x], {x, a, Infinity}] /. a -> 0
21/8
Integrate[x^n*Exp[-x]*Gamma[2, x], {x, 0, Infinity}] /. n -> 4
21/8
Integrate[x^4*Exp[-x]*Gamma[a, x], {x, 0, Infinity}] /. a -> 2
21/8
Bob Hanlon
---- H Hogreve <hogreve at ifisr.org> wrote: 
=============
When getting weired results after a large chain of symbolic calculations,
I spotted the reason to something that appears to be a bug in an 
integration, i.e., in
   Integrate[x^4*Exp[-x]*Gamma[2, x], {x, 0, Infinity}]
The two 7.0 versions of Mathematica (32-bit Windows and 64-bit Linux) 
available for checking this integral yield the result
      -363/8
which is obviously incorrect; a correct results can be obtained by
computing the indefinite integral and taking the limits x->0 and
x->Infinity. Moreover, the 6.0 version of Mathematica also gives the
correct result for the definite integral.
Now I am wondering how Mathematica 8 is handling this integral, and
whether there are possibilities in Mathematica 7 to get the correct
definite integral (other than via the indefinite one and boundary
values) ?
Many thanks in advance for any hints,
H. Hogreve