>>>>> "Peter" == Peter Scott writes:
Peter> What functions do I call? Or what code can I look at to get
Peter> an idea of how to do this?
Peter> Ideally, I wish that I could do something like this:
Peter> (maxima:integrate "3*x^2" 'x 2 5)
(%i9) to_lisp();
Type (to-maxima) to restart
MAXIMA> ($integrate (mul 3 (power '$x 2)) '$x 2 5)
117
So, basically, if you would enter integrate(3*x^2,x,2,5), you look for
the Lisp function named $INTEGRATE. If integrate takes 4 args, you
need 4 args for $INTEGRATE.
To express 3*x^2, I just use the mul and power functions in maxima.
(There's also add, sub, and div.) The maxima variable x is the Lisp
variable $X.
And there you go.
Well, at least it's a start. If you want to convert the string
"3*x^2" to the corresponding maxima expression, you'll have more work
to do to hook into the command parser. I haven't tried that before.
Ray