## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
Albert D. Rich
@AlbertRich
People, this Gitter chat room is for Rule Based Integration. This discussion is better had in one focused on solving ODEs.
Aaron Meurer
@asmeurer
Kuba Podkalicki
@kubaPod
@AlbertRich Apologies, will do. @asmeurer right, I must have missed my coffee, of course this was first order and single constant, sorry for confusion. That is still an example which would need to be verified though. But I will move the question to SE later.
Thanks
Axel Kramer
@axkr
@AlbertRich do you plan to support Surdin future Rubi versions?
The simple rules are easy to implement:
Int[Surd[x_, -1], x_] := Simp[Log[x], x] Int[Surd[x_, n_Integer], x_] := If[n>0, (n/(n+1))*x*Surd[x,n], ((-n/(-n-1))*x)/Surd[x, -n]] /; FreeQ[n, x] && NeQ[n, -1]
but what about all the somehow "similar" other Powerrelated rules?
Albert D. Rich
@AlbertRich
@axkr Thanks for contributing rules for integrating Surd[x,n] where n is an integer.
You might want to add rules to your package for integrating x^m Surd[x,n]^p where m is a positive integer, and n and p can be numeric or symbolic. Then you could post this add-on package to Rubi making it available to the Rubi community.
Axel Kramer
@axkr
Albert D. Rich
@AlbertRich
@axkr Looks good, but why not generalize the rules for noninteger and symbolic n like Mathematica's built-in integrator does?
Also you can use Mathematica's _. pattern object for p to unify your first two rules.
Miguel Raz Guzmán Macedo
@miguelraz
Hello!
I'm interested in bringing RUBI into a Julia-based term-rewriting system.
I tried yesterday to extract the Mathematica statements from the notebook files, but that was quite onerous.
What do people recommend as the path of least resistance here?
I just looked at the symja_android_library's rule dump in their repo and that seems attractive.
I would preferably like a JSON file with all the rules and the notebook filenames included as metadata.
Miguel Raz Guzmán Macedo
@miguelraz
OH WOW. I should have read the repo - I just found out the rules are in the github here
Axel Kramer
@axkr
Miguel Raz Guzmán Macedo
@miguelraz
Thanks a lot @axkr .
I'm not familiar with Java - is there anyway to get the Mathematica syntax for the rules that are here?
Albert D. Rich
@AlbertRich
@miguelraz I'm happy to hear you are interested in porting Rubi to the Julia CAS.
All of Rubi's rules are in the Rubi-4.16.1.0.zip file which is available for downloading on the "Install Rubi" page of Rubi's GitHub website.
Miguel Raz Guzmán Macedo
@miguelraz
@AlbertRich thanks, I finally found that :sweat_smile:
I think by Rubi Rules I meant some of the algebraic simplification Rules as well, like those here: https://github.com/axkr/symja_android_library/blob/master/symja_android_library/rules/ArcCosRules.m
eg
ArcCos(0)=1/2*Pi,
The symjava library also has oodles of tests which (AFAIK) don't seem to come bundled with the Rubi zip.
Albert D. Rich
@AlbertRich
@miguelraz Rubi is a symbolic integrator. The algebraic simplification rules you desire are in Mathematica, not Rubi.
Miguel Raz Guzmán Macedo
@miguelraz
Gotcha. We might be able to lift them off symjava anyways, but that seems orthogonal to the integration rules.
Albert D. Rich
@AlbertRich
Rubi's entire integration test-suite is also available in multiple CAS syntaxes for downloading on the the "Test Problems" page of Rubi's website.
Miguel Raz Guzmán Macedo
@miguelraz
Still, thanks a lot for answering my questions.
Oh, that sounds very useful. Thanks!
Miguel Raz Guzmán Macedo
@miguelraz
@AlbertRich Is it possible to tag and release a new version of Rubi? There's 40ish commits to master and the last tagged release is late 2018. (This will help the reproducibility of our downloading and parsing workflow.) I understand this is an ask and that it might not happen.
A release for the MathematicaSyntaxTestSuite would also help loads.
Albert D. Rich
@AlbertRich
@miguelraz Yes, it's been over two years since Rubi 4.16.1 was released. Although far from perfect, it is based on a fairly powerful, stable system of rules. The integration rules and associated test-suite on Rubi's website are the most up-to-date, publicly available versions.
I’m in the midst of totally redesigning the decision tree implicit in Rubi 4's pattern matching rules used to integrate rational and algebraic functions (they account for about half the system's current 7800 rules). This redesign will
• greatly increase the class of expressions Rubi can integrate,
• provide simpler, more straight-forward derivations when single-stepping, and
• facilitate the compilation of Rubi 4’s pattern matching rules into Rubi 5’s if-then-else decision tree.
I will not release the next, and hopefully last, version of Rubi 4 until a coherent set of rules are derived, debugged and thoroughly tested. I cannot predict when that new version will be released, given the creative nature of the work. It all depends on where the math leads me.
Once this is accomplished, I can begin work in earnest on Rubi 5. That involves compiling Rubi 4's pattern matching rules into a deeply nested if-then-else decision tree. Thus far I have been doing this manually. Considering the tree has around 7800 leaves, it is extremely tedious, error-prone and time-consuming work.
Clearly this compilation should be automated. Conceptually that should be relatively fairly straight-forward to do, given the hierarchical nature of the decision tree implicit in Rubi 4's pattern matching rules.
Such a compiler would greatly facilitate the release of Rubi 5 with its numerous advantages. It will be relatively easy to port Rubi 5 to virtually any CAS supporting an if-then-else control construct. Also preliminary testing indicates selecting rules using an if-then-else tree rather than pattern matching means Rubi 5 will run almost 2 orders of magnitude faster than Rubi 4.
If you or someone you know is interested in writing such a compiler and have the expertise required, I would be happy to share my ideas on how to implement it.
Miguel Raz Guzmán Macedo
@miguelraz
Thanks a lot for the comments @AlbertRich .
I can see that a lot of labour and thought has gone into this project. Y'all should be proud.
Miguel Raz Guzmán Macedo
@miguelraz
Is there a timing for how long the test suites and subsections ran for with Rubi / Mathematica / Octave?
Albert D. Rich
@AlbertRich
I just created the Rubi-5 repository on GitHub. It contains an actual functioning prototype of Rubi 5 that shows the structure of the proposed integrator. Also it provides an example how to compile Rubi 4 pattern matching rules into a Rubi 5 if-then-else decision tree. The repository's README file provides more details.
rfateman
@rfateman
I'm looking forward to Rubi 5, perhaps making the Lisp/Maxima translation straightforward. It would be great to have a concise list of the primitives needed for Rubi 5 to succeed.. picking out coefficients, testing for IntegerQ, traversing trees (in some presumed structure?).