From: Roger Stafford on
"nuclph nuclph" <bskorodo(a)gmail.com> wrote in message <hrujac$fmm$1(a)fred.mathworks.com>...
> hi all,
>
> say, i have the following recursion:
>
> E(s) = d^2/(3d-2) + (3d-3)/(3d-2) E(s-1)
> E(0) = 0
>
> If I want to find E(10) i need to expend recursion which will be a sum or series.
>
> Can you suggest is it possible to implement such thing in matlab?
>
> Thank you.
- - - - - - - -
If you substitute a = d^2/(3*d-2) and b = (3*d-3)/(3*d-2), your iteration becomes

E(s) = a + b*E(s-1)

and since b is not equal to 1, this can be expressed as

E(s)-a/(1-b) = b*(E(s-1)-a/(1-b)) .

Since E(0) = 0 you can write

E(s)-a/(1-b) = b^s*(E(0)-a/(1-b)) = -a/(1-b))*b^s

or

E(s) = a/(1-b)*(1-b^s) = d^2*(1-(1-1/(3*d-2))^s)

No need for an iteration or series.

Roger Stafford