Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Patrick Scheibe
    @halirutan
    Int[1/(E^(g*z)*Sqrt[1 - g^2]), g]
    Even if you remove the z from the expression, Rubi and Mathematica cannot find a closed form of the antiderivative.
    betatron
    @betatron_gitlab
    I do not have Rubi. Please, can you do it for me?
    Patrick Scheibe
    @halirutan
    @betatron_gitlab (a) I already tried it for you and showed you that even with Rubi it seems not possible (b) Rubi is free and you can simply install and use it yourself.
    betatron
    @betatron_gitlab
    Ok. Thank you Sir. Please, how to instal it on My mathematica?
    Patrick Scheibe
    @halirutan
    @betatron_gitlab What Mathematica version do you have?
    betatron
    @betatron_gitlab
    11.2
    Patrick Scheibe
    @halirutan
    See here:
    betatron
    @betatron_gitlab
    Thank you.
    Patrick Scheibe
    @halirutan
    No problem
    betatron
    @betatron_gitlab
    Please, what is the utility of Rubi for a physicist?
    Patrick Scheibe
    @halirutan
    @betatron_gitlab Rubi is a package for calculating the symbolic antiderivatives of expressions. So if you have an expression that cannot be integrated with Mathematica, often but not always Rubi can do it. However, like in your case, where it is not possible, you will most likely need to use numeric integration.
    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