axkr / symja_android_library

:coffee: Symja - computer algebra language & symbolic math library. A collection of popular algorithms implemented in pure Java.
https://matheclipse.org/
GNU General Public License v3.0
382 stars 86 forks source link

Port Rubi 4.17 to Symja #899

Open axkr opened 9 months ago

axkr commented 9 months ago

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:

New in 4.17:

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 commented 2 months ago

This rule:

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:

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

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