       Re: Nasty bug in Integrate (version 5.0)

• To: mathgroup at smc.vnet.net
• Subject: [mg45919] Re: Nasty bug in Integrate (version 5.0)
• From: Harold.Noffke at wpafb.af.mil (Harold Noffke)
• Date: Thu, 29 Jan 2004 05:36:43 -0500 (EST)
• References: <bv83h6\$icj\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```MathUser:

I also run Mathematica 5.0.  I tested all your integrals, and obtained
answers which appear to be correct, except for Out below.  In
doesn't seem to know it should account for the pole at x=0, if a or b
(not both) are negative.  I would have expected a warning message
about the pole, and maybe also about the limit of 1+c as c -> -1.
Out was not the answer I expected.  I don't see why the Log[ ... ]
expression disappeared.  Maybe an answer to this question can be
posted.

Before running each integral, did you Remove x,a,b to be sure they
don't carry spurious values?

If you have time, try analyzing a Trace on In.  I'd be interested
in reading a post of the results.

Mathematica 5.0 for Microsoft Windows
-- Terminal graphics initialized --

In:= Integrate[1/x + x^c, {x, a, b}]

Im[b]
Out= (-a + b) If[(Im[a] - Im[b]) (-(Im[b] Re[a]) + Im[a] Re[b]) > 0
|| ------------- >= 0 ||

Im[a] - Im[b]

1 + c    1 + c
Im[a]            a      - b      + Log[a] + c Log[a] -
Log[b] - c Log[b]
>      -------------- >= 0, -------------------------------------------------------,
-Im[a] + Im[b]                           (a - b) (1 + c)

1                          c
>     Integrate[-------------- + (a + (-a + b) x) , {x, 0, 1},
a + (-a + b) x

Im[b]
>      Assumptions -> !((Im[a] - Im[b]) (-(Im[b] Re[a]) + Im[a] Re[b]) > 0 || ------------- >= 0 ||

Im[a] - Im[b]

Im[a]
>          -------------- >= 0)]]
-Im[a] + Im[b]

In:= Integrate[1/x + x^c, {x, a, b}, Assumptions ->
{Element[a,Reals], Element[b, Reals]}]

1 + c    1 + c
-a      + b
Out= ----------------
1 + c

In:= Integrate[1/x + x^c, {x, a, b}, Assumptions -> {a > 0, b > 0}]

1 + c    1 + c
-a      + b            b
Out= ---------------- + Log[-]
1 + c             a

Regards,
Harold

```

• Prev by Date: Re: RealDigits bug?
• Next by Date: Re: typesetting fractions
• Previous by thread: Re: Nasty bug in Integrate (version 5.0)
• Next by thread: Re: Mathematica&SuSe 9.0