MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integrate gives wrong results for a simple polynomial

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117952] Re: Integrate gives wrong results for a simple polynomial
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 5 Apr 2011 06:45:02 -0400 (EDT)

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?



  • Prev by Date: package construction
  • Next by Date: Re: Integrate gives wrong results for a simple polynomial
  • Previous by thread: Integrate gives wrong results for a simple polynomial
  • Next by thread: Re: Integrate gives wrong results for a simple polynomial