Hi everyone,
I've worked on improving the RUBI integration rules and MatchPy, the external library that performs a very efficient associative-commutative pattern matching.
Here is the result:
Try it yourselves:
In [1]: from rubi_rules.base_objects import rubi_integrate
In [2]: from sympy import *
In [3]: var("x y z a b c d e f g h i j p q")
Out[3]: (x, y, z, a, b, c, d, e, f, g, h, i, j, p, q)
In [4]: rubi_integrate(sin(x)*cos(2*x), x, return_matched_rules=True)
Out[4]:
(cos(x)/2 - cos(3*x)/6,
[(cos(x)/2 - cos(3*x)/6, [('4.7.4 (c trig)^m (d trig)^n', 3)])])
So far everything is a fork of MatchPy, but ideally the folders
- matchpy
- sympy_matching
- sympy_wolfram
- rubi_rules
could be split into four different packages.
The MatchPy library has been modified a lot, so it's currently quite different from its source.
sympy_matching is the connector between sympy and matchpy
sympy_wolfram has utilities to parse Wolfram Mathematica source code.
rubi_rules contains the integration rules and the rubi test suite.
We should also discuss if the SymPy community is willing to take over these four modules and support their development.