The answer of maxima is correct, only not simplified:
(C1) f(x):=x^3-10*x^2+28.5*x-21;
3 2
(D1) f(x) := x - 10 x + 28.5 x - 21
(C2) display2D:false;
(D2) FALSE
(C3) map(lambda([x],ev(rhs(x),rectform,fullratsimp)),solve(f(x),x));
RAT replaced 28.5 by 57//2 = 28.5
(D3) [(SQRT(2)*SQRT(3)*SQRT(29)*SIN(ATAN(9*SQRT(301)/(2*SQRT(2)))/3)
-SQRT(2)*SQRT(29)*COS(ATAN(9*SQRT(301)/(2*SQRT(2)))/3)+20)
/6,
-(SQRT(2)*SQRT(3)*SQRT(29)*SIN(ATAN(9*SQRT(301)/(2*SQRT(2)))/3)
+SQRT(2)*SQRT(29)*COS(ATAN(9*SQRT(301)/(2*SQRT(2)))/3)-20)
/6,
(58*COS(ATAN(9*SQRT(301)/(2*SQRT(2)))/3)+10*SQRT(2)*SQRT(29))
/(3*SQRT(2)*SQRT(29))]
(C4) map(lambda([x],ev(x,numer)),D3);
(D4) [3.318006917974609,1.142552282206591,5.5394407998188]
************ However: *************
(C5) rhs(solve(f(x),x)[1]),rectform,numer;
RAT replaced 28.5 by 57//2 = 28.5
RAT replaced 28.5 by 57//2 = 28.5
RAT replaced 0.5 by 1//2 = 0.5
RAT replaced -4.18055555555556 by -301//72 = -4.18055555555556
(D5) 3.897114317029973*%I+0.75
********* which is wrong - no idea why, whereas **************
(C6) y:rhs(solve(f(x),x)[1]);
RAT replaced 28.5 by 57//2 = 28.5
(D6) (-SQRT(3)*%I/2-1/2)*(SQRT(301)*%I/(6*SQRT(2))+1/27)^(1/3)
+29*(SQRT(3)*%I/2-1/2)/(18*(SQRT(301)*%I/(6*SQRT(2))+1/27)^(1/3))+10/3
(C7) y,rectform,numer;
(D7) 3.318006917974609
********* is correct! *************
Martin
On Tue, 15 Oct 2002 stanevm@mail.uctm.edu wrote:
> Hello,
> the function f(x):=x^3-10*x^2+28.5*x-21
> has three real roots in [0,6]
> but solve(f(x),x)
> gives one real and two complex.
> M.At.Stanev
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>