How can I perform symbolic computation in a C++ program?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 6K views
Andrew732
Messages
9
Reaction score
0
Don't know where else in Phyiscs Forums or on the internet in general to ask this, and if it's inappropriate here, I apologize. My question is: is there an open source library or resource that I can access from a C++ program to perform symbolic computation on the level of something like Maple or Mathematica? Accessing the Maple or Mathematica engines from my program is unfortunately out of the question. There are numerous small C++ libraries (SymbolicC++, Mathomatic, Ginac, etc.) but they are almost trivial compared to Maple, for example. Thanks for any advice or ideas.
 
Physics news on Phys.org
phyzguy said:
There is an open-source Python code called Sage that does symbolic computation. You could download this and study the code. It will be a major undertaking. The code is at:

www.sagemath.org/

Alternatively, you might be able to invoke the SAGE python codefrom your program via a system() call (ie you construct a command to run) with your equation to parse, have it save its output to a file and then read it back in. Still it could be a lot of work but I guess it depends on what you're trying to do.