Sorry about the addn / muln static. I think you figured this out.
I agree, the test
(gensumnum : 0, 0);
0$
powerseries((1)/((1-2*x)*(1-3*x)), x, 0);
sum((3^(i1+1) + -2*2^i1)*x^i1,i1,0,inf)$
passes. But the test
(gensumnum : 0, 0);
0$
powerseries((1)/((1-2*x)*(1-3*x)), x, 0);
sum((3^(i1+1) -2*2^i1)*x^i1,i1,0,inf)$
fails.
Question: Is this a rectform bug?
(%i13) powerseries(1/(1+x+x^2),x,0)$
(%i14) rectform(%)$
Is x positive or negative? pos;
(%i15) subst(inf=5,%);
(%o15)
%i*((3*x^4)/(2*sqrt(3))+(3*x^3)/(2*sqrt(3))+(3*x)/(2*sqrt(3))+3/(2*sqrt(3)))-x^4+x^3-x+1
(%i16) taylor(1/(1+x+x^2),x,0,5);
(%o16) 1-x+x^3-x^4+...
Barton
-----Dan Gildea wrote: -----
>To: Barton Willis
>From: Dan Gildea
>Date: 07/09/2007 06:18AM
>cc: Robert Dodier , maxima at math.utexas.edu
>Subject: Re: [Maxima] powerseries
>
>On Sun, July 8, 2007 at 10:25PM, Barton Willis wrote:
>> (%i4) (3^(i1+1)-2*2^i1)*x^i1;
>> (%o4) (3^(i1+1)-2^(i1+1))*x^i1
>
>what's happening inside the powerseries function is something like:
>
>(%i5) (3^(i1+1) + -2*2^i1)*x^i1;
>(%o5) (3^(i1+1)-2*2^i1)*x^i1
>
>I tried using addn / muln in the powerseries function, but didn't
>get any different results. I was able to get the tests to pass by
>mimicking the way the exps are built up in the code:
>
>/* two simple roots */
>powerseries((1)/((1-2*x)*(1-3*x)), x, 0);
>'sum((3^(i1+1)+(-2*2^i1))*x^i1,i1,0,inf);
>
>/* 1 1 2 2 4 4 8 8 */
>powerseries((1+x)/(1-2*x^2), x, 0);
>'sum(
>(-1*(1/-(1/sqrt(2)))*(1/sqrt(2)-1)*(1/-(4/sqrt(2)))*(1/-(1/sqrt(2)))^i3 +
>
>-1*(1/(1/sqrt(2)))*(-(1/sqrt(2))-1)*(1/(4/sqrt(2)))*(1/(1/sqrt(2)))^i3 ) *
>x\
>^i3,i3,0,inf);
>
>/* gcd of exps is two */
>powerseries((1-x^2)/(1-4*x^2+x^4), x, 0);
>'sum((-1*(1/(2-sqrt(3)))*(sqrt(3)-1)*(1/(2*(2-sqrt(3))-4))*(1/(2-sqrt(3)))
>^i8 +
>
>-1*(1/(sqrt(3)+2))*(-sqrt(3)-1)*(1/(2*(sqrt(3)+2)-4))*(1/(sqrt(3)+2))^i8
>)*x^(2*i8),
> i8, 0, inf);