Justin Smith wrote:
> 1. Is there a maxima function to test whether two expressions are
> mathematically equivalent? These expressions might involve elementary
> functions combined via the usual arithmetic operations (+,-,*,/,
> exponentiation)? Of course ratsimp might convert them to an identical
> form, but sometimes it might not.
>
There is a zeroequiv program (maybe not its current name), but you
would probably do better with just ratsimp(expr1-expr2).
> I've heard that some CAS systems do this kind of test by trying to
> evaluate the expressions at various random data points. Is there
> anything like this built into Maxima?
there are papers on "hashcoding" by Gaston Gonnet, probably 15-20
years ago. Two expressions that hashcode to the same number are
possibly equivalent.
>
> 2. Given such an equality tester, can one access it from another program
> (like a Perl program), through a unix socket or the like?
>
It probably depends on the underlying lisp. I'm using Maxima on
a lisp that supports DDE and OLE and CORBA and can link to Java and
web stuff. Bruce Char at Drexel should be able to help. Or did
he send you here??
> I have a program for administering and grading web-based exams written
> in Perl (using essay-type questions --- I hate multiple-choice
> questions). I'd like to extend it to handling mathematical problems
> (since I'm teaching calculus courses in the coming Fall). The program
> already parses the MathML that the exams generates and now it boils down
> to testing whether two expressions are equivalent.
How will you give partial credit? There has been some work on
this by the Educational Testing Service.
RJF
>
> Thank you!
>