Subject: how to use "maxima --batch" *reliably* ??
From: Mike Hansen
Date: Tue, 26 Feb 2008 13:13:34 -0800
> Oliver, you might take a look at the list of related projects,
> http://maxima.sourceforge.net/relatedprojects.shtml
> Various kinds of systems which use Maxima as a computational
> engine have been implemented.
In particular, you may want to look at Sage which provides a Python
interface to Maxima (amongst other things). If a situation arises
where Maxima needs additional input, an exception is raised. If that
exception is not handled, then the Python script will exit with a
status of 1. Here is an example of how to use the interface in the
most basic/explicit way:
sage: maxima.eval('2+2')
'4'
sage: maxima.eval('integrate((1+v^2/c^2)^3/(1-v^2/c^2)^(3/2),v)')
Traceback (most recent call last):
...
ValueError: Computation failed since Maxima requested additional
constraints (use assume):
Is c zero or nonzero?
It is also used behind the scenes for things like the following:
sage: integrate(x^2,x)
x^3/3
--Mike