• Estimating the time required to compute an integral using Trager's algo

    From Sam Blake@21:1/5 to All on Mon Nov 13 15:49:19 2023
    Hi All,

    Is there any way to a priori estimate of the time it will take the Risch-Trager-Bronstein algorithm to compute the integral of

    (1 - x^4)/((x^4 + x^2 + 1)*(x^5 - x^3)^(1/4))?

    I left it for 30 minutes and it was still crunching away...

    It takes my package 24 seconds on my old laptop

    In[22299]:= IntegrateAlgebraic[(1 - x^4)/((x^4 + x^2 + 1) (x^5 - x^3)^(1/4)), x] // Timing

    Out[22299]= {23.9914, -(((1/3 (17 + 12 Sqrt[2]))^(1/8)
    ArcTan[(
    3 Sqrt[1 + Sqrt[2]] x)/(-3 Sqrt[1 + Sqrt[2]] x +
    3 Sqrt[2 + 2 Sqrt[2]] x - 2^(3/4) 3^(7/8) (-x^3 + x^5)^(1/4))])/
    2^(3/4)) + ((1/3 (17 + 12 Sqrt[2]))^(1/8)
    ArcTan[(
    3 Sqrt[1 + Sqrt[2]] x)/(-3 Sqrt[1 + Sqrt[2]] x +
    3 Sqrt[2 + 2 Sqrt[2]] x + 2^(3/4) 3^(7/8) (-x^3 + x^5)^(1/4))])/
    2^(3/4) -
    ArcTan[(-2^(1/4) (3/(17 + 12 Sqrt[2]))^(1/8) x^2 + (-3 x^2 +
    3^(3/4) (17 + 12 Sqrt[2])^(1/4) Sqrt[-x^3 + x^5])/(
    2^(1/4) 3^(7/8) (17 + 12 Sqrt[2])^(1/8)))/(
    x (-x^3 + x^5)^(1/4))]/(2^(3/4) (3 (17 + 12 Sqrt[2]))^(1/8)) +
    ArcTanh[(
    3 (17/8748 + Sqrt[2]/729)^(1/8) x^2 +
    3^(3/4) (17/8748 + Sqrt[2]/729)^(1/8) Sqrt[-x^3 + x^5])/(
    x (-x^3 + x^5)^(1/4))]/(
    2^(3/4) (3 (17 + 12 Sqrt[2]))^(1/8)) + ((1/3 (17 + 12 Sqrt[2]))^(
    1/8) ArcTanh[(((3/(17 + 12 Sqrt[2]))^(1/8) x^2)/2^(1/4) +
    Sqrt[-x^3 + x^5]/(2^(1/4) (3 (17 + 12 Sqrt[2]))^(1/8)))/(
    x (-x^3 + x^5)^(1/4))])/2^(3/4)}

    Cheers,

    Sam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nasser M. Abbasi@21:1/5 to Sam Blake on Mon Nov 13 21:48:00 2023
    On Monday, November 13, 2023 at 5:49:22 PM UTC-6, Sam Blake wrote:
    Hi All,

    Is there any way to a priori estimate of the time it will take the Risch-Trager-Bronstein algorithm to compute the integral of

    (1 - x^4)/((x^4 + x^2 + 1)*(x^5 - x^3)^(1/4))?

    I left it for 30 minutes and it was still crunching away...

    On what system do you mean? in V 13.3 Mathematica solves it in 2.3 seconds

    In[1]:= Integrate[(1-x^4)/((x^4+x^2+1)*(x^5-x^3)^(1/4)),x]//Timing
    Out[1]= {2.375,(1/(2^(3/4) (51+36 Sqrt[2])^(1/8) (x^3 (-1+x^2))^(1/4)))x^(3/4) (-1+x^2)^(1/4) (ArcTan[(2^(1/4) 3^(7/8) x^(1/4) (-1+x^2)^(1/4))/((17+12 Sqrt[2])^(1/8) (-3 Sqrt[x]+3^(3/4) Sqrt[-1+x^2]))]+(17+12 Sqrt[2])^(1/4) ArcTan[(2^(1/4) 3^(7/8) (17+12
    Sqrt[2])^(1/8) x^(1/4) (-1+x^2)^(1/4))/(-3 Sqrt[x]+3^(3/4) Sqrt[-1+x^2])]+ArcTanh[(2^(1/4) 3^(7/8) x^(1/4) (-1+x^2)^(1/4))/((17+12 Sqrt[2])^(1/8) (3 Sqrt[x]+3^(3/4) Sqrt[-1+x^2]))]+(17+12 Sqrt[2])^(1/4) ArcTanh[(2^(1/4) 3^(7/8) (17+12 Sqrt[2])^(1/8) x^(1/
    4) (-1+x^2)^(1/4))/(3 Sqrt[x]+3^(3/4) Sqrt[-1+x^2])])}

    Rubi 4.17.3 solves it in 0.35 seconds, but in terms of special functions

    In[3]:= Int[(1-x^4)/((x^4+x^2+1)*(x^5-x^3)^(1/4)),x]//Timing
    Out[3]= {0.359375,(4 (3 I+Sqrt[3]) x (1-x^2)^(1/4) AppellF1[1/8,-(3/4),1,9/8,x^2,-((2 x^2)/(1-I Sqrt[3]))])/(3 (I+Sqrt[3]) (-x^3+x^5)^(1/4))+(4 (3 I-Sqrt[3]) x (1-x^2)^(1/4) AppellF1[1/8,-(3/4),1,9/8,x^2,-((2 x^2)/(1+I Sqrt[3]))])/(3 (I-Sqrt[3]) (-x^3+x^
    5)^(1/4))}


    It takes my package 24 seconds on my old laptop

    In[22299]:= IntegrateAlgebraic[(1 - x^4)/((x^4 + x^2 + 1) (x^5 - x^3)^(1/4)), x] // Timing

    Out[22299]= {23.9914, -(((1/3 (17 + 12 Sqrt[2]))^(1/8)
    ArcTan[(
    3 Sqrt[1 + Sqrt[2]] x)/(-3 Sqrt[1 + Sqrt[2]] x +
    3 Sqrt[2 + 2 Sqrt[2]] x - 2^(3/4) 3^(7/8) (-x^3 + x^5)^(1/4))])/
    2^(3/4)) + ((1/3 (17 + 12 Sqrt[2]))^(1/8)
    ArcTan[(
    3 Sqrt[1 + Sqrt[2]] x)/(-3 Sqrt[1 + Sqrt[2]] x +
    3 Sqrt[2 + 2 Sqrt[2]] x + 2^(3/4) 3^(7/8) (-x^3 + x^5)^(1/4))])/
    2^(3/4) -
    ArcTan[(-2^(1/4) (3/(17 + 12 Sqrt[2]))^(1/8) x^2 + (-3 x^2 +
    3^(3/4) (17 + 12 Sqrt[2])^(1/4) Sqrt[-x^3 + x^5])/(
    2^(1/4) 3^(7/8) (17 + 12 Sqrt[2])^(1/8)))/(
    x (-x^3 + x^5)^(1/4))]/(2^(3/4) (3 (17 + 12 Sqrt[2]))^(1/8)) +
    ArcTanh[(
    3 (17/8748 + Sqrt[2]/729)^(1/8) x^2 +
    3^(3/4) (17/8748 + Sqrt[2]/729)^(1/8) Sqrt[-x^3 + x^5])/(
    x (-x^3 + x^5)^(1/4))]/(
    2^(3/4) (3 (17 + 12 Sqrt[2]))^(1/8)) + ((1/3 (17 + 12 Sqrt[2]))^(
    1/8) ArcTanh[(((3/(17 + 12 Sqrt[2]))^(1/8) x^2)/2^(1/4) +
    Sqrt[-x^3 + x^5]/(2^(1/4) (3 (17 + 12 Sqrt[2]))^(1/8)))/(
    x (-x^3 + x^5)^(1/4))])/2^(3/4)}

    Cheers,

    Sam

    Fricas 1.3.9 does it in less than 2 minutes and gives this

    (3) -> ii:=integrate((1 - x^4)/((x^4 + x^2 + 1)*(x^5 - x^3)^(1/4)),x);
    (4) -> unparse(ii::InputForm)

    "((-2)*(-1)^(1/2)*(-1)^(1/8)*(3^(1/8))^7*log((((264*x^2+654*x+(-264))*((-1)^(
    1/8))^4*(3^(1/8))^4+((-654)*x^2+792*x+654))*((x^5+(-1)*x^3)^(1/4))^3+((264*x^
    3+654*x^2+(-264)*x)*(-1)^(1/2)*((-1)^(1/8))^3*(3^(1/8))^5+(654*x^3+(-792)*x^2
    +(-654)*x)*(-1)^(1/2)*((-1)^(1/8))^7*3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+(((-26
    4)*x^4+(-654)*x^3+264*x^2)*((-1)^(1/8))^2*(3^(1/8))^6+((-654)*x^4+792*x^3+654
    *x^2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+((109*x^6+(-264)*x^5+(
    -545)*x^4+264*x^3+109*x^2)*(-1)^(1/2)*(-1)^(1/8)*(3^(1/8))^7+((-132)*x^6+(-65
    4)*x^5+660*x^4+654*x^3+(-132)*x^2)*(-1)^(1/2)*((-1)^(1/8))^5*(3^(1/8))^3))/(x
    ^6+x^4+x^2))+(2*(-1)^(1/8)*(3^(1/8))^7*log((((264*x^2+654*x+(-264))*((-1)^(1/
    8))^4*(3^(1/8))^4+((-654)*x^2+792*x+654))*((x^5+(-1)*x^3)^(1/4))^3+((264*x^3+
    654*x^2+(-264)*x)*((-1)^(1/8))^3*(3^(1/8))^5+(654*x^3+(-792)*x^2+(-654)*x)*((
    -1)^(1/8))^7*3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+((264*x^4+654*x^3+(-264)*x^2)*
    ((-1)^(1/8))^2*(3^(1/8))^6+(654*x^4+(-792)*x^3+(-654)*x^2)*((-1)^(1/8))^6*(3^
    (1/8))^2)*(x^5+(-1)*x^3)^(1/4)+(((-109)*x^6+264*x^5+545*x^4+(-264)*x^3+(-109)
    *x^2)*(-1)^(1/8)*(3^(1/8))^7+(132*x^6+654*x^5+(-660)*x^4+(-654)*x^3+132*x^2)*
    ((-1)^(1/8))^5*(3^(1/8))^3))/(x^6+x^4+x^2))+((-2)*(-1)^(1/8)*(3^(1/8))^7*log(
    (((264*x^2+654*x+(-264))*((-1)^(1/8))^4*(3^(1/8))^4+((-654)*x^2+792*x+654))*(
    (x^5+(-1)*x^3)^(1/4))^3+(((-264)*x^3+(-654)*x^2+264*x)*((-1)^(1/8))^3*(3^(1/8
    ))^5+((-654)*x^3+792*x^2+654*x)*((-1)^(1/8))^7*3^(1/8))*((x^5+(-1)*x^3)^(1/4)
    )^2+((264*x^4+654*x^3+(-264)*x^2)*((-1)^(1/8))^2*(3^(1/8))^6+(654*x^4+(-792)*
    x^3+(-654)*x^2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+((109*x^6+(-
    264)*x^5+(-545)*x^4+264*x^3+109*x^2)*(-1)^(1/8)*(3^(1/8))^7+((-132)*x^6+(-654
    )*x^5+660*x^4+654*x^3+(-132)*x^2)*((-1)^(1/8))^5*(3^(1/8))^3))/(x^6+x^4+x^2))
    +(2*(-1)^(1/2)*(-1)^(1/8)*(3^(1/8))^7*log((((264*x^2+654*x+(-264))*((-1)^(1/8
    ))^4*(3^(1/8))^4+((-654)*x^2+792*x+654))*((x^5+(-1)*x^3)^(1/4))^3+(((-264)*x^
    3+(-654)*x^2+264*x)*(-1)^(1/2)*((-1)^(1/8))^3*(3^(1/8))^5+((-654)*x^3+792*x^2
    +654*x)*(-1)^(1/2)*((-1)^(1/8))^7*3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+(((-264)*
    x^4+(-654)*x^3+264*x^2)*((-1)^(1/8))^2*(3^(1/8))^6+((-654)*x^4+792*x^3+654*x^
    2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+(((-109)*x^6+264*x^5+545*
    x^4+(-264)*x^3+(-109)*x^2)*(-1)^(1/2)*(-1)^(1/8)*(3^(1/8))^7+(132*x^6+654*x^5
    +(-660)*x^4+(-654)*x^3+132*x^2)*(-1)^(1/2)*((-1)^(1/8))^5*(3^(1/8))^3))/(x^6+
    x^4+x^2))+(((-1)^(1/2)+(-1))*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7*log(((((-528)*x^2
    +(-1308)*x+528)*((-1)^(1/8))^4*(3^(1/8))^4+((-1308)*x^2+1584*x+1308))*((x^5+(
    -1)*x^3)^(1/4))^3+(((264*x^3+654*x^2+(-264)*x)*(-1)^(1/2)+(264*x^3+654*x^2+(-
    264)*x))*((-1)^(1/8))^3*2^(1/2)*(3^(1/8))^5+(((-654)*x^3+792*x^2+654*x)*(-1)^
    (1/2)+((-654)*x^3+792*x^2+654*x))*((-1)^(1/8))^7*2^(1/2)*3^(1/8))*((x^5+(-1)*
    x^3)^(1/4))^2+(((-528)*x^4+(-1308)*x^3+528*x^2)*(-1)^(1/2)*((-1)^(1/8))^2*(3^
    (1/8))^6+(1308*x^4+(-1584)*x^3+(-1308)*x^2)*(-1)^(1/2)*((-1)^(1/8))^6*(3^(1/8
    ))^2)*(x^5+(-1)*x^3)^(1/4)+((((-109)*x^6+264*x^5+545*x^4+(-264)*x^3+(-109)*x^
    2)*(-1)^(1/2)+(109*x^6+(-264)*x^5+(-545)*x^4+264*x^3+109*x^2))*(-1)^(1/8)*2^(
    1/2)*(3^(1/8))^7+(((-132)*x^6+(-654)*x^5+660*x^4+654*x^3+(-132)*x^2)*(-1)^(1/
    2)+(132*x^6+654*x^5+(-660)*x^4+(-654)*x^3+132*x^2))*((-1)^(1/8))^5*2^(1/2)*(3
    ^(1/8))^3))/(x^6+x^4+x^2))+(((-1)^(1/2)+1)*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7*log
    (((((-528)*x^2+(-1308)*x+528)*((-1)^(1/8))^4*(3^(1/8))^4+((-1308)*x^2+1584*x+
    1308))*((x^5+(-1)*x^3)^(1/4))^3+(((264*x^3+654*x^2+(-264)*x)*(-1)^(1/2)+((-26
    4)*x^3+(-654)*x^2+264*x))*((-1)^(1/8))^3*2^(1/2)*(3^(1/8))^5+(((-654)*x^3+792
    *x^2+654*x)*(-1)^(1/2)+(654*x^3+(-792)*x^2+(-654)*x))*((-1)^(1/8))^7*2^(1/2)*
    3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+((528*x^4+1308*x^3+(-528)*x^2)*(-1)^(1/2)*(
    (-1)^(1/8))^2*(3^(1/8))^6+((-1308)*x^4+1584*x^3+1308*x^2)*(-1)^(1/2)*((-1)^(1
    /8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+((((-109)*x^6+264*x^5+545*x^4+(-264)
    *x^3+(-109)*x^2)*(-1)^(1/2)+((-109)*x^6+264*x^5+545*x^4+(-264)*x^3+(-109)*x^2
    ))*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7+(((-132)*x^6+(-654)*x^5+660*x^4+654*x^3+(-1
    32)*x^2)*(-1)^(1/2)+((-132)*x^6+(-654)*x^5+660*x^4+654*x^3+(-132)*x^2))*((-1)
    ^(1/8))^5*2^(1/2)*(3^(1/8))^3))/(x^6+x^4+x^2))+(((-1)*(-1)^(1/2)+(-1))*(-1)^(
    1/8)*2^(1/2)*(3^(1/8))^7*log(((((-528)*x^2+(-1308)*x+528)*((-1)^(1/8))^4*(3^(
    1/8))^4+((-1308)*x^2+1584*x+1308))*((x^5+(-1)*x^3)^(1/4))^3+((((-264)*x^3+(-6
    54)*x^2+264*x)*(-1)^(1/2)+(264*x^3+654*x^2+(-264)*x))*((-1)^(1/8))^3*2^(1/2)*
    (3^(1/8))^5+((654*x^3+(-792)*x^2+(-654)*x)*(-1)^(1/2)+((-654)*x^3+792*x^2+654
    *x))*((-1)^(1/8))^7*2^(1/2)*3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+((528*x^4+1308*
    x^3+(-528)*x^2)*(-1)^(1/2)*((-1)^(1/8))^2*(3^(1/8))^6+((-1308)*x^4+1584*x^3+1
    308*x^2)*(-1)^(1/2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+(((109*x
    ^6+(-264)*x^5+(-545)*x^4+264*x^3+109*x^2)*(-1)^(1/2)+(109*x^6+(-264)*x^5+(-54
    5)*x^4+264*x^3+109*x^2))*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7+((132*x^6+654*x^5+(-6
    60)*x^4+(-654)*x^3+132*x^2)*(-1)^(1/2)+(132*x^6+654*x^5+(-660)*x^4+(-654)*x^3
    +132*x^2))*((-1)^(1/8))^5*2^(1/2)*(3^(1/8))^3))/(x^6+x^4+x^2))+((-1)*(-1)^(1/
    2)+1)*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7*log(((((-528)*x^2+(-1308)*x+528)*((-1)^(
    1/8))^4*(3^(1/8))^4+((-1308)*x^2+1584*x+1308))*((x^5+(-1)*x^3)^(1/4))^3+((((-
    264)*x^3+(-654)*x^2+264*x)*(-1)^(1/2)+((-264)*x^3+(-654)*x^2+264*x))*((-1)^(1
    /8))^3*2^(1/2)*(3^(1/8))^5+((654*x^3+(-792)*x^2+(-654)*x)*(-1)^(1/2)+(654*x^3
    +(-792)*x^2+(-654)*x))*((-1)^(1/8))^7*2^(1/2)*3^(1/8))*((x^5+(-1)*x^3)^(1/4))
    ^2+(((-528)*x^4+(-1308)*x^3+528*x^2)*(-1)^(1/2)*((-1)^(1/8))^2*(3^(1/8))^6+(1
    308*x^4+(-1584)*x^3+(-1308)*x^2)*(-1)^(1/2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+
    (-1)*x^3)^(1/4)+(((109*x^6+(-264)*x^5+(-545)*x^4+264*x^3+109*x^2)*(-1)^(1/2)+
    ((-109)*x^6+264*x^5+545*x^4+(-264)*x^3+(-109)*x^2))*(-1)^(1/8)*2^(1/2)*(3^(1/
    8))^7+((132*x^6+654*x^5+(-660)*x^4+(-654)*x^3+132*x^2)*(-1)^(1/2)+((-132)*x^6
    +(-654)*x^5+660*x^4+654*x^3+(-132)*x^2))*((-1)^(1/8))^5*2^(1/2)*(3^(1/8))^3))
    /(x^6+x^4+x^2)))))))))/24"


    Maple does in less than 3 seconds also but gives result with lots of RootOf

    anti:=int((1 - x^4)/((x^4 + x^2 + 1)*(x^5 - x^3)^(1/4)),x,method='trager'): lprint(anti) 1/6*RootOf(_Z^8+2187)*ln(-108*(16*RootOf(_Z^8+2187)^9*x^4-24*RootOf(_Z^8+2187)^ 9*x^3-16*RootOf(_Z^8+2187)^9*x^2+54*RootOf(_Z^8+2187)^7*(x^5-x^3)^(1/2)*x+162* RootOf(_Z^8+2187)^6*(x^5-x^3)^(1/4)*x^2+1350*RootOf(_Z^8+2187)^5*x^4+243*RootOf (_Z^8+2187)^5*x^3-1350*RootOf(_Z^8+2187)^5*x^2+8100*RootOf(_Z^8+2187)^4*(x^5-x^ 3)^(3/4)+24300*RootOf(_Z^8+2187)^3*(x^5-x^3)^(1/2)*x+72900*RootOf(_Z^8+2187)^2* (x^5-x^3)^(1/4)*x^2+28431*RootOf(_Z^8+2187)*x^4+56862*RootOf(_Z^8+2187)*x^3-\ 28431*RootOf(_Z^8+2187)*x^2-39366*(x^5-x^3)^(3/4))/x^2/(RootOf(_Z^8+2187)^4*x-2 *RootOf(_Z^8+2187)^4-135*x-108)/(RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8+2187)^4-81 *x))-1/6*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*ln(108*(16*RootOf(_Z^8+2187)^8*RootOf (_Z^2+RootOf(_Z^8+2187)^2)*x^4-24*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^8+ 2187)^8*x^3-16*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^8+2187)^8*x^2-54* RootOf(_Z^2+RootOf(_Z^8+2187)^2)*(x^5-x^3)^(1/2)*RootOf(_Z^8+2187)^6*x+1350* RootOf(_Z^8+2187)^4*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*x^4+162*RootOf(_Z^8+2187)^ 6*(x^5-x^3)^(1/4)*x^2+243*RootOf(_Z^8+2187)^4*RootOf(_Z^2+RootOf(_Z^8+2187)^2)* x^3-1350*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^8+2187)^4*x^2-8100*RootOf( _Z^8+2187)^4*(x^5-x^3)^(3/4)-24300*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*(x^5-x^3)^( 1/2)*RootOf(_Z^8+2187)^2*x+28431*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*x^4+72900* RootOf(_Z^8+2187)^2*(x^5-x^3)^(1/4)*x^2+56862*RootOf(_Z^2+RootOf(_Z^8+2187)^2)* x^3-28431*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*x^2+39366*(x^5-x^3)^(3/4))/x^2/( RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8+2187)^4-135*x-108)/(RootOf(_Z^8+2187)^4*x-2 *RootOf(_Z^8+2187)^4-81*x))-1/6*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*ln(-108*(16*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^8*x^4-24*RootOf(_Z^2+RootOf(_Z^8+2187)* RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^8*x^3-16*RootOf(_Z^2+RootOf (_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^8*x^2+54*RootOf (_Z^2+RootOf(_Z^8+2187)^2)*(x^5-x^3)^(1/2)*RootOf(_Z^8+2187)^5*RootOf(_Z^2+ RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x-162*RootOf(_Z^2+RootOf(_Z ^8+2187)^2)*RootOf(_Z^8+2187)^5*(x^5-x^3)^(1/4)*x^2-1350*RootOf(_Z^2+RootOf(_Z^ 8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^4*x^4-243*RootOf(_Z ^8+2187)^4*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^3+ 1350*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^ 8+2187)^4*x^2+8100*RootOf(_Z^8+2187)^4*(x^5-x^3)^(3/4)-24300*RootOf(_Z^2+RootOf (_Z^8+2187)^2)*(x^5-x^3)^(1/2)*RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)* RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x+72900*RootOf(_Z^2+RootOf(_Z^8+2187)^2)* RootOf(_Z^8+2187)*(x^5-x^3)^(1/4)*x^2+28431*RootOf(_Z^2+RootOf(_Z^8+2187)* RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^4+56862*RootOf(_Z^2+RootOf(_Z^8+2187)* RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^3-28431*RootOf(_Z^2+RootOf(_Z^8+2187)* RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^2+39366*(x^5-x^3)^(3/4))/x^2/(RootOf(_Z^8+ 2187)^4*x-2*RootOf(_Z^8+2187)^4+135*x+108)/(RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8 +2187)^4+81*x))+1/13122*RootOf(_Z^8+2187)^7*RootOf(_Z^2+RootOf(_Z^8+2187)^2)* RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*ln(-108*(26* RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^11*x^4-39*RootOf(_Z^8+2187)^11*RootOf( _Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8 +2187)^2))*x^3-26*RootOf(_Z^8+2187)^11*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf( _Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^2+243*RootOf(_Z^2+ RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187 )^2))*RootOf(_Z^8+2187)^7*x^4-4050*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2 +RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^7*x^3-\ 243*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^7*x^2+4374*(x^5-x^3)^(1/2)*RootOf(_Z^8+ 2187)^6*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x-52488 *RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^3*x^4+13122*RootOf(_Z^2+RootOf(_Z^8+ 2187)^2)*RootOf(_Z^8+2187)^5*(x^5-x^3)^(1/4)*x^2-104976*RootOf(_Z^8+2187)^3* RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*x^3+52488*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+ RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^3*x^2+ 656100*RootOf(_Z^8+2187)^4*(x^5-x^3)^(3/4)-1968300*(x^5-x^3)^(1/2)*RootOf(_Z^8+ 2187)^2*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x-\ 5904900*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^8+2187)*(x^5-x^3)^(1/4)*x^2+ 3188646*(x^5-x^3)^(3/4))/x^2/(RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8+2187)^4+135*x +108)/(RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8+2187)^4+81*x))

    --Nasser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam Blake@21:1/5 to Nasser M. Abbasi on Tue Nov 14 12:45:04 2023
    On Tuesday, November 14, 2023 at 4:48:02 PM UTC+11, Nasser M. Abbasi wrote:
    On Monday, November 13, 2023 at 5:49:22 PM UTC-6, Sam Blake wrote:
    Hi All,

    Is there any way to a priori estimate of the time it will take the Risch-Trager-Bronstein algorithm to compute the integral of

    (1 - x^4)/((x^4 + x^2 + 1)*(x^5 - x^3)^(1/4))?

    I left it for 30 minutes and it was still crunching away...
    On what system do you mean? in V 13.3 Mathematica solves it in 2.3 seconds

    In[1]:= Integrate[(1-x^4)/((x^4+x^2+1)*(x^5-x^3)^(1/4)),x]//Timing
    Out[1]= {2.375,(1/(2^(3/4) (51+36 Sqrt[2])^(1/8) (x^3 (-1+x^2))^(1/4)))x^(3/4) (-1+x^2)^(1/4) (ArcTan[(2^(1/4) 3^(7/8) x^(1/4) (-1+x^2)^(1/4))/((17+12 Sqrt[2])^(1/8) (-3 Sqrt[x]+3^(3/4) Sqrt[-1+x^2]))]+(17+12 Sqrt[2])^(1/4) ArcTan[(2^(1/4) 3^(7/8) (17+
    12 Sqrt[2])^(1/8) x^(1/4) (-1+x^2)^(1/4))/(-3 Sqrt[x]+3^(3/4) Sqrt[-1+x^2])]+ArcTanh[(2^(1/4) 3^(7/8) x^(1/4) (-1+x^2)^(1/4))/((17+12 Sqrt[2])^(1/8) (3 Sqrt[x]+3^(3/4) Sqrt[-1+x^2]))]+(17+12 Sqrt[2])^(1/4) ArcTanh[(2^(1/4) 3^(7/8) (17+12 Sqrt[2])^(1/8) x^
    (1/4) (-1+x^2)^(1/4))/(3 Sqrt[x]+3^(3/4) Sqrt[-1+x^2])])}

    Rubi 4.17.3 solves it in 0.35 seconds, but in terms of special functions

    In[3]:= Int[(1-x^4)/((x^4+x^2+1)*(x^5-x^3)^(1/4)),x]//Timing
    Out[3]= {0.359375,(4 (3 I+Sqrt[3]) x (1-x^2)^(1/4) AppellF1[1/8,-(3/4),1,9/8,x^2,-((2 x^2)/(1-I Sqrt[3]))])/(3 (I+Sqrt[3]) (-x^3+x^5)^(1/4))+(4 (3 I-Sqrt[3]) x (1-x^2)^(1/4) AppellF1[1/8,-(3/4),1,9/8,x^2,-((2 x^2)/(1+I Sqrt[3]))])/(3 (I-Sqrt[3]) (-x^3+
    x^5)^(1/4))}

    It takes my package 24 seconds on my old laptop

    In[22299]:= IntegrateAlgebraic[(1 - x^4)/((x^4 + x^2 + 1) (x^5 - x^3)^(1/4)), x] // Timing

    Out[22299]= {23.9914, -(((1/3 (17 + 12 Sqrt[2]))^(1/8)
    ArcTan[(
    3 Sqrt[1 + Sqrt[2]] x)/(-3 Sqrt[1 + Sqrt[2]] x +
    3 Sqrt[2 + 2 Sqrt[2]] x - 2^(3/4) 3^(7/8) (-x^3 + x^5)^(1/4))])/
    2^(3/4)) + ((1/3 (17 + 12 Sqrt[2]))^(1/8)
    ArcTan[(
    3 Sqrt[1 + Sqrt[2]] x)/(-3 Sqrt[1 + Sqrt[2]] x +
    3 Sqrt[2 + 2 Sqrt[2]] x + 2^(3/4) 3^(7/8) (-x^3 + x^5)^(1/4))])/
    2^(3/4) -
    ArcTan[(-2^(1/4) (3/(17 + 12 Sqrt[2]))^(1/8) x^2 + (-3 x^2 +
    3^(3/4) (17 + 12 Sqrt[2])^(1/4) Sqrt[-x^3 + x^5])/(
    2^(1/4) 3^(7/8) (17 + 12 Sqrt[2])^(1/8)))/(
    x (-x^3 + x^5)^(1/4))]/(2^(3/4) (3 (17 + 12 Sqrt[2]))^(1/8)) +
    ArcTanh[(
    3 (17/8748 + Sqrt[2]/729)^(1/8) x^2 +
    3^(3/4) (17/8748 + Sqrt[2]/729)^(1/8) Sqrt[-x^3 + x^5])/(
    x (-x^3 + x^5)^(1/4))]/(
    2^(3/4) (3 (17 + 12 Sqrt[2]))^(1/8)) + ((1/3 (17 + 12 Sqrt[2]))^(
    1/8) ArcTanh[(((3/(17 + 12 Sqrt[2]))^(1/8) x^2)/2^(1/4) +
    Sqrt[-x^3 + x^5]/(2^(1/4) (3 (17 + 12 Sqrt[2]))^(1/8)))/(
    x (-x^3 + x^5)^(1/4))])/2^(3/4)}

    Cheers,

    Sam
    Fricas 1.3.9 does it in less than 2 minutes and gives this

    (3) -> ii:=integrate((1 - x^4)/((x^4 + x^2 + 1)*(x^5 - x^3)^(1/4)),x);
    (4) -> unparse(ii::InputForm)

    "((-2)*(-1)^(1/2)*(-1)^(1/8)*(3^(1/8))^7*log((((264*x^2+654*x+(-264))*((-1)^(
    1/8))^4*(3^(1/8))^4+((-654)*x^2+792*x+654))*((x^5+(-1)*x^3)^(1/4))^3+((264*x^
    3+654*x^2+(-264)*x)*(-1)^(1/2)*((-1)^(1/8))^3*(3^(1/8))^5+(654*x^3+(-792)*x^2
    +(-654)*x)*(-1)^(1/2)*((-1)^(1/8))^7*3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+(((-26
    4)*x^4+(-654)*x^3+264*x^2)*((-1)^(1/8))^2*(3^(1/8))^6+((-654)*x^4+792*x^3+654
    *x^2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+((109*x^6+(-264)*x^5+(
    -545)*x^4+264*x^3+109*x^2)*(-1)^(1/2)*(-1)^(1/8)*(3^(1/8))^7+((-132)*x^6+(-65
    4)*x^5+660*x^4+654*x^3+(-132)*x^2)*(-1)^(1/2)*((-1)^(1/8))^5*(3^(1/8))^3))/(x
    ^6+x^4+x^2))+(2*(-1)^(1/8)*(3^(1/8))^7*log((((264*x^2+654*x+(-264))*((-1)^(1/
    8))^4*(3^(1/8))^4+((-654)*x^2+792*x+654))*((x^5+(-1)*x^3)^(1/4))^3+((264*x^3+
    654*x^2+(-264)*x)*((-1)^(1/8))^3*(3^(1/8))^5+(654*x^3+(-792)*x^2+(-654)*x)*((
    -1)^(1/8))^7*3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+((264*x^4+654*x^3+(-264)*x^2)*
    ((-1)^(1/8))^2*(3^(1/8))^6+(654*x^4+(-792)*x^3+(-654)*x^2)*((-1)^(1/8))^6*(3^
    (1/8))^2)*(x^5+(-1)*x^3)^(1/4)+(((-109)*x^6+264*x^5+545*x^4+(-264)*x^3+(-109)
    *x^2)*(-1)^(1/8)*(3^(1/8))^7+(132*x^6+654*x^5+(-660)*x^4+(-654)*x^3+132*x^2)*
    ((-1)^(1/8))^5*(3^(1/8))^3))/(x^6+x^4+x^2))+((-2)*(-1)^(1/8)*(3^(1/8))^7*log(
    (((264*x^2+654*x+(-264))*((-1)^(1/8))^4*(3^(1/8))^4+((-654)*x^2+792*x+654))*(
    (x^5+(-1)*x^3)^(1/4))^3+(((-264)*x^3+(-654)*x^2+264*x)*((-1)^(1/8))^3*(3^(1/8
    ))^5+((-654)*x^3+792*x^2+654*x)*((-1)^(1/8))^7*3^(1/8))*((x^5+(-1)*x^3)^(1/4)
    )^2+((264*x^4+654*x^3+(-264)*x^2)*((-1)^(1/8))^2*(3^(1/8))^6+(654*x^4+(-792)*
    x^3+(-654)*x^2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+((109*x^6+(-
    264)*x^5+(-545)*x^4+264*x^3+109*x^2)*(-1)^(1/8)*(3^(1/8))^7+((-132)*x^6+(-654
    )*x^5+660*x^4+654*x^3+(-132)*x^2)*((-1)^(1/8))^5*(3^(1/8))^3))/(x^6+x^4+x^2))
    +(2*(-1)^(1/2)*(-1)^(1/8)*(3^(1/8))^7*log((((264*x^2+654*x+(-264))*((-1)^(1/8
    ))^4*(3^(1/8))^4+((-654)*x^2+792*x+654))*((x^5+(-1)*x^3)^(1/4))^3+(((-264)*x^
    3+(-654)*x^2+264*x)*(-1)^(1/2)*((-1)^(1/8))^3*(3^(1/8))^5+((-654)*x^3+792*x^2
    +654*x)*(-1)^(1/2)*((-1)^(1/8))^7*3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+(((-264)*
    x^4+(-654)*x^3+264*x^2)*((-1)^(1/8))^2*(3^(1/8))^6+((-654)*x^4+792*x^3+654*x^
    2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+(((-109)*x^6+264*x^5+545*
    x^4+(-264)*x^3+(-109)*x^2)*(-1)^(1/2)*(-1)^(1/8)*(3^(1/8))^7+(132*x^6+654*x^5
    +(-660)*x^4+(-654)*x^3+132*x^2)*(-1)^(1/2)*((-1)^(1/8))^5*(3^(1/8))^3))/(x^6+
    x^4+x^2))+(((-1)^(1/2)+(-1))*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7*log(((((-528)*x^2
    +(-1308)*x+528)*((-1)^(1/8))^4*(3^(1/8))^4+((-1308)*x^2+1584*x+1308))*((x^5+(
    -1)*x^3)^(1/4))^3+(((264*x^3+654*x^2+(-264)*x)*(-1)^(1/2)+(264*x^3+654*x^2+(-
    264)*x))*((-1)^(1/8))^3*2^(1/2)*(3^(1/8))^5+(((-654)*x^3+792*x^2+654*x)*(-1)^
    (1/2)+((-654)*x^3+792*x^2+654*x))*((-1)^(1/8))^7*2^(1/2)*3^(1/8))*((x^5+(-1)*
    x^3)^(1/4))^2+(((-528)*x^4+(-1308)*x^3+528*x^2)*(-1)^(1/2)*((-1)^(1/8))^2*(3^
    (1/8))^6+(1308*x^4+(-1584)*x^3+(-1308)*x^2)*(-1)^(1/2)*((-1)^(1/8))^6*(3^(1/8
    ))^2)*(x^5+(-1)*x^3)^(1/4)+((((-109)*x^6+264*x^5+545*x^4+(-264)*x^3+(-109)*x^
    2)*(-1)^(1/2)+(109*x^6+(-264)*x^5+(-545)*x^4+264*x^3+109*x^2))*(-1)^(1/8)*2^(
    1/2)*(3^(1/8))^7+(((-132)*x^6+(-654)*x^5+660*x^4+654*x^3+(-132)*x^2)*(-1)^(1/
    2)+(132*x^6+654*x^5+(-660)*x^4+(-654)*x^3+132*x^2))*((-1)^(1/8))^5*2^(1/2)*(3
    ^(1/8))^3))/(x^6+x^4+x^2))+(((-1)^(1/2)+1)*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7*log
    (((((-528)*x^2+(-1308)*x+528)*((-1)^(1/8))^4*(3^(1/8))^4+((-1308)*x^2+1584*x+
    1308))*((x^5+(-1)*x^3)^(1/4))^3+(((264*x^3+654*x^2+(-264)*x)*(-1)^(1/2)+((-26
    4)*x^3+(-654)*x^2+264*x))*((-1)^(1/8))^3*2^(1/2)*(3^(1/8))^5+(((-654)*x^3+792
    *x^2+654*x)*(-1)^(1/2)+(654*x^3+(-792)*x^2+(-654)*x))*((-1)^(1/8))^7*2^(1/2)*
    3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+((528*x^4+1308*x^3+(-528)*x^2)*(-1)^(1/2)*(
    (-1)^(1/8))^2*(3^(1/8))^6+((-1308)*x^4+1584*x^3+1308*x^2)*(-1)^(1/2)*((-1)^(1
    /8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+((((-109)*x^6+264*x^5+545*x^4+(-264)
    *x^3+(-109)*x^2)*(-1)^(1/2)+((-109)*x^6+264*x^5+545*x^4+(-264)*x^3+(-109)*x^2
    ))*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7+(((-132)*x^6+(-654)*x^5+660*x^4+654*x^3+(-1
    32)*x^2)*(-1)^(1/2)+((-132)*x^6+(-654)*x^5+660*x^4+654*x^3+(-132)*x^2))*((-1)
    ^(1/8))^5*2^(1/2)*(3^(1/8))^3))/(x^6+x^4+x^2))+(((-1)*(-1)^(1/2)+(-1))*(-1)^(
    1/8)*2^(1/2)*(3^(1/8))^7*log(((((-528)*x^2+(-1308)*x+528)*((-1)^(1/8))^4*(3^(
    1/8))^4+((-1308)*x^2+1584*x+1308))*((x^5+(-1)*x^3)^(1/4))^3+((((-264)*x^3+(-6
    54)*x^2+264*x)*(-1)^(1/2)+(264*x^3+654*x^2+(-264)*x))*((-1)^(1/8))^3*2^(1/2)*
    (3^(1/8))^5+((654*x^3+(-792)*x^2+(-654)*x)*(-1)^(1/2)+((-654)*x^3+792*x^2+654
    *x))*((-1)^(1/8))^7*2^(1/2)*3^(1/8))*((x^5+(-1)*x^3)^(1/4))^2+((528*x^4+1308*
    x^3+(-528)*x^2)*(-1)^(1/2)*((-1)^(1/8))^2*(3^(1/8))^6+((-1308)*x^4+1584*x^3+1
    308*x^2)*(-1)^(1/2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+(-1)*x^3)^(1/4)+(((109*x
    ^6+(-264)*x^5+(-545)*x^4+264*x^3+109*x^2)*(-1)^(1/2)+(109*x^6+(-264)*x^5+(-54
    5)*x^4+264*x^3+109*x^2))*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7+((132*x^6+654*x^5+(-6
    60)*x^4+(-654)*x^3+132*x^2)*(-1)^(1/2)+(132*x^6+654*x^5+(-660)*x^4+(-654)*x^3
    +132*x^2))*((-1)^(1/8))^5*2^(1/2)*(3^(1/8))^3))/(x^6+x^4+x^2))+((-1)*(-1)^(1/
    2)+1)*(-1)^(1/8)*2^(1/2)*(3^(1/8))^7*log(((((-528)*x^2+(-1308)*x+528)*((-1)^(
    1/8))^4*(3^(1/8))^4+((-1308)*x^2+1584*x+1308))*((x^5+(-1)*x^3)^(1/4))^3+((((-
    264)*x^3+(-654)*x^2+264*x)*(-1)^(1/2)+((-264)*x^3+(-654)*x^2+264*x))*((-1)^(1
    /8))^3*2^(1/2)*(3^(1/8))^5+((654*x^3+(-792)*x^2+(-654)*x)*(-1)^(1/2)+(654*x^3
    +(-792)*x^2+(-654)*x))*((-1)^(1/8))^7*2^(1/2)*3^(1/8))*((x^5+(-1)*x^3)^(1/4))
    ^2+(((-528)*x^4+(-1308)*x^3+528*x^2)*(-1)^(1/2)*((-1)^(1/8))^2*(3^(1/8))^6+(1
    308*x^4+(-1584)*x^3+(-1308)*x^2)*(-1)^(1/2)*((-1)^(1/8))^6*(3^(1/8))^2)*(x^5+
    (-1)*x^3)^(1/4)+(((109*x^6+(-264)*x^5+(-545)*x^4+264*x^3+109*x^2)*(-1)^(1/2)+
    ((-109)*x^6+264*x^5+545*x^4+(-264)*x^3+(-109)*x^2))*(-1)^(1/8)*2^(1/2)*(3^(1/
    8))^7+((132*x^6+654*x^5+(-660)*x^4+(-654)*x^3+132*x^2)*(-1)^(1/2)+((-132)*x^6
    +(-654)*x^5+660*x^4+654*x^3+(-132)*x^2))*((-1)^(1/8))^5*2^(1/2)*(3^(1/8))^3))
    /(x^6+x^4+x^2)))))))))/24"


    Maple does in less than 3 seconds also but gives result with lots of RootOf

    anti:=int((1 - x^4)/((x^4 + x^2 + 1)*(x^5 - x^3)^(1/4)),x,method='trager'): lprint(anti) 1/6*RootOf(_Z^8+2187)*ln(-108*(16*RootOf(_Z^8+2187)^9*x^4-24*RootOf(_Z^8+2187)^
    9*x^3-16*RootOf(_Z^8+2187)^9*x^2+54*RootOf(_Z^8+2187)^7*(x^5-x^3)^(1/2)*x+162*
    RootOf(_Z^8+2187)^6*(x^5-x^3)^(1/4)*x^2+1350*RootOf(_Z^8+2187)^5*x^4+243*RootOf
    (_Z^8+2187)^5*x^3-1350*RootOf(_Z^8+2187)^5*x^2+8100*RootOf(_Z^8+2187)^4*(x^5-x^
    3)^(3/4)+24300*RootOf(_Z^8+2187)^3*(x^5-x^3)^(1/2)*x+72900*RootOf(_Z^8+2187)^2*
    (x^5-x^3)^(1/4)*x^2+28431*RootOf(_Z^8+2187)*x^4+56862*RootOf(_Z^8+2187)*x^3-\
    28431*RootOf(_Z^8+2187)*x^2-39366*(x^5-x^3)^(3/4))/x^2/(RootOf(_Z^8+2187)^4*x-2
    *RootOf(_Z^8+2187)^4-135*x-108)/(RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8+2187)^4-81
    *x))-1/6*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*ln(108*(16*RootOf(_Z^8+2187)^8*RootOf
    (_Z^2+RootOf(_Z^8+2187)^2)*x^4-24*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^8+
    2187)^8*x^3-16*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^8+2187)^8*x^2-54* RootOf(_Z^2+RootOf(_Z^8+2187)^2)*(x^5-x^3)^(1/2)*RootOf(_Z^8+2187)^6*x+1350* RootOf(_Z^8+2187)^4*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*x^4+162*RootOf(_Z^8+2187)^
    6*(x^5-x^3)^(1/4)*x^2+243*RootOf(_Z^8+2187)^4*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*
    x^3-1350*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^8+2187)^4*x^2-8100*RootOf(
    _Z^8+2187)^4*(x^5-x^3)^(3/4)-24300*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*(x^5-x^3)^(
    1/2)*RootOf(_Z^8+2187)^2*x+28431*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*x^4+72900* RootOf(_Z^8+2187)^2*(x^5-x^3)^(1/4)*x^2+56862*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*
    x^3-28431*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*x^2+39366*(x^5-x^3)^(3/4))/x^2/( RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8+2187)^4-135*x-108)/(RootOf(_Z^8+2187)^4*x-2
    *RootOf(_Z^8+2187)^4-81*x))-1/6*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*ln(-108*(16*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^8*x^4-24*RootOf(_Z^2+RootOf(_Z^8+2187)*
    RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^8*x^3-16*RootOf(_Z^2+RootOf
    (_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^8*x^2+54*RootOf
    (_Z^2+RootOf(_Z^8+2187)^2)*(x^5-x^3)^(1/2)*RootOf(_Z^8+2187)^5*RootOf(_Z^2+ RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x-162*RootOf(_Z^2+RootOf(_Z
    ^8+2187)^2)*RootOf(_Z^8+2187)^5*(x^5-x^3)^(1/4)*x^2-1350*RootOf(_Z^2+RootOf(_Z^
    8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^4*x^4-243*RootOf(_Z
    ^8+2187)^4*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^3+
    1350*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^
    8+2187)^4*x^2+8100*RootOf(_Z^8+2187)^4*(x^5-x^3)^(3/4)-24300*RootOf(_Z^2+RootOf
    (_Z^8+2187)^2)*(x^5-x^3)^(1/2)*RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)*
    RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x+72900*RootOf(_Z^2+RootOf(_Z^8+2187)^2)* RootOf(_Z^8+2187)*(x^5-x^3)^(1/4)*x^2+28431*RootOf(_Z^2+RootOf(_Z^8+2187)* RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^4+56862*RootOf(_Z^2+RootOf(_Z^8+2187)* RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^3-28431*RootOf(_Z^2+RootOf(_Z^8+2187)* RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^2+39366*(x^5-x^3)^(3/4))/x^2/(RootOf(_Z^8+
    2187)^4*x-2*RootOf(_Z^8+2187)^4+135*x+108)/(RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8
    +2187)^4+81*x))+1/13122*RootOf(_Z^8+2187)^7*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*
    RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*ln(-108*(26* RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^11*x^4-39*RootOf(_Z^8+2187)^11*RootOf(
    _Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8
    +2187)^2))*x^3-26*RootOf(_Z^8+2187)^11*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(
    _Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x^2+243*RootOf(_Z^2+
    RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187
    )^2))*RootOf(_Z^8+2187)^7*x^4-4050*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2
    +RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^7*x^3-\
    243*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+
    RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^7*x^2+4374*(x^5-x^3)^(1/2)*RootOf(_Z^8+
    2187)^6*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x-52488
    *RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^3*x^4+13122*RootOf(_Z^2+RootOf(_Z^8+ 2187)^2)*RootOf(_Z^8+2187)^5*(x^5-x^3)^(1/4)*x^2-104976*RootOf(_Z^8+2187)^3* RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+ RootOf(_Z^8+2187)^2))*x^3+52488*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^2+
    RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*RootOf(_Z^8+2187)^3*x^2+ 656100*RootOf(_Z^8+2187)^4*(x^5-x^3)^(3/4)-1968300*(x^5-x^3)^(1/2)*RootOf(_Z^8+
    2187)^2*RootOf(_Z^2+RootOf(_Z^8+2187)*RootOf(_Z^2+RootOf(_Z^8+2187)^2))*x-\ 5904900*RootOf(_Z^2+RootOf(_Z^8+2187)^2)*RootOf(_Z^8+2187)*(x^5-x^3)^(1/4)*x^2+
    3188646*(x^5-x^3)^(3/4))/x^2/(RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8+2187)^4+135*x
    +108)/(RootOf(_Z^8+2187)^4*x-2*RootOf(_Z^8+2187)^4+81*x))

    --Nasser

    Thanks Nasser,

    I was using FriCAS version 1.3.6, which is still crunching away after 5 minutes. I will update FriCAS on my system.

    It appears Mathematica first factors the radicand into x^(3/4) (-1 + x^2)^(1/4), which then requires multiplying the result by a piecewise constant ((x^(3/4)) ((-1 + x^2)^(1/4)) )/(x^3 (-1 + x^2))^(1/4) in order to obtain a valid antiderivative for all x.


    Cheers,

    Sam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nasser M. Abbasi@21:1/5 to Sam Blake on Tue Nov 14 18:46:15 2023
    On 11/14/2023 2:45 PM, Sam Blake wrote:

    I was using FriCAS version 1.3.6, which is still crunching away after 5 minutes. I will update FriCAS on my system.


    Did you try with setSimplifyDenomsFlag(true)? I always have this on, so forgot to
    mention it. This seems to help on many cases.

    You can try it online at

    https://wiki.fricas.org/SandBox

    Going to bottom of page, and typing

    \begin{axiom}
    setSimplifyDenomsFlag(true)
    integrate(sin(x),x)
    \end{axiom}


    It appears Mathematica first factors the radicand into x^(3/4) (-1 + x^2)^(1/4), which then requires multiplying the result by a piecewise constant ((x^(3/4)) ((-1 + x^2)^(1/4)) )/(x^3 (-1 + x^2))^(1/4) in order to obtain a valid antiderivative for all
    x.

    Cheers,

    Sam



    --Nasser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nobody@nowhere.invalid@21:1/5 to Nasser M. Abbasi on Thu Nov 16 07:41:41 2023
    "Nasser M. Abbasi" schrieb:

    On 11/14/2023 2:45 PM, Sam Blake wrote:

    I was using FriCAS version 1.3.6, which is still crunching away
    after 5 minutes. I will update FriCAS on my system.


    Did you try with setSimplifyDenomsFlag(true)? I always have this on,
    so forgot to mention it. This seems to help on many cases.

    You can try it online at

    https://wiki.fricas.org/SandBox

    Going to bottom of page, and typing

    \begin{axiom}
    setSimplifyDenomsFlag(true)
    integrate(sin(x),x)
    \end{axiom}

    It appears Mathematica first factors the radicand into x^(3/4)
    (-1 + x^2)^(1/4), which then requires multiplying the result by a
    piecewise constant ((x^(3/4)) ((-1 + x^2)^(1/4)) )/(x^3 (-1 +
    x^2))^(1/4) in order to obtain a valid antiderivative for all x.


    A compact expression for the antiderivative is:

    INT((1 - x^4)/((x^4 + x^2 + 1)*(x^5 - x^3)^(1/4)), x)
    = 3^(7/8)*SQRT(2 - SQRT(2))/6
    *ATAN(3^(7/8)*SQRT(2*SQRT(2) + 4)*(3^(1/4)*x^2 - SQRT(x^5 - x^3))
    /(6*x*(x^5 - x^3)^(1/4)))
    + 3^(7/8)*SQRT(SQRT(2) + 2)/6
    *ATAN(3^(7/8)*SQRT(4 - 2*SQRT(2))*(3^(1/4)*x^2 - SQRT(x^5 - x^3))
    /(6*x*(x^5 - x^3)^(1/4)))
    + 3^(7/8)*SQRT(2 - SQRT(2))/6
    *ATANH(3^(7/8)*SQRT(2*SQRT(2) + 4)*(SQRT(x^5 - x^3) + 3^(1/4)*x^2)
    /(6*x*(x^5 - x^3)^(1/4)))
    + 3^(7/8)*SQRT(SQRT(2) + 2)/6
    *ATANH(3^(7/8)*SQRT(4 - 2*SQRT(2))*(SQRT(x^5 - x^3) + 3^(1/4)*x^2)
    /(6*x*(x^5 - x^3)^(1/4)))

    There is no (17/8748 + SQRT(2)/729)^(1/8) here, no piecewise constant,
    no (-1)^(1/2) or (-1)^(1/8), and no RootOf(_Z^8 + 2187).

    Martin.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)