[newbie question] solving fifth order polynomial equation



It seems that "realroots" with no other argument gives rational
solutions.

(%i19) realroots(1+11*s+45*s^2+84*s^3+70*s^4+21*s^5);
               44559791                 13723459        11184811
(%o19) [s = - --------, s = - 1, s = - --------, s = - --------,
               33554432                 33554432        33554432
                                                                       8825613
                                                                 s = -
               --------]
                                                                       33554432

I presume, but did not check, that this means that the roots are
rational.

Or, are these just approximate values?

-sen



On Wed, 17 Jan 2007, Stavros Macrakis wrote:

> On 1/17/07, Hugo Coolens <coolens at kahosl.be> wrote:
>> When solving the following equation
>> solve(1+11*s+45*s^2+84*s^3+70*s^4+21*s^5=0);
>>
>> Maxima shows two real solutions and three complex ones in stead of five
>> real solutions.
>
> Actually, Maxima is showing five real solutions -- it's just that the
> *form* of some of the real solutions includes %i.  To simplify these
> expressions to purely real expressions, use radcan:
>
> radcan(solve(1+11*s+45*s^2+84*s^3+70*s^4+21*s^5=0)) =>
>    [s = -1/3,s = -1,
> 	s = -(sqrt(3)*sin((atan(9/(13*sqrt(3)))-%pi)/3)
> 	  +cos((atan(9/(13*sqrt(3)))-%pi)/3)+2)
> 	  /3,
> 	s = (sqrt(3)*sin((atan(9/(13*sqrt(3)))-%pi)/3)
> 	  -cos((atan(9/(13*sqrt(3)))-%pi)/3)-2)
> 	  /3,s = (2*cos((atan(9/(13*sqrt(3)))-%pi)/3)-2)/3]
>
> If all you care about is the numeric values of the real solutions, you
> can use realroots to get approximations to any desired precision, even
> for non-factorizable polynomials:
>
> realroots(1+11*s+45*s^2+84*s^3+70*s^4+21*s^5=0, 10^-30)
>
> realroots(1+11*s+45*s^2+84*s^3+70*s^4+21*s^5=0, 10^-30);
> [s = -3366842668502188682920157364511
> 	  /2535301200456458802993406410752,s = -1,
> 	s = -1036915250298305044736277999857
> 	  /2535301200456458802993406410752,
> 	s = -845100400152152934331135470251
> 	  /2535301200456458802993406410752,
> 	s = -666844482112423878330377457135
> 	  /2535301200456458802993406410752]
> bfloat(%),fpprec:30;
> [s = -1.327985277605681767796032025b0,s = -1.0b0,
> 	s = -4.08990951493896474542054282001b-1,
> 	s = -3.33333333333333333333333333333b-1,
> 	s = -2.63023770900421757661913692994b-1]
>
> That one was factorizable into polynomials of degree <= 4, so roots
> can be given as radical expressions:
>
> factor(1+11*s+45*s^2+84*s^3+70*s^4+21*s^5) =>
>        (s+1)*(3*s+1)*(7*s^3+14*s^2+7*s+1)
>
> Example not factorizable over the rationals:
> realroots(x^5+x+3) => [x = -38017089/33554432]
>
>               -s
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>

-- 
  ---------------------------------------------------------------------------
  | Sheldon E. Newhouse            |    e-mail: sen1 at math.msu.edu           |
  | Mathematics Department         |       				   |
  | Michigan State University      | telephone: 517-355-9684                |
  | E. Lansing, MI 48824-1027 USA  |       FAX: 517-432-1562                |
  ---------------------------------------------------------------------------