## #946 integrate( 1/(x^8-1),x,0,1/2) => internal error

closed
nobody
5
2006-11-05
2006-06-11
Stavros Macrakis
No

integrate( 1/(x^8-1), x, 0, 1/2 ) => Divison by 0

Smaller exponents don't cause problem.
Same problem with gcd: spmod.
Using the indefinite-integral at the limits works fine.

5.9.3 gcl windows

## Discussion

• Robert Dodier
2006-06-21

• labels: --> Lisp Core - Integration

• Robert Dodier
2006-06-21

Logged In: YES
user_id=501686

Assign category (Lisp Core - Integration).

I looked at this a little bit but I can't tell what's going
on. trace output from :lisp (trace polyform method-by-limits
initial-analysis) suggests something interesting is
happening but I can't tell what.

• Logged In: YES
user_id=588346

integrate(1/(x^4+1),x,0,1/2) same problem. This is a
subproblem (by partfrac) of previous problem.

• Raymond Toy
2006-08-31

Logged In: YES
user_id=28849

What is happening, partially, is that maxima wants to
convert the given integral to an equivalent integral from 0
to infinity. I don't know why we get an internal error for
1/(x^8-1).

However, we can work around the problem by changing the
order in method-radical-poly. The third cond clause could
be moved up one more, just before the second clause
containing the calls to ratp and ratfnt (which converts the
finite integral to an infinite integral). What this does is
try to compute the indefinite integral, and if we succeed,
we just substitute the limits in.

Then all of the examples here work, and the test suite passes.

• Raymond Toy
2006-11-04

Logged In: YES
user_id=28849

For the record, here's is what is happening. The integral
is converted to an integral from 0 to inf. Since it's still
rational, it uses contour integration over the poles of the
rational inside the keyhole contour. To compute this, a
partial fraction expansion is done, and all parts are
integrated separately. This works until the rational
(4*x^2+8*x+4)/(17*x^4+64*x^3+96*x^2+64*x+16) is integrated.

At this point the function RES is called and gets a division
by zero. Not sure why yet. Perhaps some confusion on
computing the residues for the complicated roots of the
denominator above?

• Raymond Toy
2006-11-04

Logged In: YES
user_id=28849

Not sure if this is right, but the maxima calculates the
roots of 17*x^4+64*x^3+96*x^2+16 in a rather messy form.
This seems to confuse \$residue (used in RES). If we modify
the calls to \$residue to call \$rectform for the pole to
simplify it, this integral works.

Not exactly sure whether \$residue should do this itself or
if RES should do it.

• Raymond Toy
2006-11-05

• status: open --> closed

• Raymond Toy
2006-11-05

Logged In: YES
user_id=28849

The bug is really in \$TAYLOR. A workaround is to call
\$RATSIMP in RESM1 to simplify the pole somewhat.

Closing this bug.