[Top][All Lists]
[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 12:52:31 +0200 |
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)
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.
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.
Mathematica allows repeated series expansion, however it fails with complicated expressions
due to some memory limitation.
On Fri, Jul 16, 2010 at 12:22 PM, Ralf Hemmecke
<address@hidden> wrote:
I guess, before somebody can give you any answer, you would have to specify what _expression_ do you want as an answer.
series( series( sin(x+y),x=0 ),y=0 )
This doesn't work, but it looks as if you want to expand sin(x+y) into a series in x with some "strange" coefficients.
series( sin(x+y),x=0)
(1)
sin(y) 2 cos(y) 3 sin(y) 4 cos(y) 5
sin(y) + cos(y)x - ------ x - ------ x + ------ x + ------ x
2 6 24 120
+
sin(y) 6 cos(y) 7 sin(y) 8 cos(y) 9 sin(y) 10 11
- ------ x - ------ x + ------ x + ------ x - ------- x + O(x )
720 5040 40320 362880 3628800
Type: UnivariatePuiseuxSeries(_expression_(Integer),x,0)
and then want to expand each coefficient into a series in y.
The result would then be a series in x whose coefficients are *series* in y. Is that what you want?
Then you would go this way...
TY := UnivariateTaylorSeries(Fraction Integer,'y,0)
TX := UnivariateTaylorSeries(TY,'x,0)
sx := taylor(sin(x+y),x=0)
coeffs := [taylor(t,y=0)::TY for t in coefficients sx]
s := series(coeffs)$TX
That looks a bit complicated, but can you have that in another CAS? Series with coefficients being series themselves? And these are no finite objects. You can ask the resulting series for any coefficient you like.
But I guess, you wanted something else.
Ralf
(1) -> TY := UnivariateTaylorSeries(Fraction Integer,'y,0)
(1) UnivariateTaylorSeries(Fraction(Integer),y,0)
Type: Type
(2) -> (2) -> TX := UnivariateTaylorSeries(TY,'x,0)
(2)
UnivariateTaylorSeries(UnivariateTaylorSeries(Fraction(Integer),y,0),x,0)
Type: Type
(3) -> sx := taylor(sin(x+y),x=0)
(3)
sin(y) 2 cos(y) 3 sin(y) 4 cos(y) 5
sin(y) + cos(y)x - ------ x - ------ x + ------ x + ------ x
2 6 24 120
+
sin(y) 6 cos(y) 7 sin(y) 8 cos(y) 9 sin(y) 10 11
- ------ x - ------ x + ------ x + ------ x - ------- x + O(x )
720 5040 40320 362880 3628800
Type: UnivariateTaylorSeries(_expression_(Integer),x,0)
(4) -> coeffs := [taylor(t,y=0)::TY for t in coefficients sx]
(4)
1 3 1 5 1 7 1 9 11
[y - - y + --- y - ---- y + ------ y + O(y ),
6 120 5040 362880
1 2 1 4 1 6 1 8 1 10 11
1 - - y + -- y - --- y + ----- y - ------- y + O(y ),
2 24 720 40320 3628800
1 1 3 1 5 1 7 1 9 11
- - y + -- y - --- y + ----- y - ------ y + O(y ),
2 12 240 10080 725760
1 1 2 1 4 1 6 1 8 1 10 11
- - + -- y - --- y + ---- y - ------ y + -------- y + O(y ),
6 12 144 4320 241920 21772800
1 1 3 1 5 1 7 1 9 11
-- y - --- y + ---- y - ------ y + ------- y + O(y ),
24 144 2880 120960 8709120
1 1 2 1 4 1 6 1 8 1 10 11
--- - --- y + ---- y - ----- y + ------- y - --------- y + O(y ),
120 240 2880 86400 4838400 435456000
1 1 3 1 5 1 7 1 9 11
- --- y + ---- y - ----- y + ------- y - --------- y + O(y ),
720 4320 86400 3628800 261273600
1 1 2 1 4 1 6 1 8
- ---- + ----- y - ------ y + ------- y - --------- y
5040 10080 120960 3628800 203212800
+
1 10 11
----------- y + O(y )
18289152000
,
1 1 3 1 5 1 7 1 9 11
----- y - ------ y + ------- y - --------- y + ----------- y + O(y ),
40320 241920 4838400 203212800 14631321600
1 1 2 1 4 1 6 1 8
------ - ------ y + ------- y - --------- y + ----------- y
362880 725760 8709120 261273600 14631321600
+
1 10 11
- ------------- y + O(y )
1316818944000
,
...]
Type: Stream(UnivariateTaylorSeries(Fraction(Integer),y,0))
(5) -> series(coeffs)$TX
(5)
1 3 1 5 1 7 1 9 11
y - - y + --- y - ---- y + ------ y + O(y )
6 120 5040 362880
+
1 2 1 4 1 6 1 8 1 10 11
(1 - - y + -- y - --- y + ----- y - ------- y + O(y ))x
2 24 720 40320 3628800
+
1 1 3 1 5 1 7 1 9 11 2
(- - y + -- y - --- y + ----- y - ------ y + O(y ))x
2 12 240 10080 725760
+
1 1 2 1 4 1 6 1 8 1 10 11 3
(- - + -- y - --- y + ---- y - ------ y + -------- y + O(y ))x
6 12 144 4320 241920 21772800
+
1 1 3 1 5 1 7 1 9 11 4
(-- y - --- y + ---- y - ------ y + ------- y + O(y ))x
24 144 2880 120960 8709120
+
1 1 2 1 4 1 6 1 8 1 10 11 5
(--- - --- y + ---- y - ----- y + ------- y - --------- y + O(y ))x
120 240 2880 86400 4838400 435456000
+
1 1 3 1 5 1 7 1 9 11 6
(- --- y + ---- y - ----- y + ------- y - --------- y + O(y ))x
720 4320 86400 3628800 261273600
+
1 1 2 1 4 1 6 1 8
- ---- + ----- y - ------ y + ------- y - --------- y
5040 10080 120960 3628800 203212800
+
1 10 11
----------- y + O(y )
18289152000
*
7
x
+
1 1 3 1 5 1 7 1 9
----- y - ------ y + ------- y - --------- y + ----------- y
40320 241920 4838400 203212800 14631321600
+
11
O(y )
*
8
x
+
1 1 2 1 4 1 6 1 8
------ - ------ y + ------- y - --------- y + ----------- y
362880 725760 8709120 261273600 14631321600
+
1 10 11
- ------------- y + O(y )
1316818944000
*
9
x
+
1 1 3 1 5 1 7
- ------- y + -------- y - --------- y + ----------- y
3628800 21772800 435456000 18289152000
+
1 9 11
- ------------- y + O(y )
1316818944000
*
10
x
+
11
O(x )
Type: UnivariateTaylorSeries(UnivariateTaylorSeries(Fraction(Integer),y,0),x,0)
_______________________________________________
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