Re: Integrate gives wrong results for a simple polynomial
- To: mathgroup at smc.vnet.net
 - Subject: [mg117946] Re: Integrate gives wrong results for a simple polynomial
 - From: Mikael Ãhman <micketeer at gmail.com>
 - Date: Tue, 5 Apr 2011 06:43:56 -0400 (EDT)
 
Thank you for your reply. I tried some other computers around the
office. Everyone with 8.0 got it right, but my computer and another
windows computer with version 7 gets the wrong answer (off by a factor
8)
Some variations of the integral, like ^3 or more also yields the
incorrect answer.
{$Version, $ReleaseNumber}
{"7.0 for Linux x86 (64-bit) (February 18, 2009)", 1}
$Assumptions = p > 0; Integrate[Subscript[x, 1]*(1 + y)^2, {y, -1, 1}]
Subscript[x, 1]/3
$Assumptions = p > 0; Integrate[x*(1 + y)^2, {y, -1, 1}]
(8 x)/3
$Assumptions = True; Integrate[Subscript[x, 1]*(1 + y)^2, {y, -1, 1}]
(8 Subscript[x, 1])/3
On Mon, Apr 4, 2011 at 2:11 PM, Bob Hanlon <hanlonr at cox.net> wrote:
>
> Appears to work fine here. What result did you get and with which system and version.
>
> {$Version, $ReleaseNumber}
>
> {"8.0 for Mac OS X x86 (64-bit) (February 23, 2011)", 1}
>
> $Assumptions = p > 0; Integrate[Subscript[x, 1]*(1 + y)^2, {y, -1, 1}]
>
> (8*Subscript[x, 1])/3
>
> $Assumptions = p > 0; Integrate[x*(1 + y)^2, {y, -1, 1}]
>
> (8*x)/3
>
> $Assumptions = True; Integrate[Subscript[x, 1]*(1 + y)^2, {y, -1, 1}]
>
> (8*Subscript[x, 1])/3
>
> Integrate[(1 + y)^2, {y, -1, 1}]
>
> 8/3
>
>
> Bob Hanlon
>
> ---- Micket <micketeer at gmail.com> wrote:
>
> =============
> I have had the bad luck to discover a strange bug (?) when computing
> some integrals with mathematica.
> I simplified it as far as i could;
> $Assumptions = p > 0; Integrate[Subscript[x, 1]*(1 + y)^2, {y, -1, 1}]
>
> If i change anything else, be it the assumption (yes, it is a
> completely unrelated variable), the subscript, the integration limits,
> the exponent, the addition, it works out the correct answer.
>
> It also takes a significant time (a few seconds) to compute this
> integral.
>
> Does anyone have an explanation for this behavior?
>
>