Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1485 > unrolled thread

Re: Integrate gives wrong results for a simple polynomial

Started byMikael Öhman <micketeer@gmail.com>
First post2011-04-05 10:43 +0000
Last post2011-04-05 10:43 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Integrate gives wrong results for a simple polynomial Mikael Öhman <micketeer@gmail.com> - 2011-04-05 10:43 +0000

#1485 — Re: Integrate gives wrong results for a simple polynomial

FromMikael Öhman <micketeer@gmail.com>
Date2011-04-05 10:43 +0000
SubjectRe: Integrate gives wrong results for a simple polynomial
Message-ID<inerpe$j8f$1@smc.vnet.net>
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@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@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?
>
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web