integrating positive-valued rational function gives negative results
- To: mathgroup at smc.vnet.net
- Subject: [mg112397] integrating positive-valued rational function gives negative results
- From: "Peter Pein" <petsie at dordos.net>
- Date: Tue, 14 Sep 2010 05:13:09 -0400 (EDT)
Dear group,
did I mention that most of the last weekend has been a bit boring?
So I tried the impossible. Using only even powers of the independent
variable, I let Mathematica build a rational function with values greater
than zero and an integral from 0 to infinity, which is less than zero:
In[1]:= strange = Block[{g = 1/(1 + x^2)}, While[Integrate[g, {x, 0,
Infinity}] >= 0,
g = Sum[RandomInteger[{1, 9}]*x^(2*k), {k, 0, 3}]/
Sum[RandomInteger[{1, 9}]*x^(2*k), {k, 0, 2}]^3]; g]
Out[1]= (9 + 4*x^2 + 7*x^4 + 2*x^6)/(2 + 4*x^2 + 5*x^4)^3
In[2]:= NIntegrate[strange, {x, 0, Infinity}]
Out[2]= 0.4344705895983916
In[3]:= Integrate[strange, {x, 0, Infinity}]
% < 0
N[%%]
Out[3]= Pi*Root[-6476551638649 - 25235091210240000000*#1^2 +
203843174400000000000000*#1^4 & , 1]
Out[4]= True
Out[5]= -0.03499073055037525
there seems to hide another bug. Does this nonsense work with the
development version?
TIA,
Peter