FWIW:

```
sage: a, x = var("a, x")
sage: Ex0=x/(a^5+x^5)
sage: FE1=Ex0.integrate(x, algorithm="fricas")
sage: len(repr(FE1))
47199
```

Fricas may be out of joint here... FWIW, I have been unable to typeset this 
expression with neither `pdflate` nor `xelatex`. The only way I had to 
visualize it was to compute it in a Jupyter worksheet, where Mathjax gave 
me a giant expression, explorable only thanks to the side bars (estimated 
size about 4 (kinfg size) bedsheets...).

More on this later.

I note that Sage's default integrator gives a much "smaller" answer : 

```sage: %time SE1=Ex0.integrate(x) # Use Sage's (=Maxima's) default 
integrator
CPU times: user 14.2 ms, sys: 0 ns, total: 14.2 ms
Wall time: 22.1 ms
sage: len(repr(SE1))
607
sage: SE1
-1/5*log(x + (a^5)^(1/5))/(a^5)^(3/5) + 
1/5*sqrt(5)*log(((a^5)^(1/5)*(sqrt(5) + 1) - 4*x + 
(a^5)^(1/5)*sqrt(2*sqrt(5) - 10))/((a^5)^(1/5)*(sqrt(5) + 1) - 4*x - 
(a^5)^(1/5)*sqrt(2*sqrt(5) - 10)))/((a^5)^(3/5)*sqrt(2*sqrt(5) - 10)) - 
1/5*sqrt(5)*log(((a^5)^(1/5)*(sqrt(5) - 1) + 4*x - 
(a^5)^(1/5)*sqrt(-2*sqrt(5) - 10))/((a^5)^(1/5)*(sqrt(5) - 1) + 4*x + 
(a^5)^(1/5)*sqrt(-2*sqrt(5) - 10)))/((a^5)^(3/5)*sqrt(-2*sqrt(5) - 10)) - 
1/5*log(-(a^5)^(1/5)*x*(sqrt(5) + 1) + 2*x^2 + 
2*(a^5)^(2/5))/((a^5)^(3/5)*(sqrt(5) + 1)) + 1/5*log((a^5)^(1/5)*x*(sqrt(5) 
- 1) + 2*x^2 + 2*(a^5)^(2/5))/((a^5)^(3/5)*(sqrt(5) - 1))
```

which *does* differentiate back to the original expression :

```
sage: SE1.diff(x).simplify_full()
x/(a^5 + x^5)
```
 
Fly in the ointment : this expression does not plot : Sage fails to compute 
a real value  for `a=1` and `x` in (-2, 2). This may be attributable to the 
numerous fifth roots occuring in the expression.

Mathematica's results are different :

```
sage: mathematica.Integrate(Ex0, x).sage().simplify_full()
-1/20*((sqrt(5) - 1)*log(-1/2*a*x*(sqrt(5) + 1) + a^2 + x^2) - (sqrt(5) + 
1)*log(1/2*a*x*(sqrt(5) - 1) + a^2 + x^2) + 2*sqrt(-2*sqrt(5) + 
10)*arctan((a*(sqrt(5) - 1) + 4*x)/(a*sqrt(2*sqrt(5) + 10))) + 
2*sqrt(2*sqrt(5) + 10)*arctan((a*(sqrt(5) + 1) - 4*x)/(a*sqrt(-2*sqrt(5) + 
10))) + 4*log(a + x))/a^3
```

This expression, with `a=1`, *does* plot as real for x>-1 to x=2.
Le vendredi 23 juin 2023 à 18:14:50 UTC+2, Nasser M. Abbasi a écrit :

