axiom-math
[Top][All Lists]
Advanced

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

Re: [Axiom-math] Curious behavior of Taylor series


From: Igor Khavkine
Subject: Re: [Axiom-math] Curious behavior of Taylor series
Date: Mon, 21 Aug 2006 05:49:33 -0400

On 20 Aug 2006 23:45:38 +0200, Martin Rubey <address@hidden> wrote:
"Igor Khavkine" <address@hidden> writes:

> Can someone explain the following behavior of Taylor series in Axiom?
>
> (113) -> y := taylor x
>    (113)  x
>                          Type: UnivariateTaylorSeries(Expression Integer,x,0)
> (114) -> x*y
>    (114)  x x
>                          Type: UnivariateTaylorSeries(Expression Integer,x,0)
> (115) -> coefficient(%,1)
>    (115)  x
>                                                      Type: Expression Integer

The reason is that Axiom cannot really know whether you meant x in (114) to be
an element of the coefficient Ring EXPR INT, or to be a univariate Taylor
series. In case of doubt, it usually chooses the wrong possibility :-)

Thus, you should help Axiom by saying

 monomial(1,1)$UTS(EXPR INT,x,0) * y

OK, but the following definitely looks like a bug.

(279) -> monx := monomial(1,1)$UTS(EXPR INT,x,0)
  (279)  x
                        Type: UnivariateTaylorSeries(Expression Integer,x,0)
(281) -> sqrt(monx*monx)
(281) ->
  (281)  1
                        Type: UnivariateTaylorSeries(Expression Integer,x,0)
(282) -> serx := series x
(282) ->
  (282)  x
                       Type: UnivariatePuiseuxSeries(Expression Integer,x,0)
(283) -> sqrt(serx*serx)
(283) ->
  (283)  x
                       Type: UnivariatePuiseuxSeries(Expression Integer,x,0)

It looks like sqrt(), when applied to UTS, shifts the coefficients so
that the leading term is always O(1). In the example above, it should
be O(x). The UPXS domain doesn't seem to suffer from the same problem.

Igor




reply via email to

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