Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

symbolic computation in C++

I need to do analytical integration in C++. For example, I should integrate expressions like this: exp[I(x-y)], I is an imaginary number.

How can I do this in C++?

I tried GiNaC but it can just integrate polynomials. I also tried SymbolicC++. It can integrate functions like sine, cosine or exp(x) and ln(x), but it is not very powerful. For example, it can not integrate x*ln(x) which can be easily obtained by use of Mathematica or by integration by parts.

Are there any other tools or libraries which are able to do symbolic computation like analytical integration in C++?

like image 680
MOON Avatar asked Jul 04 '12 08:07

MOON


1 Answers

If you need to do symbolic integration, then you're probably not going to get anything faster than running it in mathematica or maxima - they're already written in (something like) C++. So unless your equations have a very specific formulae that you can exploit in a way that Mathematica or Maxima can not then you're probably out of luck -- and at very least you're not going to get that kind of custom manipulation from an off-the-shelf library.

You may be justified in writing your own code to get a speed boost if you needed to do numerical solutions. ( I know that I did for generating numerical solutions to PDEs).

like image 190
Michael Anderson Avatar answered Sep 18 '22 03:09

Michael Anderson