3 a(n) = a(n-1) + 6, a(0) = 2 (warning ==> I need a(1) and I calculate it by hand, the result is: 8/3)
Lowering the indexes of 1, I can write:
3 a(n-1) = a(n-2) + 6
I make the difference between the original and 3 a(n-1) = a(n-2) + 6. I obtain:
3 a(n) - 3 a(n-1) = a(n-1) - a(n-2)
3 a(n) - 4 a(n-1) + a(n-2) = 0
To solve this, I put it in the form:
a(n) = 4/3 a(n-1) - 1/3 a(n-2)
The characteristical equation, in this particolar case, is:
r^2 - 4/3 r + 1/3 = 0
The solutions are real: r = 1/3 and r = 1
The roots are distinct, so the general solution is:
a(n) = x * (r1)^n + y * (r2)^n
Hence:
a(n) = x * (1/3)^n + y * (1)^n
this means:
a(n) = x * (1/3)^n + y
To find a PARTICULAR solution, given the initial conditions, a0 (= 2) and a1 (= 8/3), I have to solve the following system:
ao = x + y
a1 = (r1)x + (r2)y
So I can write:
2 = x+y
8/3 = (1/3)*x + y
and then:
y = 8/3 -x/3
This means that:
2 = x + 8/3 -x/3
equal to:
2 = 2x/3 + 8/3
equal to:
6/3 = 2x/3 + 8/3
equal to:
6 = 2x + 8
equal to:
2x = -2
The solutions of the previous system are:
x = -1
y = 3
So we have at last:
a(n) = -1 / (3^n) + 3
Factoring:
a(n) = (-1 + 3*3^n) / (3^n)
this means:
a(n) = (3^(n+1) - 1) / (3^n)