The SymPy assumptions system lets you define x = Symbol('x', positive=True) (and query like x.is_positive). The pattern matcher will need to be able to set and define restrictions like this. Also note that expand_log() and logcombine() already expand and combine logarithms and check the domain restrictions.
Another thing is that the integrator should return a Piecewise whenever possible. For example, the current integrator: In [6]: integrate(x**n, x) Out[6]: ⎧log(x) for n = -1 ⎪ ⎪ n + 1 ⎨x ⎪────── otherwise ⎪n + 1 ⎩ This way we get results that are mathematically correct, even when assumptions aren't set. Aaron Meurer On Thu, Mar 2, 2017 at 8:56 AM, Abdullah Javed Nesar <abduljaved1...@gmail.com> wrote: > Hi Ondřej, > > I am willing to work on Rubi Integrator this summer. I went through the > issues you raised for this project and this idea really sounds cool. It > would be great to segregate the different methods of integration into a > decision tree which would hence improve its performance. > > Before implementing Rule-based integrator we need to implement fast pattern > matching/replacement for the set of 10,000 rules so we need to plan out an > efficient decision tree for it. > > log(x*y) -> log(x) + log(y); x > 0, y > 0 > > > In the above example how do we exactly move on with domain restrictions > (i.e. x, y). > > On Wednesday, March 1, 2017 at 8:39:41 PM UTC+5:30, Ondřej Čertík wrote: >> >> Hi, >> >> Here is a project that I would love to see happen: >> >> https://github.com/sympy/sympy/issues/12233 >> >> I am available to mentor it, and I think quite a few people are >> excited about it and such a system/framework (i.e. set of rules for >> patter matching + compiler to generate a fast if/then/else decision >> tree) would have applications beyond just integration, but integration >> would already be super useful. As you can browse on Rubi web page, the >> integrator's capabilities are very impressive, i.e. the rule based >> system Rubi 4.9 can do more integrals than Mathematica, and is about >> as fast, due to the large number of rules, and the if/then/else >> decision tree Rubi 5 promises an order of magnitude (or more) speedup, >> but it's still in development. >> >> The project is big in scope, so there could even be multiple projects. >> If anybody is interested in this, please get in touch, and try to >> propose a good plan. >> >> Ondrej > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sympy+unsubscr...@googlegroups.com. > To post to this group, send email to sympy@googlegroups.com. > Visit this group at https://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/05a4ee3e-7a0b-485b-9918-0a68bb4f3350%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6K903EOFp6JJyQfFH%2Be1BwTO6RFr_5mWHGKXZ%2BKX1qXuQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.