# [Maxima] Another integration question

Barton Willis willisb at unk.edu
Tue Aug 21 10:17:37 CDT 2007

```-----maxima-bounces at math.utexas.edu wrote: -----

>To: maxima at math.utexas.edu
>From: max.e.brown at gmail.com
>Sent by: maxima-bounces at math.utexas.edu
>Date: 08/21/2007 08:19AM
>Subject: [Maxima] Another integration question
>
>I stumbled across a definite integral that seems to make Maxima
>hang. Has anyone seen this before?
>
>-8<------------
>(%i1) integrate( (x^3+1)/(x^4 + 4*x + 1), x);
>                           4
>                        log(x  + 4 x + 1)
>(%o1)                         -----------------
>                              4
>(%i2) integrate( (x^3+1)/(x^4 + 4*x + 1), x, 0, 1);
>
>[... no output, sblc cpu usage at 87%  ...]

I don't know what happens if you don't stop Maxima, but
I think you should file a bug report.

To see in part what is going on, try this:

(%i4) trace(?csign);
(%o4) [csign]
(%i5) integrate( (x^3+1)/(x^4 + 4*x + 1), x, 0, 1);

--> Yikes! all kinds of junk!

Also try integrate((x^3+1)/(x^4 + 4*x + 1), x,a,b).

I suppose that Maxima is struggling to show that
the antiderivative is continuous on [0,1]. But Maxima
goes about it in just about the worst of all possible ways.
Maxima does know that x^4 + 4*x + 1 is positive for x in [0,1], so
it should be able to determine that log(x^4 + 4*x + 1) is
continuous on [0,1].

(%i1) assume(x >= 0, x<=1);
(%o1) [x>=0,x<=1]
(%i2) sign(x^4 + 4*x + 1);
(%o2) pos

Barton
```