n-arms / math-parser

A library to take in a string and output a mathematical result, as well as acting as a Computer Algebra System.
0 stars 0 forks source link

Take the integral of a tree #1

Open n-arms opened 3 years ago

n-arms commented 3 years ago

Description

We have syntax trees that we can evaluate, reduce (to some degree) and take the derivative of. It would be useful to be bale to take the integral of such a tree as well.

Implementation

The easiest way to do this would be via a recursive algorithm similar to the derivative algorithm. Some short cuts should be built in, to take the work off of the reduce call.

Math

It should be assumed that all of these an have any constant C added to them and remain valid:

n-arms commented 3 years ago