       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:= 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= (9 + 4*x^2 + 7*x^4 + 2*x^6)/(2 + 4*x^2 + 5*x^4)^3
In:= NIntegrate[strange, {x, 0, Infinity}]
Out= 0.4344705895983916
In:= Integrate[strange, {x, 0, Infinity}]
% < 0
N[%%]
Out= Pi*Root[-6476551638649 - 25235091210240000000*#1^2 +
203843174400000000000000*#1^4 & , 1]
Out= True
Out= -0.03499073055037525

there seems to hide another bug. Does this nonsense work with the
development version?

TIA,
Peter

```

• Prev by Date: PolarPlot3D?
• Next by Date: Word wrap and page breaks in printed notebooks?
• Previous by thread: Re: PolarPlot3D?
• Next by thread: Word wrap and page breaks in printed notebooks?