## [Maxima-bugs] [ maxima-Bugs-727542 ] powerseries wrong/fix

 [Maxima-bugs] [ maxima-Bugs-727542 ] powerseries wrong/fix From: SourceForge.net - 2003-04-30 17:35:45 ```Bugs item #727542, was opened at 2003-04-25 15:35 Message generated for change (Comment added) made by kratt5 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=727542&group_id=4933 Category: None Group: None Status: Open >Resolution: Fixed Priority: 5 Submitted By: Martin Rubey (kratt5) Assigned to: Nobody/Anonymous (nobody) >Summary: powerseries wrong/fix Initial Comment: (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 ---------------------------------------------------------------------- >Comment By: Martin Rubey (kratt5) Date: 2003-04-30 17:35 Message: 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)) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=727542&group_id=4933 ```

 [Maxima-bugs] [ maxima-Bugs-727542 ] powerseries wrong/fix From: SourceForge.net - 2003-04-30 17:35:45 ```Bugs item #727542, was opened at 2003-04-25 15:35 Message generated for change (Comment added) made by kratt5 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=727542&group_id=4933 Category: None Group: None Status: Open >Resolution: Fixed Priority: 5 Submitted By: Martin Rubey (kratt5) Assigned to: Nobody/Anonymous (nobody) >Summary: powerseries wrong/fix Initial Comment: (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 ---------------------------------------------------------------------- >Comment By: Martin Rubey (kratt5) Date: 2003-04-30 17:35 Message: 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)) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=727542&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-727542 ] powerseries wrong/fix From: SourceForge.net - 2003-05-28 17:03:01 ```Bugs item #727542, was opened at 2003-04-25 11:35 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=727542&group_id=4933 Category: None Group: None >Status: Closed Resolution: Fixed Priority: 5 Submitted By: Martin Rubey (kratt5) Assigned to: Nobody/Anonymous (nobody) Summary: powerseries wrong/fix Initial Comment: (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 ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2003-05-28 13:03 Message: Logged In: YES user_id=28849 Patch applied. ---------------------------------------------------------------------- Comment By: Martin Rubey (kratt5) Date: 2003-04-30 13:35 Message: 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)) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=727542&group_id=4933 ```