0

First of all I'm really sorry if this isn't the right tag, I was confused of what this is called, but I think this was the closest.
This is a bank model we were introducted to in the lecture, where $y(k)$ is the balance (remainder) in day $k$, and $v(k)$ is the daily income (or outcome), while $a$ is the interest (this is what google translate gave me, not sure if it fits).
And this is the general formula:
$$y(k+1)=(1+a)y(k)+v(k)$$

The example was: $v(k) = 1\space\space\space ,\forall k$
and $y(0)=0$.
So $y(1)=(1+a)y(0)+1=1$
$y(2)=(1+a)+1=2+a$.
$y(3)=a^2+3a+3$
$y(4)=(1+a)(a^2+3a+3)+1=a^3+3a^2+3a+a^2+3a+3=a^3+4a^2+6a+4$
$y(5)=(1+a)(a^3+4a^2+6a+4)+1=a^4+5a^3+10a^2+10a+5$

Now I can only see the pattern with $a^{k-1}$ (highest power), and the last thing is $+k$, I cannot really understand how we get the middle parts, I've been trying to think about different stuff, I've even reached of summing up the coefficients, but nothing seems to work.
How should I deal with this challenge? I would appreciate any help and any hints.
Thanks in advance!

Pwaol
  • 2,113
  • 2
    If I were you, I would write $y(1)=1$, $y(2)=(1+a)+1$, $y(3)=(1+a)^2+(1+a)+1$, $y(4)=(1+a)^3+(1+a)^2+(1+a)+1$, and see if that suggests something – Henry Oct 26 '21 at 17:28
  • @Henry Thank you! I would appreciate it if you could tell me if there's a formal name for this material, as I've been trying to find books/anything that could help me improve my understanding and not sure if I'm just not translating it correctly. – Pwaol Oct 26 '21 at 17:49
  • 1
    There are lots of techniques. For example you could have set up a recurrence relation $y(n+1)=(2+a)y(n)-(1+a)y(n-1)$ and solved it. Sometimes you are lucky and you spot a shortcuts. – Henry Oct 26 '21 at 17:56
  • 1
    This topic is called a linear difference equation with constant coefficients. – Hosam Hajeer Oct 26 '21 at 17:59

1 Answers1

1

You have the difference equation

$y(k+1) = (1 + a) y(k) + 1$

Its solution from the theory of linear difference equations with constant coefficients is

$y(k) = A (1 + a)^k + B$

For some constants $A, B$. To determine them, use the initial condition

$y(0) = y_0 = A + B $

And plug in the solution into the difference equation, to obtain,

$A (1 + a)^{k+1} + B = (1 + a) ( A (1 + a)^k + B ) + 1$

Comparing coefficients, it follows that

and

$ B = (1 + a) B + 1 $ , hence, $ B = -\dfrac{1}{a}$

Substituting $B$ in the first equation, we find that

$A = y_0 + \dfrac{1}{a} $

Hence,

$y(k) = (y_0 + \dfrac{1}{a} ) (1 + a)^k - \dfrac{1}{a} $

If $y_0 = 0$ then this simplifies to

$y(k) = \dfrac{1}{a} (1 + a)^k - \dfrac{1}{a} $

From which,

$y(1) = \dfrac{(1 + a)}{a} - \dfrac{1}{a} = 1$

$y(2) =\dfrac{(1 + a)^2}{a} - \dfrac{1}{a} = 2 + a$

$y(3) = \dfrac{(1 + a)^3}{a} - \dfrac{1}{a} = 3 + 3 a + a^2$

etc.

Hosam Hajeer
  • 21,978