When it comes to integration, one way to use algorithmic differentiation (AD) is that if your program corresponds to an analytic function within the range of the integral, you could calculate a power series approximation using AD. The resulting polynomial
can be trivially integrated. The solution could be made exact if the program corresponds to a finite power series, or could be approximated to an arbitrary degree otherwise.
Most AD systems, including Owl, cannot feasibly do this, because they would have to use repeated differentiation for higher order polynomials. This takes exponential time. But it can be done in quadratic time using power series convolutions, or in some
cases with Fourier transforms (e.g. matrix multiplication) even in O(D log(D)), where D is the degree of the polynomial.
There are algorithms for exact real integration, but last time I checked, they are dog slow.
Does anybody know how I could do symbolic integration with OCaml? I see the owl package, but it appears that it only has differentiation. Is there any way I could implement integration with this same library?
--