bertiqwerty / exmex

Math parser and evaluator in Rust, capable of partial differentiation, allows the use of custom operators.
Apache License 2.0
39 stars 6 forks source link

Integration support #27

Open Titaniumtown opened 2 years ago

Titaniumtown commented 2 years ago

Could the reverse of partial be added so a function could be integrated instead? this would be tremendously useful! Thanks.

bertiqwerty commented 2 years ago

Interesting. Haven't thought about this. What is your use case?

Titaniumtown commented 2 years ago

I'm personally making a graphing program/website (it compiles to both targets) which displays integrals and derivatives. Currently integrals are estimated through riemann sums, but it would also be very useful if the integral could be graphed as a function. I found your project and it's been fantastic, would be awesome if this could be added.

bertiqwerty commented 2 years ago

One would probably need to implement Risch's algorithm for that which is not easy. Even Maple or Mathematica do not seem to have it implemented properly, see, e.g., https://mathoverflow.net/questions/374089/does-there-exist-a-complete-implementation-of-the-risch-algorithm. I doubt that I will try that in the near future. Pull requests are welcome 😁.