From: SourceForge.net <noreply@so...>  20071019 14:23:35

Bugs item #1778796, was opened at 20070821 12:36 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1778796&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: integrate( (x^3+1)/(x^4 + 4*x + 1), 0, 1); Initial Comment: Maxima: 5.11.0 Lisp: SBCL 1.0.3 On the mailing list, I asked about a definite integral that seems to make Maxima hang. 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% ...]  Barton Willis replied and suggested to file a bug report. He said: > > 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  >Comment By: Raymond Toy (rtoy) Date: 20071019 10:23 Message: Logged In: YES user_id=28849 Originator: NO A summary of some emails. Maxima has converted the integral to a contour integral around a keyhole contour (circle with a slit on the positive real axis). The denominator is a quartic with 4 complex (and messy) roots. Maxima is using residues to evaluate the integral. If you wait long enough (and have enough memory), maxima does finally finish. (It took some hour or two). The result is too long to display, but if I bfloat the resullt, I get the expected numerical answer. (Which is a little surprising because there are some very large integers of 50+ digits or more in the result.) Since this is a rational function, I tried an experiment with ratfnt trying to do the antiderivative first before trying the contour integral. This works, and doesn't cause the test suite to fail. Two tests do fail, but that is because the form of the answer has changed, not the value.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1778796&group_id=4933 