Given the following recurrence equation:
$f(n)= (1+r)f(n-1) - (1+k)^n A $ with $f(m)=0$
I need a non-recurrence equation for $f(0)$. Can someone explain how to solve this recurrence equation? Or find a solution for $f(0)$. According to the document I was reading, the solution for $n=0$ should be
$f(0)=A(1+r)\Big(\dfrac{1-(1+k)^m(1+r)^{-m}}{r-k}\Big) $.
I'm not sure if this is correct. Another source claims that the solution for $n=0$ is given by
$f(0)=A (k + 1) \Big(\dfrac{1-(1+k)^{m}(1+r)^{-m}}{r-k}\Big) $
Can someone help me to solve this? Thank you!
I did find the following
$f(0)= \sum \limits_{n=1}^m \frac{(1+k)^n}{(1+r)^n}$
We may show: $$ f(n) = f(0)(1+r)^n-A\sum\limits^n_{i=1}(1+r)^{n-i}(1+k)^i $$ Setting $f(m) = 0$ we arrive at $$ f(0) = A\sum\limits^m_{i=1}\frac{(1+k)^i}{(1+r)^i} = A\frac{1 - \tfrac{(1+k)^{m+1}}{(1+r)^{m+1}}}{1 - \tfrac{1+k}{1+r}} - A =A\frac{(1+k) - \tfrac{(1+k)^{m+1}}{(1+r)^{m}}}{r-k} = A(k+1)\frac{1 - \tfrac{(1+k)^{m}}{(1+r)^{m}}}{r-k} $$ where we used the gemoetric series. This is the result form the second source you present.