Back to SymPy
GSoC 2026

Extending Rule-Based Symbolic Integration

Symbolic integration is one of the central capabilities of any advanced calculator system e.g. Mathematica. SymPy currently provides several integration strategies including heuristic methods, algorithmic approaches such as the Risch algorithm, and a rule-based integrator implemented in sympy.integrals.manualintegrate. The manualintegrate module performs integration by recursively applying pattern-based rules similar to how integrals are solved manually. While this approach produces readable step-by-step results and supports a wide range of expressions, its current rule coverage is limited and many integrals involving special functions or structured products are not recognized. The goal of this project is to extend the rule-based integration system in manualintegrate, focusing on improving support for special functions, structured products, and rule prioritization. The project will expand the set of integration rules, improve heuristics for rule selection, and ensure better compatibility with SymPy's symbolic simplification system. The approach is to first analyze the gaps between manualintegrate and more comprehensive rule-based systems such as RUBI in order to identify missing classes of integrals and structural weaknesses. Based on this analysis, the project will design SymPy-compatible rule representations using its existing pattern-matching framework, ensuring consistency with the current architecture. New rules will then be implemented incrementally, with each addition accompanied by rigorous testing and validation to guarantee correctness and stability. Throughout this process, particular attention will be given to preserving and extending SymPy’s step-by-step explanation capability, ensuring that all newly supported integrals remain interpretable and aligned with human-style symbolic reasoning. The end goal is to make SymPy’s integrator more complete, explainable, and closer to human-style symbolic reasoning, while maintaining correctness.

Project details

Contributor

SalahDin Rezk

Mentors

Not available

Technologies

Not listed in the archive