# General solution of inhomogenous recurrence $a_n = 5a_{n−1} − 6a_{n−2} + 7^n$

I am sorry I'm posting this on phone, I have the recurrence

$$a_n = 5a_{n−1} − 6a_{n−2} + 7^n$$

When solved with the method of particular solution coefficient of $$7^n$$ in the general solution is $$49/20$$. However, I can't seem to determine the coefficient of $$7^n$$ when I first transform this recurrence to a homogeneous recurrence and solve using the characteristic equation. Can someone enlighten me?

I have tried;

$$a_n = 5a_{n-1} - 6a_{n-2} + 7^n$$ $$a_{n-1} = 5a_{n-2} - 6a_{n-3} + 7^{n-1}$$ $$7a_{n-1} = 35a_{n-2} - 42a_{n-3} + 7^{n}$$

Then subtracting second one from first one I get

$$a_n = 12a_{n-1} - 41a_{n-2} + 42a_{n-3}$$

Then its characteristic equation has roots $$2$$, $$3$$ and $$7$$. So I thought general solution would be

$$a_n = c_1 2^n + c_2 3^n + c_3 7^n$$

The associated homogeneous auxiliary equation is $$r^2=5r-6$$ $$r^2-5r+6=0$$ $$(r-2)(r-3)=0$$ $$r=2,3$$ So the complementary solution is $$a_n=C_1(2^n)+C_2(3^n)$$ The particular solution is of the form $$a_n=C_3(7^n)$$ Hence, plugging this in we get $$C_3(7^n)=\frac57C_3(7^n)-\frac6{49}C_3(7^n)+7^n$$ $$C_3=\frac57C_3-\frac6{49}C_3+1$$ $$\frac{20}{49}C_3=1$$ $$C_3=\frac{49}{20}$$ Hence the particular solution is $$a_n=\frac{49}{20}(7^n)$$ and the general solution is $$a_n=C_1(2^n)+C_2(3^n)+\frac{49}{20}(7^n)$$
• Yes, this method correctly gives you the general solution to a different recurrence relation - one that is homogeneous for a start. This does not help you find the coefficient of $7^n$. Commented Apr 18, 2019 at 21:02