If I understand correctly, FriCAS' result of integrate(1/(b*x^5+a), x) 
contains some algebraic numbers with placeholders like %%G0.  To convert 
the result into a sage expression, these are substituted back.  
Unfortunately, these expressions may be extremely large, and this effect 
multiplies when the constants appear multiple times.

If you have any suggestions on how to improve the situation, I'd be happy 
to hear it.  Leaving them out is not really an option, because one may want 
to do further computations with the integral.

Martin

-1/10*sqrt(1/2)*sqrt(sqrt(5)/(a^4*b)^(2/5) - 5/(a^4*b)^(2/5)) - 
1/20*sqrt(5)/(a^4*b)^(1/5) - 1/20/(a^4*b)^(1/5)
sage: fricas("%%G1").sage()
-1/3*(1/2)^(2/3)*((sqrt(2)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5)) 
+ sqrt(5) - 3)^2/(a^4*b)^(2/5) - 
6*(sqrt(2)*(sqrt(5)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5)) - 
(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5))) + 
4)/(a^4*b)^(2/5))*(-I*sqrt(3) + 
1)/(16000*(sqrt(2)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5)) + 
sqrt(5) - 3)^3/(a^4*b)^(3/5) - 
144000*(sqrt(2)*(sqrt(5)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5)) - 
(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5))) + 
4)*(sqrt(2)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5)) + sqrt(5) - 
3)/(a^4*b)^(3/5) + 432000*(sqrt(2)*((a^4*b)^(3/5)*((sqrt(5) - 
5)/(a^4*b)^(2/5))^(3/2) - sqrt(5)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 
5)/(a^4*b)^(2/5)) + 13*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5))) - 
8*sqrt(5) - 8)/(a^4*b)^(3/5) + 9*sqrt(-2048000000*sqrt(5)*sqrt(2)*(sqrt(5) 
- 5)^(5/2) - 20480000000/3*(a^4*b)^(3/5)*(9*sqrt(5)*sqrt(2) + 
5*sqrt(2))*((sqrt(5) - 5)/(a^4*b)^(2/5))^(3/2) - 1024000000/3*(9*sqrt(5) - 
305)*(sqrt(5) - 5)^2 + 15872000000/3*(sqrt(5) - 5)^3 - 
35840000000/3*(sqrt(5) - 5)*(sqrt(5) - 51) - 
102400000000/3*(a^4*b)^(1/5)*(11*sqrt(5)*sqrt(2) + 7*sqrt(2))*sqrt((sqrt(5) 
- 5)/(a^4*b)^(2/5)) + 778240000000/3*sqrt(5) + 
2662400000000/3)/(a^4*b)^(3/5))^(1/3) - 
1/2400*(1/2)^(1/3)*(16000*(sqrt(2)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 
5)/(a^4*b)^(2/5)) + sqrt(5) - 3)^3/(a^4*b)^(3/5) - 
144000*(sqrt(2)*(sqrt(5)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5)) - 
(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5))) + 
4)*(sqrt(2)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5)) + sqrt(5) - 
3)/(a^4*b)^(3/5) + 432000*(sqrt(2)*((a^4*b)^(3/5)*((sqrt(5) - 
5)/(a^4*b)^(2/5))^(3/2) - sqrt(5)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 
5)/(a^4*b)^(2/5)) + 13*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5))) - 
8*sqrt(5) - 8)/(a^4*b)^(3/5) + 9*sqrt(-2048000000*sqrt(5)*sqrt(2)*(sqrt(5) 
- 5)^(5/2) - 20480000000/3*(a^4*b)^(3/5)*(9*sqrt(5)*sqrt(2) + 
5*sqrt(2))*((sqrt(5) - 5)/(a^4*b)^(2/5))^(3/2) - 1024000000/3*(9*sqrt(5) - 
305)*(sqrt(5) - 5)^2 + 15872000000/3*(sqrt(5) - 5)^3 - 
35840000000/3*(sqrt(5) - 5)*(sqrt(5) - 51) - 
102400000000/3*(a^4*b)^(1/5)*(11*sqrt(5)*sqrt(2) + 7*sqrt(2))*sqrt((sqrt(5) 
- 5)/(a^4*b)^(2/5)) + 778240000000/3*sqrt(5) + 
2662400000000/3)/(a^4*b)^(3/5))^(1/3)*(I*sqrt(3) + 1) + 
1/60*(sqrt(2)*(a^4*b)^(1/5)*sqrt((sqrt(5) - 5)/(a^4*b)^(2/5)) + sqrt(5) - 
3)/(a^4*b)^(1/5)
On Tuesday, 23 August 2022 at 03:28:46 UTC+2 Waldek Hebisch wrote:

> On Mon, Aug 22, 2022 at 01:25:32PM -0700, 'Nasser M. Abbasi' via FriCAS - 
> computer algebra system wrote:
> > Hello Waldek;
> > 
> > Yes, I saw these very large results.
> > 
> > Did you try with the setSimplifyDenomsFlag true? 
> > 
> > I just did, on sagemath, and I see the size of the Fricas anti 
> derivatives 
> > becomes much much larger due to this.
> > 
> > Please see the following folder
> > 
> > https://12000.org/tmp/Fricas_size_diff/
> > 
> > I put 2 plain text files there. 
> > 
> > Fricas_flag_false.txt 
> > <https://12000.org/tmp/Fricas_size_diff/Fricas_flag_false.txt>
> > Fricas_flag_true.txt 
> > <https://12000.org/tmp/Fricas_size_diff/Fricas_flag_true.txt>
> > 
> > One was run on the first integral you show which is 
> > 
> > 25 1276 integrate(1/(b*x^5+a), x)
> > 
> > with the flag false (default) and the second file shows the output when 
> the 
> > flag is true.
> > The result when the flag is true is indeed much much larger. 
> > 
> > I will be happy to run Fricas tests with this flag on or off. But I have 
> to 
> > pick one. Last year's tests were all run with this flag true also.
>
> Please see actual FriCAS result (with setSimplifyDenomsFlag(true)):
>
> http://www.math.uni.wroc.pl/~hebisch/fricas/int_size.txt
>
> it has 5171 characters. With defaul setSimplifyDenomsFlag(false)
> the result is sligtly larger: 5366 characters.
>
> Sage result that you post is 2223955 characters, that is 430 times
> larger than FriCAS result. As you can see setSimplifyDenomsFlag
> has little influence on size of FriCAS result. OTOH differences in
> those results apparently have dramatic influence on what Sage
> is doing to the result. Note that even with default setting
> Sage result is about 7 times larger than FriCAS result.
>
> IIUC size of Sage result is due to Sage limitations that
> are unlikely to change in near future. However, in such
> cases size of result as seen via Sage interface in meaningless
> compared to true size of FriCAS result.
>
> -- 
> Waldek Hebisch
>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/5e5ca12a-238f-4d5e-aecb-330ba5a9af2cn%40googlegroups.com.

Reply via email to