given two recursive formulas (in my country we call them like that)
my try was like this but i have not any idea how to continue
please help me but not just the answer if you can explian me the all way to solution plz:)
given two recursive formulas (in my country we call them like that)
my try was like this but i have not any idea how to continue
please help me but not just the answer if you can explian me the all way to solution plz:)
On
You can use generating functions. Set $a_n=0$ for $n<0$ and $b_n=0$ for $n<0$. Let $A(x)=\sum_{n=0}^\infty a_n x^n$ and $B(x)=\sum_{n=0}^\infty b_n x^n$. First make the equations in the system valid for $n\geq 0$ to obtain the system $$ \begin{align} a_n+2a_{n-1}-4b_{n-1}-4\delta_{n,0}&=0\\ b_n+5a_{n-1}-7b_{n-1}-\delta_{n,0}&=0 \end{align} $$ where $\delta$ is the Kronecker delta. Multiply by $x^n$ and sum on $n\geq 0$ to obtain $$ \begin{align} (1+2x)A(x)-4xB(x)&=4\\ 5xA(x)+(1-7x)B(x)&=1. \end{align} $$ At this point we can make use of the formula for the inverse of a $2\times 2$ matrix and obtain $$ \begin{bmatrix} A(x)\\ B(x) \end{bmatrix} =\frac{1}{(1-3x)(1-2x)} \begin{bmatrix} 1-7x & 4x\\ -5x & 1+2x \end{bmatrix} \begin{bmatrix} 4\\ 1 \end{bmatrix}. $$ You can compute $A(x)$, $B(x)$ and then find the sequences by using partial fraction decomposition. Here are the details $$ A(x)=\frac{4-24x}{(1-3x)(1-2x)}=\frac{-12}{1-3x}+\frac{16}{1-2x} =\sum_{n=0}^\infty (16\times 2^n-12\times3^n)x^n $$ and $$ B(x)=\frac{1-18x}{(1-3x)(1-2x)}=\frac{-15}{1-3x}+\frac{16}{1-2x} =\sum_{n=0}^\infty (16\times 2^n-15\times3^n)x^n. $$ Hence $$ \begin{align} a_n&=16\times 2^n-12\times3^n\\ b_n&=16\times 2^n-15\times3^n. \end{align} $$
You can make an ansatz (as you already did)
$$ a_n = A 2^n + B 3^n\\ b_n = C 2^n + D 3^n $$
By the way, 2 and 3 are the two eigenvalues of the matrix I was mentioning earlier in my comment, but you don't need to tell someone if that's not allowed ...
Now you just need to plug in some values.
By the iteration equation, you have $a_1 = -2 a_0 + 4 b_0 = -8+4 = -4$ and $b_1 = -5 a_0 + 7 b_0 = -20 + 7 = -13$. Iterating once more, you have $a_2 = -2 a_1 + 4 b_1 = 8 - 52 = -44$ and $b_2 = -5 a_1 + 7 b_1 = 20 - 91 = -71$.
Using your ansatz, you have for $a_i$:
$a_1 = 2A + 3 B = -4$ and $a_2 = 4A + 9 B = -44$ which solves with $A=16$ and $B=-12$.
Further you have for $b_i$:
$b_1 = 2C + 3 D = -13$ and $b_2 = 4C + 9 D = -71$ which solves with $C=16$ and $D=-15$.
So your result is
$$ a_n = 16 \cdot 2^n -12 \cdot 3^n\\ b_n = 16 \cdot 2^n -15 \cdot 3^n $$
As a "control equation", which I didn't use, the values for $a_0$ and $b_0$ can directly be read off from the solution.