> This is output from Fricas itself directly
>
> (2) -> setSimplifyDenomsFlag(true) 
>
>    (2)  false
>                                                                 Type: 
> Boolean
> (3) -> ii:=integrate(x/(a^5+x^5),x);
>
>                                          Type: 
> Union(Expression(Integer),...)
> (4) -> unparse(ii::InputForm) 
>
>    (4)
>   
> "(((-5)*a^3*(((-75)*a^6*rootOf((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3
>   
> *a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^
>   
> 6)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(
>   
> 625*a^12),%%E0)^2+(125*%%E1^2*a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^
>   
> 12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E
>   
> 1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(125*a^9),%%E1)^2+((-50)*a^6*rootO
>   
> f((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12
>   
> ),%%E0)+10*a^3)*rootOf((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*
>   
> %%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootO
>   
> f((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12
>   
> ),%%E0)^2+(125*%%E1^2*a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125
>   
> )*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+
>   
> (-25)*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(125*a^9),%%E1)+((-75)*a^6*rootOf((625*%%E
>   
> 0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+
>   
> 10*a^3*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+
>   
> 1)/(625*a^12),%%E0)+(-3)))/(25*a^6))^(1/2)+((-5)*a^3*rootOf((125*a^9*rootOf((
>   
> 625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%
>   
> %E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*
>   
> %%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2*a^9+(-25)*%%E1*a^6
>   
> +5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3
>   
> +1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(125*
>   
> a^9),%%E1)+((-5)*a^3*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+
>   
> (-5)*%%E0*a^3+1)/(625*a^12),%%E0)+1)))*log(((125*a^10*rootOf((625*%%E0^4*a^12
>   
> +(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(-25)*a^7)
>   
> *rootOf((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)
>   
> *%%E0*a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a
>   
> ^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*
>   
> %%E1^2*a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25
>   
> *%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^
>   
> 6+5*%%E1*a^3+(-1)))/(125*a^9),%%E1)+(-25)*a^7*rootOf((625*%%E0^4*a^12+(-125)*
>   
> %%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0))*(((-75)*a^6*rootO
>   
> f((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*
>   
> a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-
>   
> 125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2
>   
> *a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^
>   
> 2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%
>   
> E1*a^3+(-1)))/(125*a^9),%%E1)^2+((-50)*a^6*rootOf((625*%%E0^4*a^12+(-125)*%%E
>   
> 0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+10*a^3)*rootOf((125*a
>   
> ^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(
>   
> 625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-125)*%%E
>   
> 0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2*a^9+(-2
>   
> 5)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-
>   
> 5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+(
>   
> -1)))/(125*a^9),%%E1)+((-75)*a^6*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25
>   
> *%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+10*a^3*rootOf((625*%%E0^4*a^1
>   
> 2+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(-3)))/(2
>   
> 5*a^6))^(1/2)+(((-125)*a^10*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0
>   
> ^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+25*a^7)*rootOf((125*a^9*rootOf((625*
>   
> %%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)
>   
> ^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0
>   
> ^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2*a^9+(-25)*%%E1*a^6+5*a
>   
> ^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/
>   
> (625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(125*a^9)
>   
> ,%%E1)^2+((-125)*a^10*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6
>   
> +(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+25*a^7*rootOf((625*%%E0^4*a^12+(-125)*%%
>   
> E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(-5)*a^4)*rootOf((12
>   
> 5*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1
>   
> )/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-125)*
>   
> %%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2*a^9+
>   
> (-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6
>   
> +(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^
>   
> 3+(-1)))/(125*a^9),%%E1)+(25*a^7*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25
>   
> *%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(-5)*a^4*rootOf((625*%%E0^4*a
>   
> ^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+2*x)))+
>   
> ((5*a^3*(((-75)*a^6*rootOf((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9
>   
> +25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*r
>   
> ootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*
>   
> a^12),%%E0)^2+(125*%%E1^2*a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(
>   
> -125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*
>   
> a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(125*a^9),%%E1)^2+((-50)*a^6*rootOf((6
>   
> 25*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%
>   
> E0)+10*a^3)*rootOf((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0
>   
> ^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((6
>   
> 25*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%
>   
> E0)^2+(125*%%E1^2*a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%
>   
> E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25
>   
> )*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(125*a^9),%%E1)+((-75)*a^6*rootOf((625*%%E0^4*
>   
> a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+10*a
>   
> ^3*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(
>   
> 625*a^12),%%E0)+(-3)))/(25*a^6))^(1/2)+((-5)*a^3*rootOf((125*a^9*rootOf((625*
>   
> %%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)
>   
> ^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0
>   
> ^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2*a^9+(-25)*%%E1*a^6+5*a
>   
> ^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/
>   
> (625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(125*a^9)
>   
> ,%%E1)+((-5)*a^3*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)
>   
> *%%E0*a^3+1)/(625*a^12),%%E0)+1)))*log((((-125)*a^10*rootOf((625*%%E0^4*a^12+
>   
> (-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+25*a^7)*roo
>   
> tOf((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E
>   
> 0*a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+
>   
> (-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1
>   
> ^2*a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E
>   
> 0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*
>   
> %%E1*a^3+(-1)))/(125*a^9),%%E1)+25*a^7*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*
>   
> a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0))*(((-75)*a^6*rootOf((125*
>   
> a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/
>   
> (625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-125)*%%
>   
> E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2*a^9+(-
>   
> 25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(
>   
> -5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+
>   
> (-1)))/(125*a^9),%%E1)^2+((-50)*a^6*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9
>   
> +25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+10*a^3)*rootOf((125*a^9*root
>   
> Of((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^1
>   
> 2),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9
>   
> +25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2*a^9+(-25)*%%E1
>   
> *a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0
>   
> *a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(
>   
> 125*a^9),%%E1)+((-75)*a^6*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2
>   
> *a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+10*a^3*rootOf((625*%%E0^4*a^12+(-125
>   
> )*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(-3)))/(25*a^6))
>   
> ^(1/2)+(((-125)*a^10*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+
>   
> (-5)*%%E0*a^3+1)/(625*a^12),%%E0)+25*a^7)*rootOf((125*a^9*rootOf((625*%%E0^4*
>   
> a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^3+(125
>   
> *%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+
>   
> (-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2*a^9+(-25)*%%E1*a^6+5*a^3)*roo
>   
> tOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^
>   
> 12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(125*a^9),%%E1)^
>   
> 2+((-125)*a^10*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%
>   
> %E0*a^3+1)/(625*a^12),%%E0)^2+25*a^7*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^
>   
> 9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(-5)*a^4)*rootOf((125*a^9*r
>   
> ootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*
>   
> a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*
>   
> a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1^2*a^9+(-25)*%
>   
> %E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%
>   
> %E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*%%E1*a^3+(-1))
>   
> )/(125*a^9),%%E1)+(25*a^7*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2
>   
> *a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(-5)*a^4*rootOf((625*%%E0^4*a^12+(-1
>   
> 25)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+2*x)))+(10*a^3
>   
> *rootOf((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)
>   
> *%%E0*a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a
>   
> ^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*
>   
> %%E1^2*a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25
>   
> *%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^
>   
> 6+5*%%E1*a^3+(-1)))/(125*a^9),%%E1)*log((125*a^10*rootOf((625*%%E0^4*a^12+(-1
>   
> 25)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(-25)*a^7)*roo
>   
> tOf((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E
>   
> 0*a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((625*%%E0^4*a^12+
>   
> (-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(125*%%E1
>   
> ^2*a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E
>   
> 0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25)*%%E1^2*a^6+5*
>   
> %%E1*a^3+(-1)))/(125*a^9),%%E1)^2+(125*a^10*rootOf((625*%%E0^4*a^12+(-125)*%%
>   
> E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^2+(-25)*a^7*rootOf((
>   
> 625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%
>   
> %E0)+5*a^4)*rootOf((125*a^9*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0
>   
> ^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^3+(125*%%E1*a^9+(-25)*a^6)*rootOf((6
>   
> 25*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%
>   
> E0)^2+(125*%%E1^2*a^9+(-25)*%%E1*a^6+5*a^3)*rootOf((625*%%E0^4*a^12+(-125)*%%
>   
> E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(125*%%E1^3*a^9+(-25
>   
> )*%%E1^2*a^6+5*%%E1*a^3+(-1)))/(125*a^9),%%E1)+(125*a^10*rootOf((625*%%E0^4*a
>   
> ^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)^3+(-25)
>   
> *a^7*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)
>   
> /(625*a^12),%%E0)^2+5*a^4*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2
>   
> *a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)+(x+(-1)*a)))+(10*a^3*rootOf((625*%%E0^
>   
> 4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0*a^3+1)/(625*a^12),%%E0)*log(
>   
> (-125)*a^10*rootOf((625*%%E0^4*a^12+(-125)*%%E0^3*a^9+25*%%E0^2*a^6+(-5)*%%E0
>   *a^3+1)/(625*a^12),%%E0)^3+x)+(-2)*log(x+a)))))/(10*a^3)"
>                                                                  Type: 
> String
> (5) -> 
>
> I understand it is not an easy task to simplify it. But the question is 
> why it ran out of RAM
> and if this is to be expected. Now I changed all my code to put a 
> try/except around
> each time full_simplify is called.
>
> --Nasser
>
>
> On Friday, June 23, 2023 at 10:41:27 AM UTC-5 Dima Pasechnik wrote:
>
>> What is the output provided by fricas (outside Sage) ?
>> (perhaps it's a short expression as a root sum?)
>>
>>
>> Simplifying an expression given as  a string of length 47K is not an easy 
>> task.
>>
>>
>>
>> On Fri, 23 Jun 2023, 08:21 'Nasser M. Abbasi' via sage-devel, <
>> sage-...@googlegroups.com> wrote:
>>
>>> Here is the code to reproduce it. Using Fricas 1.3.8 on Linux via 
>>> sagemath
>>>
>>> var('x a')
>>> expr=integrate(x/(a^5+x^5),x, algorithm="fricas");
>>> len(str(expr))
>>>      47199
>>> expr.full_simplify()
>>>
>>> TypeError: ECL says: Memory limit reached. Please jump to an outer 
>>> pointer, quit program and enlarge the
>>> memory limits before executing the program again.
>>>
>>> --Nasser
>>>
>>>
>>> On Friday, June 23, 2023 at 2:15:18 AM UTC-5 Nasser M. Abbasi wrote:
>>>
>>>> I obtained a large expression from CAS system (Fricas) calling it from 
>>>> sagemath.
>>>>
>>>> When I did expr.full_simplify() sagemath 10.0 on Linux gave this error
>>>>
>>>> TypeError: ECL says: Memory limit reached. Please jump to an outer 
>>>> pointer, quit program and enlarge the
>>>> memory limits before executing the program again.
>>>>
>>>> Is this to be expected for very large expression? 
>>>>
>>>> Here is full error
>>>>
>>>> age: expr.full_simplify()
>>>>
>>>> ---------------------------------------------------------------------------
>>>> RuntimeError                              Traceback (most recent call 
>>>> last)
>>>> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:748, in 
>>>> InterfaceElement.__init__(self, parent, value, is_name, name)
>>>>     747 try:
>>>> --> 748     self._name = parent._create(value, name=name)
>>>>     749 except (TypeError, RuntimeError, ValueError) as x:
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/interfaces/maxima_lib.py:618, in 
>>>> MaximaLib._create(self, value, name)
>>>>     617     else:
>>>> --> 618         self.set(name, value)
>>>>     619 except RuntimeError as error:
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/interfaces/maxima_lib.py:526, in 
>>>> MaximaLib.set(self, var, value)
>>>>     525 cmd = '%s : %s$'%(var, value.rstrip(';'))
>>>> --> 526 self.eval(cmd)
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/interfaces/maxima_lib.py:472, in 
>>>> MaximaLib._eval_line(self, line, locals, reformat, **kwds)
>>>>     471         if statement:
>>>> --> 472             maxima_eval("#$%s$" % statement)
>>>>     473 if not reformat:
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/libs/ecl.pyx:830, in 
>>>> sage.libs.ecl.EclObject.__call__()
>>>>     829 lispargs = EclObject(list(args))
>>>> --> 830 return 
>>>> ecl_wrap(ecl_safe_apply(self.obj,(<EclObject>lispargs).obj))
>>>>     831 
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/libs/ecl.pyx:353, in 
>>>> sage.libs.ecl.ecl_safe_apply()
>>>>     352     else:
>>>> --> 353         raise RuntimeError("ECL says: {}".format(message))
>>>>     354 else:
>>>>
>>>> RuntimeError: ECL says: Memory limit reached. Please jump to an outer 
>>>> pointer, quit program and enlarge the
>>>> memory limits before executing the program again.
>>>>
>>>> During handling of the above exception, another exception occurred:
>>>>
>>>> TypeError                                 Traceback (most recent call 
>>>> last)
>>>> Cell In [7], line 1
>>>> ----> 1 expr.full_simplify()
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/symbolic/expression.pyx:10749, in 
>>>> sage.symbolic.expression.Expression.simplify_full()
>>>>   10747 x = self
>>>>   10748 x = x.simplify_factorial()
>>>> > 10749 x = x.simplify_rectform()
>>>>   10750 x = x.simplify_trig()
>>>>   10751 x = x.simplify_rational()
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/symbolic/expression.pyx:10899, in 
>>>> sage.symbolic.expression.Expression.simplify_rectform()
>>>>   10897 
>>>>   10898         """
>>>> > 10899         simplified_expr = self.rectform()
>>>>   10900 
>>>>   10901         if complexity_measure is None:
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/symbolic/expression.pyx:10549, in 
>>>> sage.symbolic.expression.Expression.rectform()
>>>>   10547         0.0
>>>>   10548     """
>>>> > 10549     return self.maxima_methods().rectform()
>>>>   10550 
>>>>   10551 def unhold(self, exclude=None):
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/symbolic/maxima_wrapper.py:31, in 
>>>> MaximaFunctionElementWrapper.__call__(self, *args, **kwds)
>>>>      18 def __call__(self, *args, **kwds):
>>>>      19     """
>>>>      20     Return a Sage expression instead of a Maxima pexpect 
>>>> interface element.
>>>>      21 
>>>>    (...)
>>>>      29         Symbolic Ring
>>>>      30     """
>>>> ---> 31     return super().__call__(*args, **kwds).sage()
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:696, in 
>>>> InterfaceFunctionElement.__call__(self, *args, **kwds)
>>>>     695 def __call__(self, *args, **kwds):
>>>> --> 696     return self._obj.parent().function_call(self._name, 
>>>> [self._obj] + list(args), kwds)
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:616, in 
>>>> Interface.function_call(self, function, args, kwds)
>>>>     612 self._check_valid_function_name(function)
>>>>     613 s = self._function_call_string(function,
>>>>     614                                [s.name() for s in args],
>>>>     615                                ['%s=%s'%(key,value.name()) for 
>>>> key, value in kwds.items()])
>>>> --> 616 return self.new(s)
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:385, in 
>>>> Interface.new(self, code)
>>>>     384 def new(self, code):
>>>> --> 385     return self(code)
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:298, in 
>>>> Interface.__call__(self, x, name)
>>>>     295         pass
>>>>     297 if isinstance(x, str):
>>>> --> 298     return cls(self, x, name=name)
>>>>     299 try:
>>>>     300     # Special methods do not and should not have an option to
>>>>     301     # set the name directly, as the identifier assigned by the
>>>>     302     # interface should stay consistent. An identifier with a
>>>>     303     # user-assigned name might change its value, so we return a
>>>>     304     # new element.
>>>>     305     result = self._coerce_from_special_method(x)
>>>>
>>>> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:750, in 
>>>> InterfaceElement.__init__(self, parent, value, is_name, name)
>>>>     748     self._name = parent._create(value, name=name)
>>>>     749 except (TypeError, RuntimeError, ValueError) as x:
>>>> --> 750     raise TypeError(x)
>>>>
>>>> TypeError: ECL says: Memory limit reached. Please jump to an outer 
>>>> pointer, quit program and enlarge the
>>>> memory limits before executing the program again.
>>>> sage:
>>>>
>>>> Since expression is large, I will put a link to full code used if you 
>>>> think it is needed.
>>>>
>>>> I am running this on Linux Virtual box with 43 GB of RAM. 
>>>>
>>>> --Nasser
>>>>  
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "sage-devel" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to sage-devel+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/sage-devel/7f96330e-fe0a-4858-8363-911122c1afb1n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/sage-devel/7f96330e-fe0a-4858-8363-911122c1afb1n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/96ad0552-9bf4-4629-bd4b-04dddcf49741n%40googlegroups.com.

Reply via email to