Ask Your Question

Revision history [back]

Solving a power series equation

I'd like to solve the equation f(t) == 1 where f is a power series:

var('n,t')
a1 = float(4 + sqrt(8))
b1 = float(3 + sqrt(8))
c1 = b1
an = 4*n*(n-1)+a1*n
an1 = 4*n*(n+1) + a1*(n+1)
anr = b1 + 2*n*(4*n+a1)
bn = 1+2*n*(n-1)+n*(b1-1)
bn1 = 1+2*n*(n+1)+(n+1)*(b1-1)
bnr = c1 + 2*n*(2*n+b1-1)

def f(t):
return (1+b1)^-t + 3/2*a1^-t + 1/2*(2*b1)^-t + b1^-t  + 2*sum(an^-t +an1^-t + anr^-t + 2*bn^-t +2*bn1^-t + bnr^-t ,n,1,1000).n()


I've tried simply plugging in values for t and I estimate that if f(t) = 1 then t is approximately 1.51. I'd like to possibly do something like

solve(f(t) == 1,t)


but this appears to lock sage up and I have to interrupt the process. The true f function is actually an infinite series, but I am truncating it to the first 1000 terms. I know there are methods of solving series equations such as the method of regula falsi. Does Sage have anything like this? Thanks!