axiom-math
[Top][All Lists]
Advanced

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

Re: [Axiom-math] repeated series expansion


From: Vladimir Skokov
Subject: Re: [Axiom-math] repeated series expansion
Date: Fri, 16 Jul 2010 16:10:17 +0200

Dear Ralf, 
thank you for help! I have got program working. 
I am sorry for being annoying, but I only start using axiom. 
Thank you ;)  

On Fri, Jul 16, 2010 at 2:08 PM, Ralf Hemmecke <address@hidden> wrote:
On 07/16/2010 12:52 PM, Vladimir Skokov wrote:
The problem is that my function contains logs, it is not just Taylor series.

For instance, I'd like to  expand f(x,y)log(x) + g(x,y) at x=0, y=0.
So I expect to obtain
 (expansion of f(x,y)) * log(x) + expansion of g(x,y)

Why don't people write exact specifications? The above is meaningless unless you specify how your output should look like.

Do you want to have a taylor series in x which has coefficients being taylor series in y? Or do you want the same with roles of x and y exchanged? Or do you want a *univariate* power series whose coefficients are (homogeneous) polynomials in x and y with a degree corresponding to the degree of the power in the taylor series?

Specify exactly what you want otherwise nobody will be able to help you.
I am not willing to guess your specification.


e.g. for one variable "series" does a good job
series(sin(x)*log(x),x=0)
(5) ->
   (5)
               log(x)  3   log(x)  5   log(x)  7   log(x)  9    log(x)   11
     log(x)x - ------ x  + ------ x  - ------ x  + ------ x  - -------- x
                  6          120        5040       362880      39916800
   +
        12
     O(x  )
                   Type: GeneralUnivariatePowerSeries(_expression_
Integer,x,0)

However this is not Taylor series and therefore I cannot extract
coefficients as you specified.

????

Look at the type. So we have

(3) -> coefficient(s,1)

  (3)  log(x)
                                  Type: _expression_(Integer)

I agree, that this might not be what you expected, but that is the problem with your input. You haven't exactly specified what you wanted.
Believe it or not, Axiom considers "log(x)" as a separate variable.

More natural would be something like

U := UnivariateTaylorSeries(Fraction Integer, 'x, 1)
x: U := x::U
log(x)

  (3)
              1        2   1        3   1        4   1        5   1      6
    (x - 1) - - (x - 1)  + - (x - 1)  - - (x - 1)  + - (x - 1)  - - (x - 1)
              2            3            4            5            6
  +
    1        7   1        8   1        9    1        10            11
    - (x - 1)  - - (x - 1)  + - (x - 1)  - -- (x - 1)   + O((x - 1)  )
    7            8            9            10
                         Type: UnivariateTaylorSeries(Fraction(Integer),x,1)

Now the error message


(6) -> sin x

  >> Error detected within library code:
  "sincos: series expansion involves transcendental constants"


should be clear. The result is simply not representable, by a series with just rational coefficients.

Try

V := UnivariateTaylorSeries(_expression_ Integer, 'y, 1)
y: V := y::V
sin(y)
sin(y)*log(y)

instead.

It all depends on what you want. AXIOM *is* different from other CAS.


Of course the example I have written is oversimplified. I do not know
the structure of the function, it can contain sin(log(x)) for example.

But you know what you want as a result.


Mathematica allows repeated series expansion, however it fails with
complicated expressions due to some memory limitation.

A Mathematica Series is a *truncated* series. Remove the initial terms and all you are left with is an O(x^10) _expression_ which will not deliver any more coefficients. AXIOM's series really represent infinite objects.

Ralf


_______________________________________________
Axiom-math mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/axiom-math



--

_____________________________________________

Dr. Vladimir Skokov

Theory Division
GSI Helmholtzzentrum für Schwerionenforschung GmbH
Planckstraße 1
D-64291 Darmstadt
------------------------------------------------------------------------
email:   address@hidden
phone: +49 6159-71 2751
fax  :    +49 6159-71 2990

reply via email to

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