Question: Maple should try harder

restart;

f:=5*x^3-5*x+1;

5*x^3-5*x+1

(1)

s:=[solve(f)]; evalf(%);  # All the roots are real

[(1/30)*(-2700+(300*I)*219^(1/2))^(1/3)+10/(-2700+(300*I)*219^(1/2))^(1/3), -(1/60)*(-2700+(300*I)*219^(1/2))^(1/3)-5/(-2700+(300*I)*219^(1/2))^(1/3)+((1/2)*I)*3^(1/2)*((1/30)*(-2700+(300*I)*219^(1/2))^(1/3)-10/(-2700+(300*I)*219^(1/2))^(1/3)), -(1/60)*(-2700+(300*I)*219^(1/2))^(1/3)-5/(-2700+(300*I)*219^(1/2))^(1/3)-((1/2)*I)*3^(1/2)*((1/30)*(-2700+(300*I)*219^(1/2))^(1/3)-10/(-2700+(300*I)*219^(1/2))^(1/3))]

 

[.8788850663-0.2e-9*I, -1.088033915-0.2598076212e-9*I, .2091488484+0.2598076212e-9*I]

(2)

max(s);  # ?

Error, (in simpl/max) complex argument to max/min: (1/30)*(-2700+(300*I)*219^(1/2))^(1/3)+10/(-2700+(300*I)*219^(1/2))^(1/3)

 

type(s,list(realcons)); # Wrong, the type realcons should not be purely syntactic; or is it?

false

(3)

R:=convert(s,RootOf):

max(R);  #  For nested RootOfs fails

Error, (in simpl/max) complex argument to max/min: (1/30)*RootOf(_Z^3+2700-300*RootOf(_Z^2+1, index = 1)*RootOf(_Z^2-73, index = 1)*RootOf(_Z^2-3, index = 1), index = 1)+10/RootOf(_Z^3+2700-300*RootOf(_Z^2+1, index = 1)*RootOf(_Z^2-73, index = 1)*RootOf(_Z^2-3, index = 1), index = 1)

 

sort(s): evalf(%);  # Wrong

[.8788850663-0.2e-9*I, .2091488484+0.2598076212e-9*I, -1.088033915-0.2598076212e-9*I]

(4)

 

Workaround

 

S:=[seq(RootOf(f,x,index=i),i=1..3)];

[RootOf(5*_Z^3-5*_Z+1, index = 1), RootOf(5*_Z^3-5*_Z+1, index = 2), RootOf(5*_Z^3-5*_Z+1, index = 3)]

(5)

evalf(S);

[.2091488484, .8788850662, -1.088033915]

(6)

min(S);max(S);  # OK

RootOf(5*_Z^3-5*_Z+1, index = 3)

 

RootOf(5*_Z^3-5*_Z+1, index = 2)

(7)

sort(S);   # Wrong!

[RootOf(5*_Z^3-5*_Z+1, index = 1), RootOf(5*_Z^3-5*_Z+1, index = 2), RootOf(5*_Z^3-5*_Z+1, index = 3)]

(8)

################################

r:=(sqrt(2)+I)^3 + (sqrt(2)-I)^3;

(2^(1/2)+I)^3+(2^(1/2)-I)^3

(9)

type(r,realcons);  # Purely syntactic?

false

(10)

type(expand(r),realcons);

true

(11)

max(r,13);  # Even for such a simple expression?

Error, (in simpl/max) complex argument to max/min: (2^(1/2)+I)^3+(2^(1/2)-I)^3

 

 


Download TryHarder.mw

Please Wait...