#302 powerseries wrong/fix

closed
nobody
None
5
2003-05-28
2003-04-25
No

(C51)
gf:-2*(175-1144*x-4882*x^3+4324*x^4-2072*x^5+416*x^6+3189*x^2)/
(2*x-1)^3/(4*x-1)/(x-1)^3\$

(C52) taylor(gf,x,0,3);

```                2      3
```

(D52)/T/ 350 + 2262 x + 11634 x + 53650 x + . . .
(C53) taylor(powerseries(gf,x,0),x,0,3);

```                2      3
```

(D53)/T/ 470 + 2862 x + 13524 x + 58750 x + . . .

maybe this is related to sum(x^i,i,0,inf),x:0 giving 0, but I don't know...
I checked D53 with Maple, so it seems that powerseries is wrong, not taylor.

I converted the result of powerseries to the rational function again, and
obtained:

-2*(940-7436*x-41588*x^3-22066*x^5+40253*x^4+416*x^8-1816*x^7+7076*x^6+24227*x^2)
/(2*x-1)^3/(4*x-1)/(x-2)^2/(x-1)^3

The difference between the two is

160*'SUM((I+1)*2^I*x^I,I,0,INF)-160*'SUM((I+1)*2^(-I-2)*x^I,I,0,INF)

so the reason might be a simple typo (- instead of + or the like)...

Should be possible to correct this...
Martin

Discussion

• Martin Rubey - 2003-04-30

Logged In: YES
user_id=651552

Here is the fix. It's a typo, as I expected...
should really be applied as soon as possible since it gets everything wrong, where
the partial fraction expansion contains (a*x+c)^(-2)...

Martin

diff -c series.lisp series.lisp.~1.1.1.1.~
*** series.lisp Wed Apr 30 19:32:58 2003
--- series.lisp.~1.1.1.1.~ Mon May 8 08:09:41 2000
***************
*** 248,255 ****
0))
((= 2 n)
(psp2form (m* (m+ 1 *index)
! (m^ a (m* -1 (m+ 2 *index))) ;; kratt5
! (m^ (m* -1 c) *index)) ;; kratt5
(if (equal m 1) *index (m* *index m))
0))
(t (psp2form (m* (do ((nn (f1- n) (f1- nn))
--- 248,255 ----
0))
((= 2 n)
(psp2form (m* (m+ 1 *index)
! (m^ c (m* -1 (m+ 2 *index)))
! (m^ (m* -1 a) *index))
(if (equal m 1) *index (m* *index m))
0))
(t (psp2form (m* (do ((nn (f1- n) (f1- nn))

• Martin Rubey - 2003-04-30
• summary: powerseries wrong --> powerseries wrong/fix

• Raymond Toy - 2003-05-28
• status: open --> closed

• Raymond Toy - 2003-05-28

Logged In: YES
user_id=28849

Patch applied.