$u(n)−7 u(n−1)−18 u(n−2) = 9^n$
I have found the complement solution to be $A(−2)^n+B(9)^n$. And have done these steps to find particular solution:
$U_n^{(p)} = C.9^n$
$U_{n-1}^{(p)} = C*9^{n-1}$
$U_{n-2}^{(p)} = C*9^{n-2}$
Sub into original:
$C.9^n−7.C*9^{n-1}−18.C*9^{n-2} = 9^n$
Factorise and Divide by $9^{n-2}$
$C(9^2-7*9-18)=9^2$
Solving for $C$ I get $9^2/0$ which is undefined.
What am I supposed to do? Thanks
For any term $P(n)\lambda^n$ appear on RHS where $P(n)$ is a polynomial in $n$ with degree $p$. If $\lambda$ is a root of multiplicity $m$ for the characteristic polynomial associated with LHS, the particular solution will contain a term of the form $Q(n)\lambda^n$ where $Q(n)$ is a polynomial of degree $q = p + m$.
For your case, the characteristic polynomial for LHS is
$$\lambda^2 - 7\lambda - 18 = (\lambda + 2)(\lambda - 9)$$
Since $9$ is a simple root for this, a term $9^n$ on RHS leads to a term of the form $(a + bn) 9^n$ in the particular solution.