axiom-math
[Top][All Lists]
Advanced

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

Re: [fricas-devel] Re: [Axiom-math] Selection of roots


From: Bill Page
Subject: Re: [fricas-devel] Re: [Axiom-math] Selection of roots
Date: Mon, 3 Nov 2008 17:38:35 -0500

On Mon, Nov 3, 2008 at 5:00 PM, Alejandro Jakubi wrote:
>
> Thank you Bill for showing how to use 'RealClosure' in this example.

You are welcome.

> In fact, I have been looking a pair of days on how to use it, but,
> because of the lack of proper documentation the best that I could
> get was:
>
> L:=allRootsOf(p^3 - p + 1/10)$RECLOS(FRAC INT)
>
>  [%A1,%A2,%A3]
>                               Type: List RealClosure Fraction Integer
>
> map(mainCharacterization,L)
>
>             1   1
>  [[- 4,0[,[0,-[,[-,1[]
>             2   2
> Type: List Union(RightOpenIntervalRootCharacterization(RealClosure
> Fraction Integer,SparseUnivariatePolynomial RealClosure Fraction
> Integer),"failed")
>
> which it was not so far.
>

Why, that's almost there! :-)  I agree that tutorial documentation is
a problem. If you haven't already seen it, perhaps you would be
interested in:

http://axiom-wiki.newsynthesis.org/RealClosure

Especially the paper: axiom-field.pdf

One thing that would be very useful is if someone like you were able
to contribute some documentation like this that could be added to the
axiom-wiki and perhaps also the Axiom book. BTW, what is you basic
source of information about Axiom?

> Now, my next question is about selecting the two real roots out of the four
> produced by 'radicalSolve' here:
>
> f:=(x^3+x^2-4*x-4)/(2*x^2+7*x-4)
> fp:=differentiate(f,x)
> radicalSolve(fp,x)
>
> The problem is that
>
> allRootsOf(fp)$RealClosure(Fraction Integer)
>
> produces the typical cryptic message:
>
> "There are 7 exposed and 0 unexposed library operations named..."
>
>
> So, can these real roots be selected by a similar method?
>

I believe that all you are really interested in are the roots of the
numerator of the expression (provided of course that they are not also
roots of the denominator), right?

(1) -> f:=(x^3+x^2-4*x-4)/(2*x^2+7*x-4)

         3    2
        x  + x  - 4x - 4
   (1)  ----------------
            2
          2x  + 7x - 4
                                            Type: Fraction Polynomial Integer
(2) -> fp:=differentiate(f,x)

           4      3     2
         2x  + 14x  + 3x  + 8x + 44
   (2)  ----------------------------
          4      3      2
        4x  + 28x  + 33x  - 56x + 16
                                            Type: Fraction Polynomial Integer
(3) -> S:=allRootsOf(numer fp)$RealClosure(Fraction Integer)

   (3)  [%A9,%A10]
                                      Type: List RealClosure Fraction Integer
(4) -> approximate(S.1,1/10^20)::Float

   (4)  - 6.7957899636 620037966
                                                                  Type: Float
(5) -> eval(fp,x=%)

   (5)  0.3908839188 6520300529 E -20
                                              Type: Fraction Polynomial Float
(6) -> approximate(S.2,1/10^20)::Float

   (6)  - 1.5241463459 294127043
                                                                  Type: Float
(7) -> eval(fp,x=%)

   (7)  - 0.2158472497 0513415786 E -20
                                              Type: Fraction Polynomial Float

--------

Regards,
Bill Page.




reply via email to

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