• A challenging nested radical integral

    From Sam Blake@21:1/5 to All on Wed Feb 22 17:57:46 2023
    Greetings,

    I was hoping the Risch-Trager-Bronstein algorithm of FriCAS and/or AXIOM would compute the following integral in a reasonable amount of time

    integrate((x+(4+x^2)^(1/2))^(-1/9)*(-2+2^(1/3)*(x+(4+x^2)^(1/2))^(2/3))^(1/3),x)

    Was it wishful thinking? My computer has been running FriCAS 1.3.6 for over an hour. The answer to this integral does not require any logarithms, so it should be computable with the algebraic extensions of Hermite reduction, right?

    Sam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam Blake@21:1/5 to Sam Blake on Sun Mar 5 19:14:40 2023
    On Thursday, February 23, 2023 at 11:57:47 AM UTC+10, Sam Blake wrote:
    Greetings,

    I was hoping the Risch-Trager-Bronstein algorithm of FriCAS and/or AXIOM would compute the following integral in a reasonable amount of time

    integrate((x+(4+x^2)^(1/2))^(-1/9)*(-2+2^(1/3)*(x+(4+x^2)^(1/2))^(2/3))^(1/3),x)

    Was it wishful thinking? My computer has been running FriCAS 1.3.6 for over an hour. The answer to this integral does not require any logarithms, so it should be computable with the algebraic extensions of Hermite reduction, right?

    Sam

    I guess not. This does make me question the practicality of the Trager/Bronstein algorithm. Here's the solution from IntegrateAlgebraic in Mathematica:

    In[5117]:= IntegrateAlgebraic[(-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(1/3)/(x + Sqrt[4 + x^2])^(1/9), x] // Timing

    Out[5117]= {0.241908, (x (-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(1/3))/(x + Sqrt[4 + x^2])^(1/9) + ((-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(4/3) (-(1/10) - (11 (x + Sqrt[4 + x^2])^(2/3))/(20 2^(2/3)) - (x + Sqrt[4 + x^2])^(4/3)/(20 2^(1/3))))/(x +
    Sqrt[4 + x^2])^(10/9)}

    Sam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Fateman@21:1/5 to Sam Blake on Sun Apr 9 13:46:47 2023
    Maxima 5.45.1 returns the (unevaluated) integral in about 0.00 seconds.
    Using quadpack numerical integration, quad_qag() it is possible to integrate this function between any two points, (essentially instantaneously) and therefore
    plot it, if you wish.
    Since the integrand does not have any symbolic constants, there is no need to have
    a surface or higher-dimensional plot.

    The usefulness of the symbolic result you quote, from
    Mathematica, is somewhat difficult to grasp; perhaps plotting it would be easier to comprehend?

    If I just use Mathematica's Integrate[] , it fails to find a closed form. It returns, after 10.21 seconds
    {10.2188, \[Integral](-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(
    1/3)/(x + Sqrt[4 + x^2])^(1/9) \[DifferentialD]x}

    My system, version 13.0.0 does not have IntegrateAlgebraic[]
    so that's it.

    While doing symbolic indefinite integration is an interesting test for computer algebra systems,
    and it is perhaps useful for helping with calculus homework, it has not, for the most part,
    entered the mainstream of applied scientific computing.

    RJF




    On Sunday, March 5, 2023 at 7:14:42 PM UTC-8, Sam Blake wrote:
    On Thursday, February 23, 2023 at 11:57:47 AM UTC+10, Sam Blake wrote:
    Greetings,

    I was hoping the Risch-Trager-Bronstein algorithm of FriCAS and/or AXIOM would compute the following integral in a reasonable amount of time

    integrate((x+(4+x^2)^(1/2))^(-1/9)*(-2+2^(1/3)*(x+(4+x^2)^(1/2))^(2/3))^(1/3),x)

    Was it wishful thinking? My computer has been running FriCAS 1.3.6 for over an hour. The answer to this integral does not require any logarithms, so it should be computable with the algebraic extensions of Hermite reduction, right?

    Sam
    I guess not. This does make me question the practicality of the Trager/Bronstein algorithm. Here's the solution from IntegrateAlgebraic in Mathematica:

    In[5117]:= IntegrateAlgebraic[(-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(1/3)/(x + Sqrt[4 + x^2])^(1/9), x] // Timing

    Out[5117]= {0.241908, (x (-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(1/3))/(x + Sqrt[4 + x^2])^(1/9) + ((-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(4/3) (-(1/10) - (11 (x + Sqrt[4 + x^2])^(2/3))/(20 2^(2/3)) - (x + Sqrt[4 + x^2])^(4/3)/(20 2^(1/3))))/(x +
    Sqrt[4 + x^2])^(10/9)}

    Sam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam Blake@21:1/5 to Richard Fateman on Thu Apr 13 16:26:54 2023
    On Monday, April 10, 2023 at 6:46:48 AM UTC+10, Richard Fateman wrote:
    Maxima 5.45.1 returns the (unevaluated) integral in about 0.00 seconds. Using quadpack numerical integration, quad_qag() it is possible to integrate this function between any two points, (essentially instantaneously) and therefore
    plot it, if you wish.
    Since the integrand does not have any symbolic constants, there is no need to have
    a surface or higher-dimensional plot.

    The usefulness of the symbolic result you quote, from
    Mathematica, is somewhat difficult to grasp; perhaps plotting it would be easier to comprehend?

    If I just use Mathematica's Integrate[] , it fails to find a closed form. It returns, after 10.21 seconds
    {10.2188, \[Integral](-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(
    1/3)/(x + Sqrt[4 + x^2])^(1/9) \[DifferentialD]x}

    My system, version 13.0.0 does not have IntegrateAlgebraic[]
    so that's it.

    While doing symbolic indefinite integration is an interesting test for computer algebra systems,
    and it is perhaps useful for helping with calculus homework, it has not, for the most part,
    entered the mainstream of applied scientific computing.

    RJF
    On Sunday, March 5, 2023 at 7:14:42 PM UTC-8, Sam Blake wrote:
    On Thursday, February 23, 2023 at 11:57:47 AM UTC+10, Sam Blake wrote:
    Greetings,

    I was hoping the Risch-Trager-Bronstein algorithm of FriCAS and/or AXIOM would compute the following integral in a reasonable amount of time

    integrate((x+(4+x^2)^(1/2))^(-1/9)*(-2+2^(1/3)*(x+(4+x^2)^(1/2))^(2/3))^(1/3),x)

    Was it wishful thinking? My computer has been running FriCAS 1.3.6 for over an hour. The answer to this integral does not require any logarithms, so it should be computable with the algebraic extensions of Hermite reduction, right?

    Sam
    I guess not. This does make me question the practicality of the Trager/Bronstein algorithm. Here's the solution from IntegrateAlgebraic in Mathematica:

    In[5117]:= IntegrateAlgebraic[(-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(1/3)/(x + Sqrt[4 + x^2])^(1/9), x] // Timing

    Out[5117]= {0.241908, (x (-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(1/3))/(x + Sqrt[4 + x^2])^(1/9) + ((-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(4/3) (-(1/10) - (11 (x + Sqrt[4 + x^2])^(2/3))/(20 2^(2/3)) - (x + Sqrt[4 + x^2])^(4/3)/(20 2^(1/3))))/(x +
    Sqrt[4 + x^2])^(10/9)}

    Sam

    The problem was intended to be a challenging example for indefinite integration algorithms and their respective implementations, not a numerical integration problem.

    Cheers,

    Sam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam Blake@21:1/5 to Richard Fateman on Thu Apr 13 16:29:33 2023
    On Monday, April 10, 2023 at 6:46:48 AM UTC+10, Richard Fateman wrote:
    Maxima 5.45.1 returns the (unevaluated) integral in about 0.00 seconds. Using quadpack numerical integration, quad_qag() it is possible to integrate this function between any two points, (essentially instantaneously) and therefore
    plot it, if you wish.
    Since the integrand does not have any symbolic constants, there is no need to have
    a surface or higher-dimensional plot.

    The usefulness of the symbolic result you quote, from
    Mathematica, is somewhat difficult to grasp; perhaps plotting it would be easier to comprehend?

    If I just use Mathematica's Integrate[] , it fails to find a closed form. It returns, after 10.21 seconds
    {10.2188, \[Integral](-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(
    1/3)/(x + Sqrt[4 + x^2])^(1/9) \[DifferentialD]x}

    My system, version 13.0.0 does not have IntegrateAlgebraic[]
    so that's it.

    While doing symbolic indefinite integration is an interesting test for computer algebra systems,
    and it is perhaps useful for helping with calculus homework, it has not, for the most part,
    entered the mainstream of applied scientific computing.

    RJF
    On Sunday, March 5, 2023 at 7:14:42 PM UTC-8, Sam Blake wrote:
    On Thursday, February 23, 2023 at 11:57:47 AM UTC+10, Sam Blake wrote:
    Greetings,

    I was hoping the Risch-Trager-Bronstein algorithm of FriCAS and/or AXIOM would compute the following integral in a reasonable amount of time

    integrate((x+(4+x^2)^(1/2))^(-1/9)*(-2+2^(1/3)*(x+(4+x^2)^(1/2))^(2/3))^(1/3),x)

    Was it wishful thinking? My computer has been running FriCAS 1.3.6 for over an hour. The answer to this integral does not require any logarithms, so it should be computable with the algebraic extensions of Hermite reduction, right?

    Sam
    I guess not. This does make me question the practicality of the Trager/Bronstein algorithm. Here's the solution from IntegrateAlgebraic in Mathematica:

    In[5117]:= IntegrateAlgebraic[(-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(1/3)/(x + Sqrt[4 + x^2])^(1/9), x] // Timing

    Out[5117]= {0.241908, (x (-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(1/3))/(x + Sqrt[4 + x^2])^(1/9) + ((-2 + 2^(1/3) (x + Sqrt[4 + x^2])^(2/3))^(4/3) (-(1/10) - (11 (x + Sqrt[4 + x^2])^(2/3))/(20 2^(2/3)) - (x + Sqrt[4 + x^2])^(4/3)/(20 2^(1/3))))/(x +
    Sqrt[4 + x^2])^(10/9)}

    Sam

    FYI IntegrateAlgebraic is an open source package I have been working on in my spare time. It has recently been incorporated into Mathematica. When the latest version is included in mathematica then Integrate will compute this integral.

    Sam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From antispam@math.uni.wroc.pl@21:1/5 to Sam Blake on Fri Apr 28 10:17:50 2023
    Sam Blake <samuel.thomas.blake@gmail.com> wrote:
    Greetings,

    I was hoping the Risch-Trager-Bronstein algorithm of FriCAS and/or AXIOM would compute the following integral in a reasonable amount of time

    integrate((x+(4+x^2)^(1/2))^(-1/9)*(-2+2^(1/3)*(x+(4+x^2)^(1/2))^(2/3))^(1/3),x)

    Was it wishful thinking? My computer has been running FriCAS 1.3.6 for over an hour. The answer to this integral does not require any logarithms, so it should be computable with the algebraic extensions of Hermite reduction, right?

    Yes, it should be done by Hermite reduction. However, this is quite
    large example. First difficulty is that by FriCAS evaluation rules
    one gets dependent roots. After exliminating dependent roots by hand
    we get extention of constants of degree 3 and at level of functions
    root of order 3 containing root of order 9, so degree 27 on level
    of functions and degree 81 together. Cost of arithmetic grows
    slightly faster than quadratically with degree (having things in
    nested form increases time needed for operations). Current FriCAS
    algorithms form matrices of dimension proportional to degree
    and FriCAS needs to compute Smith form of such a matrix (with
    polynomial entries).

    As an extra explanation, your input is "sparse", but FriCAS algorithm
    are essentially "dense". There are many examples in algebraic
    computations that "sparse" input leads to "dense" solutions,
    and trying only "sparse" candidates for solutions would not
    solve problem. So to have completeness FriCAS must use "dense"
    methods.

    Better implementation cond speed up calculations quite a lot
    (maybe hundreds of times, meybe thousends of times). But
    as you increase degree you will quickly exceed capacity of
    any implementation using currently known methods.

    BTW: In 4GB of memory current FriCAS runs out of memory after
    few hours.

    --
    Waldek Hebisch

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