# Solving a system of linear equations with undefined number of equations

I need to solve this system of linear equations:
$k_0=1+k_1$
$k_1=1+\frac{1}{3} k_1 +\frac{2}{3} k_2$
$k_2=1+\frac{1}{3} k_1 +\frac{2}{3} k_3$
$k_3=1+\frac{1}{3} k_1 +\frac{2}{3} k_4$
$...$
$k_{N-1}=1+\frac{1}{3} k_1 +\frac{2}{3} k_N$
$k_N=0$
I need to find a general solution for $k_0$ all $N$.

The system is equivalent to:
$k_0=1+k_1$
$k_i=1+\frac{1}{3} k_1 +\frac{2}{3} k_{i+1} \;\;\; i\in 1,2,3,...,N-1$
$k_N=0$

that is:
$k_0=1+k_1$
$k_i=\frac{3}{2} k_{i-1} -\frac{1}{2} k_1-\frac{3}{2} \;\;\; i\in 2,3,...,N \;\;\; [1]$
$k_N=0 \;\;\; [2]$

As far as I know, $[1]$ and $[2]$ is a linear unhomogenous recurrence relation with constant coefficients of order 1 with initial condition $k_N=0$ . The unhomogenous term is $f(n)=-\frac{1}{2} k_1-\frac{3}{2}$.
Solving this recurrence relation gives as general solution:
$k_i=A \left ( \frac{3}{2} \right )^i+3+k_1 \;\;\; [3]$
with $A=\left ( \frac{2}{3} \right )^N \left ( -3-k_1 \right )$

Now I don't know how to proceed. As I said, I need to find $k_0$, but the solution $[3]$ is just for $i\in 2,3,...,N$. How can I use $[3]$ to find a general solution for $k_0$ for all $N$? Thank you.

• Note that $k_N = A (\dfrac{3}{2})^N + 3 + k_1 = 0$, so $k_1 = -3-A (\dfrac{3}{2})^N$ and hence, $k_0 = -2-A (\dfrac{3}{2})^N$. – Johannes Kloos Aug 21 '16 at 9:30
• If you can find $k_1$, then you can get $k_0$ from that quite easily. – Martin Sleziak Aug 21 '16 at 9:30
• You're right but $A$ is not a constant, it's a function of $k_1$, so we don't have a solution for $k_0$ because $k_0$ is a function of $A$ which is a function of $k_1$ – John M Aug 21 '16 at 15:54

You have done all the work already. Now simply use $[3]$ for $i=2$ together with the second equation in your question to - after reducing a bit - obtain
EDIT 2: Actually, as OP points out, Johannes Kloos' method actually doesn't work, since we get $$0=-\left(\frac{2}{3}\right)^N(3+k_1)\left(\frac{3}{2}\right)^N+3+k_1 \Rightarrow 0=0$$