Symbolic-numeric integration of univariate expressions based on sparse regression

Shahriar Iravanian, Carl Julius Martensen, Alessandro Cheli, Shashi Gowda, Anand Jain, Yingbo Ma, Chris Rackauckas

Introduction

Symbolic integration is a fundamental capability of computer algebra systems (CAS), yet traditional approaches often rely on either massive rule-based lookup tables or complex, difficult-to-implement algebraic algorithms like the Risch algorithm. This paper introduces a hybrid symbolic-numeric approach implemented within the Julia SciML and JuliaSymbolics ecosystems. By combining symbolic candidate generation with numerical sparse regression, the proposed method achieves high success rates on standard benchmarks with a significantly reduced rule set.

Methodology

The core of the system, SymbolicNumericIntegration.jl, utilizes a "Guess and Verify" pipeline consisting of two primary stages:

1. Symbolic Candidate Generation

The system generates a set of potential candidate terms (an ansatz) using homotopy operators and repetitive differentiation. By analyzing the structure of the input function and its derivatives, the generator constructs a library of building blocks likely to appear in the antiderivative. This approach allows for implicit handling of techniques like $u$-substitution without explicit rule definitions.

2. Numerical Sparse Regression

To determine the correct coefficients for the candidate terms, the system evaluates the derivatives of the candidates and the target function at random complex points. This transforms the symbolic problem into a linear system ($Aq = b$). The system is solved using Sparse Identification of Nonlinear Dynamics (SINDy) techniques. Sparse regression ensures parsimony, selecting the minimum number of terms necessary to satisfy the integral and producing human-readable results.

Experimental Evaluation

The method was evaluated against four classic integration benchmarks derived from well-known calculus textbooks and historical CAS benchmarks:

  • Apostle: 149 problems.
  • Hearn: 229 problems.
  • Stewart: 297 problems.
  • Timofeev: 262 problems.

Key Results

The hybrid system demonstrated robust performance using only approximately 50 basic integration rules. The success rates across the four datasets are summarized in the table below.

Success and failure rates across four standard integration benchmarks.

As shown in Figure 1, the system achieved success rates of 82.5% for Apostle, 83.4% for Hearn, and 74.0% for Stewart. While the success rate for the more complex Timofeev dataset was lower (51.9%), these results represent a significant proof-of-concept for achieving high coverage with minimal code complexity compared to traditional systems that require thousands of manual rules.

Discussion and Future Work

The use of numerical evaluation at random complex points effectively bypasses the "identity problem" in symbolic computation, where determining the equivalence of two expressions is often undecidable. However, limitations remain, particularly in robust polynomial support and handling specific trigonometric identities like the tangent half-angle substitution. Future work will focus on expanding the candidate generation rule set and integrating these methods into broader automated discovery frameworks for physical laws.

Summary updated

BibTeX
@article{iravanian2022symbolic,
  author = {Shahriar Iravanian and Carl Julius Martensen and Alessandro Cheli and Shashi Gowda and Anand Jain and Yingbo Ma and Chris Rackauckas},
  title = {{Symbolic-numeric integration of univariate expressions based on sparse regression}},
  journal = {ACM Commun. Comput. Algebra},
  year = {2022},
  doi = {10.1145/3572867.3572882},
}
Figure