Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 1 year ago

Thrash gravatar image

Compute power series

I would like to compute k=0(1+(1)k)xk. In Mathematica, one can do

In[1]:= Sum[(1+(-1)^k)*x^k,{k,0,Infinity}]                                     

          -2
Out[1]= -------
              2
        -1 + x

How does it work in Sage? I tried

sage: var('k')
k
sage: sum((1+(-1)^k)*x^k, k, 0, oo)
sum(((-1)^k + 1)*x^k, k, 0, +Infinity)

which doesn't give me any new information.