It 's been a long time since I touched this kind of math , so please help me to solve the relation step by steps :
$V_k = (1+i)*V_{k-1}+P$
I know the answer is $V_k = (P/i)*((1+i)^k-1) $
Thanks in advance.
It 's been a long time since I touched this kind of math , so please help me to solve the relation step by steps :
$V_k = (1+i)*V_{k-1}+P$
I know the answer is $V_k = (P/i)*((1+i)^k-1) $
Thanks in advance.
On
Another general approach: to get rid of the constant write the second equation (denote $1-i=r$ for simplicity). $$ V_{k-1}=r V_{k-2}+P $$ Now subtract it from the first expression. You get (denote $\Delta V_{k}=V_{k}-V_{k-1}$): $$ \Delta V_{k}=r \Delta V_{k-1}=r^2\Delta V_{k-2}=\ldots =r^{k-1}\Delta V_{1} $$ Now sum over $k$ on both sides. On LHS you get a telescoping sum:$\sum_{k=1}^{n}\Delta V_{k}=V_{n}-V_{0}$. On RHS you get $(V_1-V_0) \frac{1-r^{n+1}}{1-r}$. The rest is simple algebra+boundary conditions (which you didn't provide). Can you handle from here?
On
Yet another way is:
$V_k - r V_{k-1} = P$
$r V_{k-1} - r^2 V_{k-2} = P r$
...
$V_k - r^n V_0 = P ( 1 + r + ... + r^{n-1} ) = P\frac{1-r^n}{1-r}$
(The last equality is only valid when $r \ne 1$, otherwise it should be $Pn$)
And one more:
(This method works only if $r \ne 1$, but the idea can be applied to other recurrences.)
$V_k - \frac{P}{1-r} = r ( V_{k-1} - \frac{P}{1-r} ) = r^n ( V_0 - \frac{P}{1-r} )$
(The constant that dropped from the sky was found by putting it in and solving for it.)
If you want a methodical way to find the answer that you don't know yet, you could use generating functions. Defining $F(x) = \sum_{k=0}^\infty V_k x^k$, and assuming the initial condition is $V_0=0$, the recursion gives \begin{align*} F(x) &= V_0 x^0 + \sum_{k=1}^\infty \big( (1+i)V_{k-1} + P \big) x^k \\ &= 0 + (1+i)x \sum_{k=1}^\infty V_{k-1} x^{k-1} + Px \sum_{k=1}^\infty x^{k-1} \\ &= (1+i)x \sum_{k=0}^\infty V_k x^k + Px \sum_{k=0}^\infty x^k \\ &= (1+i)x F(x) + \frac{Px}{1-x}. \end{align*} Solving for $F(x)$ gives $\big(1 - (1+i)x \big) F(x) = Px/(1-x)$, and so \begin{align*} F(x) &= \frac{Px}{(1 - (1+i)x )(1-x)} \\ &= \frac Pi \bigg( \frac1{(1-(1+i) x)}-\frac1{1-x} \bigg) \\ &= \frac Pi \bigg( \sum_{k=0}^\infty ((1+i) x)^k - \sum_{k=0}^\infty x^k \bigg). \end{align*} Comparing coefficients of $x^k$ then yields $V_k = \frac Pi \big( (1+i)^k - 1 \big)$.