Symbolic-Numeric Integration of Univariate Expressions via Sparse Regression
arxiv.org
arxiv.org
Summary: Implementing symbolic integration for a computer algebra system using numerical methods for symbolic regression.
Abstract: Most computer algebra systems (CAS) support symbolic integration as core functionality. The majority of the integration packages use a combination of heuristic algebraic and rule-based (integration table) methods. In this paper, we present a hybrid (symbolic-numeric) methodology to calculate the indefinite integrals of univariate expressions. The primary motivation for this work is to add symbolic integration functionality to a modern CAS (the symbolic manipulation packages of SciML, the Scientific Machine Learning ecosystem of the Julia programming language), which is mainly designed toward numerical and machine learning applications and has a different set of features than traditional CAS. The symbolic part of our method is based on the combination of candidate terms generation (borrowed from the Homotopy operators theory) with rule-based expression transformations provided by the underlying CAS. The numeric part is based on sparse-regression, a component of Sparse Identification of Nonlinear Dynamics (SINDy) technique. We show that this system can solve a large variety of common integration problems using only a few dozen basic integration rules.
0.0032(x^3) + 0.08374(x^2)*atan((-1//4)*x) + 0.61083x*log(16 + x^2) - 1.68734x - 0.09989x*((16 + x^2)^-1)
Only after manually setting a tighter tolerance is the correct result reported: x - 4 atan(x/4). The difference is not just cosmetic. Near zero both results are within tolerance, but the first result is very badly wrong for large x (try x=20).But note that our plan is not to use this in isolation. I think the final solution will make use of a polyalgorithm. Sparse regression is in the low-medium cost of cheapness, so a polyalgorithm that does simple rules, then if that fails this sparse regression, then if that fails a larger rule set (maybe through e-graphs), then if that fails use the Risch algorithm. That could be a robust algorithm that attempts to take some fast outs before progressively falling back to the slowest form. Tests just require differentiation and checking equality.
> Tests just require differentiation and checking equality.
Is that not implemented yet? I was wondering how a result with such an obviously incommensurate functional form could be produced.There is also a theory of integration, the Risch integral algorithm. See https://en.wikipedia.org/wiki/Risch_algorithm
Axiom, a computer algebra system, implements the Risch algorithm. To see how these two approaches compare, look at the Axiom Computer Algebra Test Suite Visit http://axiom-developer.org/axiom-website/CATS/index.html