let's suppose I have geometric sum (a<1) of the form:
x + a*x + a^2*x + ... a^T*x = Y
where I know Y and a and I want to solve for an x on the LHS that matches the RHS Y. If my actual problem was that simple, I could calculate the LHS analytically but unfortunately it's not and that's why I want to do it numerically using matlab. I just don't know how to code it. The logic would be something like this:
LHS=@(x) x;
for t=1:T
LHS = @(x) LHS(x) + a^t*x;
end
equation = @(x) LHS(x) - Y;
solution = fzero(equation, x_0)
so in the loop I somehow add up the elements of the geometric sum as a function of x. My actual problem is something like this:
x + a*b1*x + a^2*b1*b2*x + ... + a^T*b1*b2..bTx = Y
where b1...bT are scalars. So I cannot use the symsum function I think, nor can I do it analytically.