Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Albert D. Rich
    @AlbertRich
    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?).
    Albert D. Rich
    @AlbertRich
    @rfateman Thank you for your interest in Rubi 5. The utility routines needed for the Rubi 5 prototype are defined at the end of its source file in Rubi-5.zip.
    Of course, the number of utility routines will increase as Rubi 5 is fully implemented. However, their implementation should not be that difficult.
    rfateman
    @rfateman
    Looks like Expand, Together, Simplify, polynomial division with remainder are needed. Implementing a substitute for Mathematica's Simplify[] might be a chore. I haven't run (parts of ) Rubi in Lisp recently, or (ever) using Mathematica. I do have a concern that has caused some discussion in the Maxima world. In Maxima there is an attempt to provide an "optimal" solution which has different forms depending on the answers to some questions. e.g. integrate( (ax^2+bx+c)^(3/2),x) can use log or asinh. The current integration program can either use pre-declared assumptions, or asks for the sign of a, whether b is nonzero, and if the discriminant b^2-4ac is zero or not. Interrupting the user with questions is unpopular, especially when the questions are a good deal more complicated! I suppose one could try to answer all questions so as to guide the solution toward the "most generic" answer. I suppose that might include, somehow, all others, even if a far simpler result is sometimes possible. Is there a mechanism to steer Rubi through a potential maze of symbolic inequalities e.g. b^2-4ac > 0 ?? Thanks for keeping up on this project! --RJF
    Albert D. Rich
    @AlbertRich
    @rfateman Rubi does not ask the user questions about the integrand. Rather it always returns mathematically valid antiderivatives in the sense that the derivative of the antiderivative equals the integrand.
    Albert D. Rich
    @AlbertRich

    However to select between antiderivatives which are both valid, Rubi assumes the integrand' s variables are positive. For example, Int[1/Sqrt[a + b x + c x^2], x] returns

    ArcTanh[(b+2*c*x)/(2*Sqrt[c]*Sqrt[a+b*x+c*x^2])]/Sqrt[c]

    whereas Int[1/Sqrt[a + b x - c x^2], x] returns

    -ArcTan[(b-2*c*x)/(2*Sqrt[c]*Sqrt[a+b*x-c*x^2])]/Sqrt[c]

    Note that both results are mathematically valid no matter what nonzero value is substituted for c and both results are free of the imaginary unit if a positive value is substituted for c.

    Albert D. Rich
    @AlbertRich
    @rfateman The Simplify function of the host CAS is not critical to Rubi 5 producing mathematically correct antiderivatives. It only affects how neat and tidy they are.
    Axel Kramer
    @axkr
    (Unfortunately we can not see the new issues "on the right" in this gitter chat room. Can you set the link to the repository in the gitter settings to make them appear?)
    Albert D. Rich
    @AlbertRich
    @axkr I commented on your Rubi 5 Issue 1.
    Albert D. Rich
    @AlbertRich
    @axkr I am a novice at Gitter and GitHub. I clicked on "Configure your integrations", then "GitHub" and allowed Gitter to access the RuleBasedIntegration repository. But keep getting an unhelpful error message. What am I doing wrong?
    Miguel Raz Guzmán Macedo
    @miguelraz
    @AlbertRich Congrats! Rubi 5 sounds very, very exciting.
    This open source development you've taken on is impressive and very encouraging, thank you.
    Miguel Raz Guzmán Macedo
    @miguelraz
    Sorry to ask again @AlbertRich, but would you happen to have timings for the test suite for Mathematica vs Rubi?
    SorinS
    @SorinS
    @AlbertRich Very nice start, I like the If-Then idea instead of pattern matching.
    rfateman
    @rfateman
    It's true that the user of symbols a,b,c could have written -a, -b, -c, but the antiderivatives must be valid for any values of a,b,c positive, negative or zero. There is an advantage to some forms of antiderivative which may represent functions continuous in some designated region, as you know. It's a harder problem though, and Rubi's doing great stuff anyway.
    Albert D. Rich
    @AlbertRich
    @rfateman Thanks for your endorsement of Rubi. Note that I said "both results are mathematically valid no matter what nonzero value is substituted for c..." (emphasis added). Neither antiderivative is valid if 0 is substituted for c. Happily the set on which they are invalid (i.e. {0} ) is just a set of measure zero.
    Albert D. Rich
    @AlbertRich

    @miguelraz

    ... would you happen to have timings for the test suite for Mathematica vs Rubi?

    @nasser1 has posted extensive integration test results including performance times for all the major CAS at Computer Algebra Independent Integration Tests.
    Miguel Raz Guzmán Macedo
    @miguelraz
    @AlbertRich Awesome, I think that report was just what I was looking for.
    @nasser1 would you happen to have timing breakdowns by Section? eg Total time taken by a CAS in the Independent tests, Total time taken by a CAS in the Algebraic Binomial tests... so on.
    Miguel Raz Guzmán Macedo
    @miguelraz
    Do those not pass tests?
    Miguel Raz Guzmán Macedo
    @miguelraz
    Also curious what these comments within these Integration rules mean
    Albert D. Rich
    @AlbertRich
    @miguelraz The RuleBasedIntegration/Rubi GitHub repository is not being maintained. Instead to get the most up-to-date Rubi 4 source files, integration test-suite and test results go to the Rule-based Integration website.
    To answer your questions download the relevant Rubi 4 source file as a pdf or notebook file from the Integration Rules page of Rubi's website. Comments in the source files should explain why some code has been commented-out.