building Maxima into another project



Carter, Nathan wrote:
> [I've had a little trouble posting this--Mailman thinks I'm not subscribed when I'm pretty sure I am.  But here goes another try...]
>
> Hello, list!  Pardon me if this question has been asked before; I bet that it has, but that my Google-fu was insufficient to unearth it in the archives.
>
> I'm working on some math software that is currently released under the GPL (see http://lurch.sourceforge.net for details) and would find it very useful if a powerful CAS like Maxima could be built into that project.  (I'm currently using a much simpler one, and would like one that's more robust than what I've got.)
>
> I don't see any instructions for compiling Maxima other than going the ./configure, make, make install route, which for two reasons isn't what I'm looking for:
> 1. That builds a binary for use from the command line, whereas I'd prefer to build a library to which I can make calls, if that's possible.  But I'd settle for a command-line tool with stdin/stdout access if that's all there is.
> 2. It doesn't tell me how to integrate the building of Maxima into my project's existing (cross-platform) build procedure.  (I could reverse-engineer the Makefiles after they were generated, if I had to, on each platform, but obviously that unreliable inconvenience is to be avoided if possible.)
>
> Is there a how-to for integrating Maxima into other projects?  Perhaps I just didn't find it in my searching.  If not, is there anyone to whom I could go for advice?
>
> Thank you very much for any help you can offer!
>
> Nathan Carter
> Mathematical Sciences Department
> Bentley University
> (781) 891-3171
> http://web.bentley.edu/empl/c/ncarter
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
> .
>
>   
It seems to me that you would have to translate your equations into a 
suitable input form for maxima, write them to a file and process them in 
the background using the batch form of maxima. In the batch program you 
would write solutions to disk and read them into your program. In the 
end, you would verify small amounts of data checks and string checks.

Thus to check that, e.g.,
(x+1)^2 = x^2 + 2*x +1 = x^2 + 1 + 2*x = 1 + 2*x + x^2,
you would simply take, say 10 random points (or more if you like) and 
verify that the terms of you equations produce the same results when 
evaluated at those points. For complicated algebraic equations or 
transcendental equations, checking the various strings are equal would 
be hopelessly slow.

Have you looked at "webwork" (see webwork.maa.org). That is an online 
system for giving HW problems to students with answer checking, etc. It 
is perl based, and uses this type of random checking of points to verify 
answers. Solutions to problems like integrations have to be put into the 
system. A program such as maxima could be used to find such solutions.

HTH,
-sen



This is an I took a look at your lurch.sourceforge.net page, and I 
wonder why you want to use maxima to verify your answers. It seems that 
you want to verify your equations, not provide solutions to mathematical 
problems. Thus, you want to check equations like
(x+1)^2 = x^2+2*x +1