Ask Your Question
1

Power series with alternating exponent

asked 2023-07-09 16:44:53 +0100

Thrash gravatar image

updated 2023-07-09 22:59:25 +0100

Mathematically, we have $4^{(-1)^k} = \frac18 (17+15(-1)^k)$ for all integers $k$. However, this identity is not being used for the computation of $\sum_{k=0}^\infty 4^{(-1)^k} x^k$:

sage: sum(4^((-1)^k)*x^k, k, 0, oo)._giac_().normal().sage()
sum(4^((-1)^k)*x^k, k, 0, +Infinity)

However:

sage: sum(1/8*(17+15*(-1)^k)*x^k, k, 0, oo)._giac_().normal().sage()
-1/4*(x + 16)/(x^2 - 1)

Is there a way to compute the first expression with Sage or is it possible to implement this process so that Sage can handle such expressions automatically?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-07-09 21:19:38 +0100

achrzesz gravatar image

updated 2023-07-10 13:33:14 +0100

One way is:

var('k')
assume(x>-1)
assume(x<1)
(4*sum(x^(2*k), k, 0, oo)+sum(x^(2*k+1), k, 0, oo)/4).combine()

-1/4*(x + 16)/(x^2 - 1)

A more automatic version:

var('x k')
assume(k,'integer')
w(k)=4^((-1)^k)*x^k
a(k)=w(k=2*k).full_simplify()
b(k)=w(k=2*k+1).full_simplify()
(sum(a(k),k,0,oo)+sum(b(k),k,0,oo)).combine()

-1/4*(x + 16)/(x^2 - 1)

(assuming that both series converge)

edit flag offensive delete link more

Comments

Is there any way Sage can handle $\sum_{k=0}^\infty 4^{(-1)^k} x^k$ directly/automatically?

Thrash gravatar imageThrash ( 2023-07-09 22:57:37 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-07-09 16:44:53 +0100

Seen: 134 times

Last updated: Jul 10 '23