Hi, I have created the Python port of Rubi:
https://github.com/Upabjojr/rubi-integrate
This is already available on PyPI:
https://pypi.org/project/rubi-integrate/
from sympy import Symbol, sin, exp
from rubi_integrate import rubi_integrate
x = Symbol('x')
rubi_integrate(1/x, x) # log(x)
rubi_integrate(x**2, x) # x**3/3
rubi_integrate(sin(x)*x, x) # -x*cos(x) + sin(x)
rubi_integrate(exp(x**2), x) # sqrt(pi)*erfi(x)/2
It can also return the matched rules:
result, matched = rubi_integrate(exp(x)*sin(x**2 + x), x, return_matched_rules=True)
# matched == [(result, [
# ('4.7.7 F^(c (a+b x)) trig(d+e x)^n', 44),
# ('2.3 Miscellaneous exponentials', 43),
# ('2.3 Miscellaneous exponentials', 42),
# ('2.3 Miscellaneous exponentials', 11),
# ... ])]
Unfortunately it's not 100% compatible with the way rules are solved in Mathematica, but I tried to get as close as possible.
It currently requires the development build of SymPy (1.15+) which has not yet been released.
Hi, I have created the Python port of Rubi:
https://github.com/Upabjojr/rubi-integrate
This is already available on PyPI:
https://pypi.org/project/rubi-integrate/
It can also return the matched rules:
Unfortunately it's not 100% compatible with the way rules are solved in Mathematica, but I tried to get as close as possible.
It currently requires the development build of SymPy (1.15+) which has not yet been released.