symja_android_library icon indicating copy to clipboard operation
symja_android_library copied to clipboard

Port Rubi 4.17 to Symja

Open axkr opened this issue 1 year ago • 1 comments

Port Rubi 4.17 to Symja

See branch rubi_4_17: https://github.com/axkr/symja_android_library/tree/rubi_4_17

The converter will be maintained here: /symja_android_library/tools/src/main/java/org/matheclipse/core/rubi (files ConvertRubi.java, ConvertRubiUtilityFunctions.java)

See:

  • https://github.com/axkr/symja_android_library/wiki/Porting-Rubi-Integration-rules-to-Symja
  • https://github.com/RuleBasedIntegration/Rubi/wiki

New in 4.17:

  • approx. 650 more rules as in 4.16. To evaluate the system of rules is significantly slower.

  • disabled in RubiRules_4.17.3.0_FullLHS.m line 2069 (commented out in Java code):

Int[Times[Optional[Pattern[u, Blank[]]], Pattern[Px, Blank[]]], Pattern[x, Blank[Symbol]]] := With[{a = Rt[Coeff[Px, x^2, 0], Expon[Px, x^2]], b = Rt[Coeff[Px, x^2, Expon[Px, x^2]], Expon[Px, x^2]]}, Int[u*(a + b*x^2)^Expon[Px, x^2], x] /; EqQ[Px, (a + b*x^2)^Expon[Px, x^2]]] /; PolyQ[Px, x^2] && GtQ[Expon[Px, x^2], 1] && NeQ[Coeff[Px, x^2, 0], 0] &&  !MatchQ[Px, (a_.)*(v_)^Expon[Px, x^2] /; FreeQ[a, x] && BinomialQ[v, x, 2]]
  • disabled FixIntRules in IntegrationUtilityFunctions.m (commented out in Java code):
FixIntRules[] :=
  (DownValues[Int]=FixIntRules[DownValues[Int]]; Null)


FixIntRules[rulelist_] := Block[{Int, Subst, Simp, Star},
  SetAttributes[{Int, Subst, Simp, Star},HoldAll];
  Map[Function[FixIntRule[#,#[[1,1,2,1]]]], rulelist]]
  • the Rubi Star function is used: https://github.com/axkr/symja_android_library/blob/677e807b21516d17aba8facb3ca28fe3b6d77339/symja_android_library/Rubi/IntegrationUtilityFunctions.m#L4090

axkr avatar Jan 26 '24 07:01 axkr

This rule:

  • https://github.com/RuleBasedIntegration/Rubi/blob/61e9c18ea248061cd83c67882f7c91a73cef912d/Rubi/IntegrationRules/1%20Algebraic%20functions/1.4%20Miscellaneous/1.4.1%20Algebraic%20function%20simplification.m#L529

corresponding to:

Int[Times[Optional[Pattern[u, Blank[]]], Pattern[Px, Blank[]]], Pattern[x, Blank[Symbol]]] := With[{a = Rt[Coeff[Px, x^2, 0], Expon[Px, x^2]], b = Rt[Coeff[Px, x^2, Expon[Px, x^2]], Expon[Px, x^2]]}, Int[u*(a + b*x^2)^Expon[Px, x^2], x] /; EqQ[Px, (a + b*x^2)^Expon[Px, x^2]]] /; PolyQ[Px, x^2] && GtQ[Expon[Px, x^2], 1] && NeQ[Coeff[Px, x^2, 0], 0] &&  !MatchQ[Px, (a_.)*(v_)^Expon[Px, x^2] /; FreeQ[a, x] && BinomialQ[v, x, 2]]

in file:

  • https://github.com/axkr/symja_android_library/blob/master/symja_android_library/Rubi/RubiRules_4.17.3.0_FullLHS.m

seems to give an endless recursion for expressions like this Power pattern:

Integrate(f^(a + b/x^2)*x^8, x)

axkr avatar Sep 04 '24 22:09 axkr