J.C. Pizarro wrote:
> There are two curiosities
>
> FIRST:$ maxima
> Maxima 5.14.0 http://maxima.sourceforge.net
> Using Lisp CLISP 2.41 (2006-10-13)
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) integrate(sqrt(2*x*sin(x)-cos(1/x)), x, 0, 2/%pi);
> 1 2 1
> Is - 2 x cos(2 x + -) - sin(x + -) - sin(x) + 2 cos(-) x
> x x x
> positive, negative, or zero?
>
> ## here, the user has to wait for "what?"
> ## ENTER => nothing, no (%o1), no (%i2), ...
> ## ENTER => nothing, no (%o1), no (%i2), ...
It's waiting for you to answer the question if that expression is
positive, negative, or zero. Whitespace is silently eaten. Answer
"pos", "neg", "zero" (or maybe some shortened variation thereof).
In any case, I doubt maxima can symbolically compute that integral,
especially since in some places the integrand is imaginary.
>
> ## But pushing the ';' character and ENTER, it says:
> Incorrect syntax: Premature termination of input at ;.
> ;
> Maxima encountered a Lisp error:
> SYSTEM::FORMAT-TABULATE: argument -1 should be a nonnegative fixnum
> Automatically continuing.
Yeah, I suppose a Lisp error shouldn't happen there. I don't see that
with CMUCL (on a CVS version of maxima).
> Maxima 5.14.0 http://maxima.sourceforge.net
> Using Lisp CLISP 2.41 (2006-10-13)
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) integrate(sqrt(2*x*sin(x)-cos(1/x)), x, 0, 2/%pi);
> 1 2 1
> Is - 2 x cos(2 x + -) - sin(x + -) - sin(x) + 2 cos(-) x
> x x x
> positive, negative, or zero?
>
> ## I do Control-D => it doesn't exit, it floods in a loop of printing the
> ## above formula.
I guess because Ctrl-D usually means end-of-file (on Unix, anyway), and
maxima keeps trying to read from the end-of-file. This should be fixed.
I also don't see this problem with CMUCL. It just keeps asking the same
question, waiting for me to answer.
Ray