powerseries



On Mon, July  9, 2007 at 11:13AM, Barton Willis wrote:
> 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+...

rectform calls cos, which returns -1 to a fractional power:

(%i2) declare(x, integer);
(%o2) done

(%i3) cos( 2*%pi*x/3 );
(%o3) (-1)^(2*x/3)

(%i4) cos( 2*%pi*x/5 );
(%o4) cos(2*%pi*x/5)

(%i5) cos ( 7777777*%pi*x/7777778 );
(%o5) (-1)^(7777777*x/7777778)