Finding roots of a non linear expression when multiplied with a linear expression Here is a simple polynomial equation:

b^2 + 2b + 1 = 0


I could easily solve this as:

import numpy as np
from scipy.optimize import fsolve

eq = lambda b : np.power(b,2) + 2*b + 1
fsolve(eq, np.linspace(0,1,2))


Similarly I could solve any equation, that has finite number of terms. But how do I solve an equation with infinite number of terms which is given as :



The above equation could be written as :

(1 - l) * (5.5 + 4.0*l + 4*l^2 + 6*l^3 + 5*l^4 + 5*l^5 + 5*l^6 + 5*l^7 + 5*l^8 + 5*l^9 + 5*l^10   ) = 5


when n goes from 1 to 10. But I want to solve this for sufficiently large value of n such that LHS ~= RHS.

I know the values of LHS and G1 -&gt; Ginf but cannot understand how could I compute the value of lambda here.

I tried looking at numpy polynomial functions but could not find a function that is relevant here.
I don't think this equation can be solved in general. Since it is an infinitely long polynomial, it cannot be evaluated. It can only be done if the constants G_t:t+n followed a very specific pattern, so that the series becomes equivalent to a known function that we can evaluate. For example:


If $G_{t:t+n}$ were equal to [ 1, 1/2!, 1/3!, 1/4!, ...] (where 4! is the factorial of 4), then the sum would be equal to $e^\lambda$
If $G_{t:t+n}$ were equal to [1, 0, -1/3!, 0, 1/5!, ...] then the sum would be equal to $\sin(\lambda)$


But in general, if G were any random set of constants, the function cannot be evaluated.