# [Maxima] cubic with three real roots

Alexey Beshenov al at beshenov.ru
Sun Mar 23 16:54:56 CDT 2008

```On Monday 24 March 2008 00:37, Edwin Woollett wrote:
> The cubic polynomial ex has three real roots,
>
> (%i1) fpprintprec : 8\$
> (%i2) display2d : false\$
> (%i3) ex : 8*x^3 - 68*x^2 + 160*x - 95\$
> (%i4) allroots(ex);
> (%o4) [x = 0.904363,x = 2.6608754,x = 4.9347613]
>
> but solve returns solutions involving %i.  In a
> previous mailing list example dealing with a fifth order polynomial
> the suggestion was to use radcan, but my attempts so far are futile.

Try rectform and trigsimp:

(%i1) trigsimp(rectform(solve(8*x^3-68*x^2+160*x-95,x)));
(%o1) [x = (7*sqrt(3)*sin(atan(9*sqrt(16585)/(151*sqrt(3)))/3)
-7*cos(atan(9*sqrt(16585)/(151*sqrt(3)))/3)+17)/6,
x = -(7*sqrt(3)*sin(atan(9*sqrt(16585)/(151*sqrt(3)))/3)
+7*cos(atan(9*sqrt(16585)/(151*sqrt(3)))/3)-17)
/6,x = (14*cos(atan(9*sqrt(16585)/(151*sqrt(3)))/3)+17)/6]

--
Alexey Beshenov <al at beshenov.ru>
http://beshenov.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20080324/9d7c9c60/attachment.pgp
```