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.)
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...
Wester Problems.m
- it doesn't share the same structure as the rest of the notebooks.
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
{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])]}
/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} *)
E^x
used instead of Exp[x]
? Int([a_. + b_.*x_), x_Symbol]
mean?@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.
If[TrueQ[$LoadShowSteps], Int[...] :=
?
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.
@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.