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
    Forget the other RuleBasedIntegration repositories on GitHub. As their dates indicate, they are not being maintained.
    Your question about the 4 fields of the integration test-suite files is answered in the first paragraph of the Test Problems page of Rubi's website.
    Miguel Raz Guzmán Macedo
    @miguelraz
    Thanks for the clarification - I had not understood that the Github repositores and the online zip files differ, given that they share the same semantic version of v4.16.1.0. Will update my code accordingly.
    Albert D. Rich
    @AlbertRich
    @miguelraz Sorry about the confusion. Rubi is very much a work-in-progress. Albert
    Miguel Raz Guzmán Macedo
    @miguelraz
    No worries! Your work is paving way for an entire ecosystem for us, so we appreciate all you've done. It really is amazing. If I'm not out of line, do consider bumping the zip file on the Rubi website to 4.17 or akin so that others know it is not the same version as those in the github repos (as is common in semantic versioning practice.)
    Albert D. Rich
    @AlbertRich
    @miguelraz Like I said in the Rubi 5 README file, the next release of Rubi 4 (version 4.17.0) will hopefully be the last. To avoid confusion, I'm starting to think the out-of-date RuleBasedIntegration repositories should all be deleted, or at least hidden...
    Albert D. Rich
    @AlbertRich
    Rather than the collaborative GitHub paradigm, Rubi has pretty much been a one-man show. Its freely available, but read-only, website provides public access to the system. This has given me complete control over Rubi's design and implementation.
    But perhaps Rubi is now mature enough to be transformed into a collaborative software project focused on implementing Rubi 5 and then porting it to popular computer algebra systems. The Plan for Implementing Rubi 5 outlines how this could be achieved as a crowd-source project.
    So if there is sufficient interest, I propose a new repository for Rubi be created and operated as a conventional GitHub site encouraging collaboration (unlike the now dormant RuleBasedIntegration repository).
    Meanwhile, I'll keep my focus on perfecting Rubi 4 to my satisfaction before turning my attention to Rubi 5. So I invite others having the time and inclination, create a repository for The Rubi Project and oversee its operation.
    pretentious7
    @pretentious7
    I'm interested in helping with the sympy implementation and possible future sagemath integration!
    1 reply
    Miguel Raz Guzmán Macedo
    @miguelraz
    @AlbertRich all the more amazing that it's been a one man show!
    I ran into some issues today when parsing the Wester Problems.m - it doesn't share the same structure as the rest of the notebooks.
    Miguel Raz Guzmán Macedo
    @miguelraz
    I also found line 1717 of 1.3.2 Algebraic functions to be malformed:
      1717 (* {Sqrt[1+x^2]/(1-x^3), x, 0} *)
    Miguel Raz Guzmán Macedo
    @miguelraz
    There were 7 other cases were the 4 field was not present - I think I'm skipping those for now.
    Momchil Peychev
    @mpeychev_gitlab

    Dear @AlbertRich , I came across Rubi (and all encompassing materials) recently and simply wish to express my admiration for the whole project and the way it is led and executed by you. I also want to thank you for making it open and public with such a good and thorough documentation. To this end, many thanks go to @halirutan and anyone else who has helped you in one way or another during the process as well as to the people who are porting Rubi to other languages, thus enriching the Rubi ecosystem and making it even more accessible.

    I would also like to use Rubi in my research and I hope that you don't mind it. I can assure you that credit will be given appropriately and any interesting findings will be open-sourced and shared back to the community.

    I carefully examined the documentation and the papers describing Rubi and am excited to see the future plans to implement Rubi-5 in an explicit if-then-else decision tree fashion. I have one question related to this and one specific point that you make in the papers, which I would like to make clear. In one of your papers (specifically Section 2 of this one, also Section 3 here) it is mentioned that

    The construction and selection of the rules is based on the principle of mutual exclusivity. For a database of reduction rules to be properly defined, at most one of the rules can be applicable to any given expression. Mutual exclusivity is critical to ensuring that rules can be added, removed or modified without affecting the other rules. Such stand-alone, order-independent rules make it possible to build a rule-based repository of knowledge incrementally and as a collaborative effort.

    However, in the Rubi.m file, we can see the following comment:

    98 (* The order of loading the rule-files below is crucial to ensure a functional Rubi integrator! *)

    Could you please confirm that you obtain the desired mutual exclusivity solely by implicitly relying on Mathematica's pattern matching implementation (specifically, that it can apply the first rule which it finds to match a particular pattern). Are the conditions attached to each rule only related to its validity and simplification capabilities, i.e. there are no further conditions which are there just to ensure the mutual exclusivity of the rules? The implications of this will be that for a given initial integral, we are then able (in theory) to explore a whole search tree of rewrites and simplifications by applying the rules in your collection.

    Kind regards,
    Momchil

    Albert D. Rich
    @AlbertRich
    @mpeychev_gitlab Thank you Momchil for your kind words regarding Rubi. Yes, Rubi's GitHub repository, the Rubi website and this Rubi chatroom would not exist without the help of Patrick Scheibe. He dragged me kicking-and-screaming into the 21st Century. (Well at least partially. I refuse to own a "Smart" phone.)
    Of course, I'm delighted when I hear that Rubi is being used for research. Also when it's used as a pedagogical tool that can show the steps like those an experienced mathematician might use to integrate an expression.
    As to the point you made: Yes, the paragraph you quoted from our paper is not true, at least not now. When Rubi was still in its infancy, a goal of mine was to make mutually exclusive the application conditions of its rules. Then the order rules were processed by the host CAS would not matter.
    However as Rubi grew in size, achieving that lofty goal became impractical. So Rubi 4 does depend on the order rules are processed by the host. Happily however, the issue of mutual exclusivity is moot for Rubi 5 since the order of rule application is entirely determined by its if-then-else decision tree.
    As to the question you raised: Yes, in Rubi 4 the application conditions of some rules are there just to achieve mutual exclusivity. They remain a harmless remnant of the original lofty goal described above. These superfluous application conditions will not affect Rubi 5's decision tree.
    Aloha from Hawaii,
    Albert
    Momchil Peychev
    @mpeychev_gitlab
    @AlbertRich , thanks a lot for your clarifications! As a bit of a follow up, do you have any rough estimate what fraction of the current Rubi-4 rules have these extra superfluous conditions which guarantee mutual exclusivity? I imagine that there are not too many of them and/or these are predominantly some (very) special case rules which are not used that often? Thanks
    Albert D. Rich
    @AlbertRich
    @mpeychev_gitlab Since they are harmless, I have no idea the percentage of rules having superfluous conditions. I don't understand why you are concerned about them.
    Albert D. Rich
    @AlbertRich

    @miguelraz Thanks for pointing out that

    I also found line 1717 of 1.3.2 Algebraic functions to be malformed:

      1717 (* {Sqrt[1+x^2]/(1-x^3), x, 0} *)
    You can replace this line with
    {Sqrt[1+x^2]/(1-x^3), x, 12, (2/3)*ArcTan[(1 + x)/Sqrt[1 + x^2]] + (1/3)*Sqrt[2]*ArcTanh[(1 + x)/(Sqrt[2]*Sqrt[1 + x^2])]}
    Note that Rubi 4.16.1 can't get this simple antiderivative, but the version of Rubi 4 currently under development can.
    Miguel Raz Guzmán Macedo
    @miguelraz
    @AlbertRich no worries!
    I found these other offenders:
    /MathematicaSyntaxTestSuite-4.16.0/1 Algebraic functions/1.3 Miscellaneous/1.3.2 Algebraic functions.m
    ┌ Warning: (* {(Sqrt[x]+x)^(2/3), x, 0} *)
    
    /MathematicaSyntaxTestSuite-4.16.0/1 Algebraic functions/1.3 Miscellaneous/1.3.2 Algebraic functions.m
    ┌ Warning: (* {(-3*x+x^2)^(-1/3), x, 0} *)
    
    /MathematicaSyntaxTestSuite-4.16.0/1 Algebraic functions/1.3 Miscellaneous/1.3.2 Algebraic functions.m
    ┌ Warning: (* {1/Sqrt[a*x+b*x^3], x, 0} *)
    
    /MathematicaSyntaxTestSuite-4.16.0/1 Algebraic functions/1.3 Miscellaneous/1.3.2 Algebraic functions.m
    ┌ Warning: (* {E^(a + b*x + c*x^2)/(d + e*x)^2, x, 0} *)
    Sorry for the silly parsing questions, but:
    1. Why is E^x used instead of Exp[x]?
    2. What do the underscores in Int([a_. + b_.*x_), x_Symbol] mean?
    Miguel Raz Guzmán Macedo
    @miguelraz
    The translation to Julia of Rubi rules is almost complete!
    Albert D. Rich
    @AlbertRich
    @miguelraz These problems were probably commented out because they hung earlier versions of Rubi. I restored them and included their optimal antiderivatives as the fourth element of the problem.
    The underscore following a variable in Mathematica patterns indicates the variable can stand for any mathematical expression.
    To have any hope of successfully porting Rubi 4 to Julia, you need to fully understand how Mathematica's pattern matching works.
    Miguel Raz Guzmán Macedo
    @miguelraz
    @AlbertRich Thanks. Good to know they've been handled.
    Miguel Raz Guzmán Macedo
    @miguelraz
    Also, why do these lowercase functions exist?
       4.7.5 Intert Trig Functions.m : "Int[u_.*(a_.*tan[c_. + d_.*x_]^n_. + b_.*sec[c_.+d_.*x_]^n_.)^p_, x_Symbol]",
    Miguel Raz Guzmán Macedo
    @miguelraz
    Any RUBI internals for pattern matching that differ from those in the standard Mathematica documentation?
    Albert D. Rich
    @AlbertRich

    @miguelraz Internally Rubi uses inert trig functions to greatly reduce the number of circular and hyperbolic trig integration rules required.

    Before searching for integration rules to apply, Rubi uses the utility routine DeactivateTrig to convert integrands involving the 6 trig and 6 hyperbolic functions to equivalents ones involving just the 3 inert trig functions sin, tan and csc.

    For example, Cos[x] is converted to the inert sin[x+Pi/2]. If instead it was converted to the active Sin[x+Pi/2], Mathematica would immediately simplify it back to Cos[x]. Similarly, Sinh[x] is converted to -I sin[I x] and Cosh[x] is converted to sin[I x+Pi/2].

    So just 1 rule instead of 4 are required to integrate Sin[x], Cos[x], Sinh[x] and Cosh[x] wrt x. Similar rule consolidations are done for the tangent and secant (circular and hyperbolic) trig functions.

    Currently Rubi has over 2000 inert trig integration rules. Without this consolidation there would be over 8000 active trig and hyperbolic integration rules.

    Miguel Raz Guzmán Macedo
    @miguelraz
    Wow, that is clever.
    Miguel Raz Guzmán Macedo
    @miguelraz
    What is the best place to read about those internal design decisions? I just started reading the IntegrationUtilityFunctions.m.
    Albert D. Rich
    @AlbertRich
    @miguelraz That's the best place.
    Albert D. Rich
    @AlbertRich
    @miguelraz Also single step through integrations to see the rules being applied. For example, when integrating Sin[x] (or Sinh[x]) you can see the inactive sin[x_] on the lhs of the rule and the active Cos[x] on the rhs.
    Miguel Raz Guzmán Macedo
    @miguelraz
    Neat!
    Why do some rules have If[TrueQ[$LoadShowSteps], Int[...] :=?
    Is there a reason why Modele[{...}] is used in some places and With[{...}] is used in other places? IIUC, both introduce a local scope to make the calculations less verbose.
    Miguel Raz Guzmán Macedo
    @miguelraz
    1. Why is E^x used instead of Exp[x]?
    Bump!
    Albert D. Rich
    @AlbertRich

    @miguelraz When building Rubi with the ability to show steps, a few rules are hard-wired to display more meaningfully when the rule is applied. For your purposes, just assume $LoadShowSteps is False and use the Int rule defined by the fail condition of the If statement.

    See the Mathematica online help for the distinction between With, Module and Block.

    E^x and Exp[x] are interchangeable since Mathematica automatically simplifies the latter to the former.

    Miguel Raz Guzmán Macedo
    @miguelraz
    Awesome, thanks a lot for that explanation.
    Miguel Raz Guzmán Macedo
    @miguelraz
    Albert, good day.
    I've had people asking, so I just want to double check. If we use RUBI as a basis for an integrator, are any licensing issues potentially involved? We know that Mathematica people can be... insistent, so we just want to make sure that we have covered all the bases here. I know that the RUBI repo is MIT-licensed, but are there any grounds for concerns that its uses are compliant with the WolframEngine's terms of use?