[Math] what to do next recurrence relation when solving exponential function

discrete mathematicsrecurrence-relations

find gernal solution of :$a_n = 5a_{n– 1} – 6a_{n –2} + 7^n$
Homogeneous solution:

$$a_n -5a_{n– 1} + 6a_{n –2} = 7^n$$
put $a_n=b^n$:

$$b^n -5b^{n– 1} + 6b^{n –2} =0
\\b^{n-2} (b^2-5b^{} + 6b) =0
\\b^2-5b^{} + 6b =0
\\(b-2)(b-3)=0\\
b=2,3$$
$$a^h_{(n)} = C_1 3^n+ C_2 2^n$$

Particular solution:
Since RHS is exponent so $a^p_{(n)} = da^n$
put $a^p_{(n)}$ in $a_n -5a_{n– 1} + 6a_{n –2} = 7^n$
$$da^n -5da^{n– 1} + 6da^{n –2} =7^n$$

Best Answer

Your computation of the general solution of the homogeneous equation $a_{n}=5a_{n-1}-6a_{n-2}$ is correct. Note that the homogeneous equation does not have $7^n$ on the right.

We want to find a particular solution of the full equation $$a_{n}=5a_{n-1}-6a_{n-2}+7^n.\tag{1}$$

We look for a solution of the shape $a_n=(k)7^n$, where $k$ is a constant. Substituting in (1), we get $$(k)7^n =(5k)7^{n-1}-(6k)7^{n-2}+7^n.$$ Dividing both sides by $7^{n-2}$, we get $$49k=35k-6k+49.$$ Solve for $k$. We get $k=\frac{49}{20}$.

Thus the general solution of (1) is $$C_1\cdot 3^n+C_2\cdot 2^n +\frac{1}{20}7^{n+2}.$$