by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    betatron
    @betatron_gitlab
    thank's
    well
    Nasser M. Abbasi
    @nasser1
    @betatron_gitlab "Please, what is the utility of Rubi for a physicist?" There is a Physics paper using Rubi https://arxiv.org/pdf/1811.04892.pdf titled "An Application of Rubi: Series Expansion of the Quark Mass
    Renormalization Group Equation"
    Patrick Scheibe
    @halirutan
    @nasser1 Ahh, yes. How could I forget that. This paper is the sole reason why we wrote the Rubi paper to make Rubi officially citable.
    Thanks Nasser.
    betatron
    @betatron_gitlab
    Thank you
    Tobias Bouma
    @Tobiasbouma_twitter
    Hello everybody!
    I'm having trouble looking up a reference for a RUBI rule
    The rule (rules actually) are 2485 and 2490. Where can I look this up?
    Tobias Bouma
    @Tobiasbouma_twitter
    I have found something on page 36 of 3.3 u (a+b log(c (d+e x)^n))^p. Cheers nonetheless!
    Patrick Scheibe
    @halirutan
    @AlbertRich Someone sent me this comparison, where a change from + to - makes all the difference between Rubi can and cannot integrate it.
    integrals.png
    Do you thing you can do something about this?
    Albert D. Rich
    @AlbertRich

    @halirutan Thanks for pointing out this pattern matching problem. Rubi can integrate

    (2 - 5*x^3)/(Sqrt[1 - x^3]*(1 + x^2*(1 - x^3)))

    but not the equivalent expanded form

    (2 - 5*x^3)/(Sqrt[1 - x^3]*(1 + x^2 - x^5))

    I will add it to Rubi's deficiency list.

    Patrick Scheibe
    @halirutan
    @AlbertRich Thanks
    Albert D. Rich
    @AlbertRich
    @halirutan You're welcome. As I pointed out in my response to Rubi Issue 11 and 14, it is quite easy using differentiation to generate integration problems that any symbolic integrator, including Rubi, cannot get.
    Note that for both forms of the above integrals, Mathematica 11.3 returns a multipage "wall paper" result. Maple 2018 returns the integral unevaluated.
    Nasser M. Abbasi
    @nasser1

    Rubi experts. Is there an easy way to extract the rubi Rule from the output of DownValues[Int][[ruleNumber]] in a way that I can easily use it in the report I am making? For example

         <<Rubi`
        DownValues[Int][[30]];
        InputForm[%]

    gives

          HoldPattern[Int[(Rubi`Private`x_)^(Rubi`Private`m_.), 
          Rubi`Private`x_Symbol]] :> 
          Rubi`Private`ShowStep[30, "If \!\(\*RowBox[{\"NeQ\", \"[\", RowBox[{\"m\", \",\", 
          RowBox[{\"-\", \"1\"}]}], \"]\"}]\)", "Integrate[(x)^(m), x]", 
           "x^(m + 1)/(m + 1)", Hold[Rubi`Private`Simp[Rubi`Private`x^(Rubi`Private`m 
           + 1)/(Rubi`Private`m + 1), Rubi`Private`x]]] /; 
             FreeQ[Rubi`Private`m, Rubi`Private`x] && 
             Rubi`Private`NeQ[Rubi`Private`m, -1] /; Rubi`Private`SimplifyFlag

    All what I want really is just the parts

          "Integrate[(x)^(m), x]"  and "x^(m + 1)/(m + 1)"  

    since that is what would be the useful part for the readers. Then in Latex, I would put the above as something like

           Integrate[(x)^(m), x]  ----- 30 ----->  x^(m + 1)/(m + 1)

    The idea is that I want to show the rules below the result, but in a easy way to read them.
    thanks

    Nasser M. Abbasi
    @nasser1

    I needed to add small note on last message I wrote. The software I am using in current build is

        Mathematica 12 (64 bit).
        Rubi 4.16.1 in Mathematica 12.
        Maple 2019.1 (64 bit)
        Maxima 5.43
        Fricas 1.3.5.
        Sympy 1.4 under Python 3.7.3 using Anaconda distribution.
        Giac/Xcas 1.5.
        SageMath version 8.8

    I am not using Rubi_in_sympy in this build, since that would require waiting for sympy 1.5 and I am not sure when that will be released. That is why it is not listed above. Rubi_in_sympy does not work in Sympy 1.4 due to a small bug. Hopefully this will be fixed in sympy 1.5 and if so, will add it then.

    Nasser M. Abbasi
    @nasser1

    To answer myself on my question above. I think I have to run Rubi again to get the steps. This is what I actually did in version 4.5.

    So in V 4.16.1, I would do this

       {stats, result} = Stats[Int[( ......] (*to get result and stats*)
       steps=Steps[Int[....]  (*to get the steps,  with rules numbers*)

    It would be nice, if there was a way to just obtain back a specific rule given its rule number. Since stats already return the rule numbers used

         stats["Rules"]

    Gives list of rule numbers used, but without having to actually integrate again the same integrand. But this is no problem, I'll run Rubi twice, the second time just to obtain the actual rules/steps used.

    Rubi runs fast, so it is OK for now to do this.

    Albert D. Rich
    @AlbertRich

    @nasser1 To get the raw rules using DownValues without the ShowStep wrapper, build Rubi with the control variable $LoadShowSteps set to False during the load as follows:

    $LoadShowSteps = False;
    Get["Rubi`"]
    BeginPackage["Rubi`"];
    Begin["`Private`"];
    DownValues[Int][[30]]//InputForm

    which should then display

    HoldPattern[Int[(x_)^(m_.), x_Symbol]] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]
    $LoadShowSteps is described at the end of the "Using Rubi" instructions on Rubi's GitHub website.
    Nasser M. Abbasi
    @nasser1
    Hi; FYI. The data input files for Maple in version 4.16.1 is missing one file compared to Mathematica. Under the folder "7 Inverse hyperbolic functions\7.2 Inverse hyperbolic cosine" Maple has only 3 files, while Mathematica has 4 files. The extra file is "d+e_x-^p-d+e_x-^q-a+b_arccosh-c_x-^n.m" which do not exist in Maple input zip file. If this file is available for Maple I can add it. If not, I will remove the extra file from Mathematica, since the same number of files is needed for both.
    Thanks,
    Albert D. Rich
    @AlbertRich
    @nasser1 Thanks for reporting. Just delete the extra file from the Mathematica directory. It was a temporary work file I forgot to delete before I built the Mathematica zip file.
    Szabolcs Horvát
    @szhorvat
    This is being discussed a lot now. Disappointing that it doesn’t refer to RUBI
    Albert D. Rich
    @AlbertRich

    @szhorvat Yikes!!! Many people are in danger of losing their jobs due to computer automation, but I never figured implementers of computer algebra systems had anything to worry about...

    Seriously, if "deep learning" neural networks are to compete with human programmers, they will need to derive the recurrence relations necessary to reduce integrands to forms for which there are terminal rules. It should be relatively easy for neural networks to learn terminal integration rules from Rubi’s test suite since it explicitly includes examples of them in their most general form.

    However, deriving the necessary recurrence relations from the test suite will be much harder since they can only be inferred implicitly by reverse engineering problems that have used them. Also, which recurrence to use when multiple recurrences could be applied to a given integrand is an even more difficult problem.

    Instead of trying to derive the recurrences from Rubi’s test suite, seems like it would be a lot easier for neural networks to just lift them directly from Rubi’s freely available source code where they are explicitly provided in both human- and machine-readable form...

    Albert

    Szabolcs Horvát
    @szhorvat
    I only skimmed it briefly, but it seems like real progress. No doubt there are many integrals it can solve that either Integrate or RUBI cannot. Someone mentioned one here: https://mathematica.stackexchange.com/q/211701/12
    But I wonder how well it would do on an independent test suite like @nasser1's (which is likely to contain many examples different from anything it was trained on)
    Patrick Scheibe
    @halirutan
    @szhorvat Nasser uses the Rubi test-suite afaik. The hard work he is doing is to run it through all available systems to get a comparison between CAS
    Szabolcs Horvát
    @szhorvat
    I'm sorry, I stand corrected.
    Anixx
    @Anixx
    Hello! I think Rubi is a great undertaking and want to suggest an idea. In my applications it is important to select the integration constant for anti-derivatives in a natural way rather than based on simplicity of expression. We call it "natural integral". Natural integral can be defined as Newton series interpolation over consecutive derivatives evaluated at -1. In other words, it is unique anti-derivative which continues the sequence of consecutive derivatives. Often it is difficult to find the desired natural integration constant. For simple functions such as exp x and cos x the natural integrals are exp x and sin x respectively, but for other functions this can be not so evident. Please look at this post which includes 3 proposed definitions of natural integral: https://mathoverflow.net/questions/346741/prove-the-following-property-about-natural-integral
    To clarify, I suggest there could be an option to produce the natural anti-derivative instead of what can be seen as simpler expression.
    Anixx
    @Anixx
    Also, a question, are you planning to add the ability of discrete integration (finding indefinite sums)?
    Albert D. Rich
    @AlbertRich
    @Anixx Thanks for your positive comment about Rubi. My time is maxed-out just trying to get Rubi to produce optimal antiderivatives for the classes of integrands advertised that it can handle.
    Rubi is an open source, freely available system. I invite you to modify its terminal rules to generate "natural" antiderivatives and to make public the resulting Natural Rubi. Also a rule-based discrete integrator that produced antidifferences would be a great project for someone knowledgable in the field...
    Vladimir Bondarenko
    @V_Bondarenko_twitter

    Hello Albert,

    On Dec 31, I sent you a message about Rubi at your usual msn.com address . I wonder if you received it? Best wishes, Vladimir

    sedram
    @sedram
    Is there a limit to how long I should wait for Rubi to try on a complicated integral? It's been ~14 hours so far, but maybe people have had success on things after 2 days or something.
    Albert D. Rich
    @AlbertRich
    @sedram Probably best to shut her down. If Rubi is unable to integrate an expression in less than 10 minutes, she probably never will.
    If you think the problem is integrable and in the class of expressions Rubi is designed to integrate, you can post it here or open an issue at https://github.com/RuleBasedIntegration/Rubi/issues.
    Albert D. Rich
    @AlbertRich

    This is an excerpt of a recent post on the sci.math.symbolic usernet group

    And of course, having no better method one could use Rubi way:
    add lookup table and retrieve precomputed answer from the table.

    I responded with the following post:

    Rubi does NOT use a lookup table of specific precomputed integrals. Rather it uses generic reduction and terminal rules to iteratively integrate large classes of expressions. For example, when Martin presents a specific example Rubi cannot integrate, it usually leads to a generic rule able to produce optimal antiderivatives for the whole class of integrands for which the example is a special case.

    Instead of using rule-based integration when there is “no better method”, I contend it should be used BEFORE resorting to advanced methods like Risch. There are numerous advantages of a properly implemented rule-based integrator:

    1. If a rule does apply, the optimal antiderivative will quickly and reliably be found.
    2. Rule-based systems can show the rules applied and the resulting intermediate steps.
    3. The rules are self-contained and easily verified by differentiation.
    4. The individual rules are elementary in nature and thus comprehensible to mere humans, like first year calculus students.
    5. This makes rule-based systems great pedagogical tools in the classroom.
    6. Rules can be developed, debugged and tested in a modular fashion rather than as a monolith.
    7. Holes in the rule-based decision tree point to where new mathematical knowledge (in this case, integration formulas) is crying out to be discovered.
    8. It’s quickly determined when no rule applies, so the delay in resorting to advanced methods is negligible, especially compared to the amount time such methods often require.
    Patrick Scheibe
    @halirutan
    @AlbertRich Nicely written!
    edmontz
    @edmontz
    A question about the results of a particular integral.
    [1/(1+sin(x)^6),x,7,1/3x/sqrt(2)+1/3atan(cos(x)sin(x)/(1+sin(x)^2+sqrt(2)))/sqrt(2)+1/3atan(sqrt(1-(-1)^(1/3))tan(x))/sqrt(1-(-1)^(1/3))+1/3atan(sqrt(1+(-1)^(2/3))*tan(x))/sqrt(1+(-1)^(2/3))],
    edmontz
    @edmontz
    maxima syntax, the powers of -1 +1 appear to produce zero; this is an error.Was a different representation expected. Have considered the roots of unity as a complex exponential, gets way complicated quickly.
    edmontz
    @edmontz
    Maybe the version of maxima I'm using.I've found it necessary to replace the likes of atan(b,c) with atan(c/b) in the rubi rules for maxima. That has made the lst[] loadable; whereas the previous 1/(1+sin(x)^6) example produces a divide by zero error when I attempt to load it.There is an integral for that available in maxima, however the likes of 1/(1+sin(x)^8) don't have an integral in maxima.Symja now produces a result, that's almost correct; the (-1)^(1/3) +1 has now been changed so as not to produce the divide by zero error.
    Nasser M. Abbasi
    @nasser1
    image.png

    Hello; Why sometimes Rubi shows "removeContent" from Steps command on some integrals? For example, from clean kernel

         << Rubi`
        Steps[Int[Sin[2*x]/(a^2 - b^2*Sin[x]^2), x]]

    Gives the above screen shot. This does not show all the time, I just noticed it on this one. May be it is normal for this to show up sometimes. I just wanted to check.

    btw, how does one find the version number of Rubi they are using? Is there something like RubiVersionNumber[] command?

    I am using V 12.1 of Mathematica on windows 10. Rubi 4.16.1

    Albert D. Rich
    @AlbertRich
    @nasser1 Hi Nasser. Rubi wraps RemoveContentaround the arguments of logs occurring at the top-level of antiderivatives to remove unnecessary factors independent of the integration variable. For example, for the integrand 1/(r*t+s*t*x) Rubi returns Log[r+s*x]/(s*t); whereas Mathematica returns Log[r*t+s*t*x]/(s*t).
    $RubiVersion returns the string "Rubi 4.16.1.0".