axiom-math
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-math] Selection of roots


From: Bill Page
Subject: Re: [Axiom-math] Selection of roots
Date: Mon, 3 Nov 2008 12:51:22 -0500

On Thu, Oct 30, 2008 at 8:39 AM, Alejandro Jakubi wrote:
> I wonder how it is done in Axiom the selection of roots of a polynomial
> with some property. As in this example, select the positive roots out
> of the list of three roots generated by:
>
> radicalSolve(p^3-p+1/10=0,p)
>

Since the discriminant is positive we know all roots are real, so in
principle we should be able to solve the problem like this:

(1) -> discriminant(p^3-p+1/10)

        373
   (1)  ---
        100
                                            Type: Fraction(Integer)

(2) -> select(p+->rhs(p)::AlgebraicNumber>0,radicalSolve(p^3-p+1/10=0,p))

                             +------------------+2
                             |    +-+    +-----+
                 +---+       |- 3\|3  + \|- 373
            (- 3\|- 3  - 3)  |------------------  + 2
                            3|         +-+
                            \|      60\|3
   (2)  [p= -----------------------------------------]
                               +------------------+
                               |    +-+    +-----+
                   +---+       |- 3\|3  + \|- 373
                (3\|- 3  - 3)  |------------------
                              3|         +-+
                              \|      60\|3

                                Type: List(Equation(Expression(Integer)))

---------

As I understand it AlgebraicNumber is supposed to be able to properly
order the roots. Unfortunately there seems to be a bug and
AlgebraicNumber gets it exactly wrong!

 (3) -> complexNumeric rhs %.1

   (3)
     - 1.0466805318 0460226115 8656311996 0435287484 7096514654 44382606
   +
     - 0.6 E -60 %i
                                               Type: Complex(Float)

The actual positive roots are:

(4) -> select(p+->rhs(p)::AN<0,radicalSolve(p^3-p+1/10=0,p))

   (4)
                        +------------------+2          +------------------+2
                        |    +-+    +-----+            |    +-+    +-----+
            +---+       |- 3\|3  + \|- 373             |- 3\|3  + \|- 373
       (- 3\|- 3  + 3)  |------------------  - 2    3  |------------------  + 1
                       3|         +-+                 3|         +-+
                       \|      60\|3                  \|      60\|3
   [p= -----------------------------------------,p= ---------------------------]
                          +------------------+            +------------------+
                          |    +-+    +-----+             |    +-+    +-----+
              +---+       |- 3\|3  + \|- 373              |- 3\|3  + \|- 373
           (3\|- 3  + 3)  |------------------          3  |------------------
                         3|         +-+                  3|         +-+
                         \|      60\|3                   \|      60\|3

                          Type: List(Equation(Expression(Integer)))

------

Regards,
Bill Page.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]