<s>[INST] Finding the inhomogeneous solution $x_{n+2} = x_{n+1} + 20x_n + n^2 + 5^n \text{ with } x_0 = 0 \text{ and } x_1 = 0$
How would I find the inhomogeneous solution for this since the homogenous solution is 0 given initial conditions? 
 [/INST] Define $y_n = x_{n+1} - 5x_n$
Then $y_{n+2} = y_{n+1} + 20 y_n + ((n+1)^2-5n^2) + 5^{n+1} - 5^{n+1} = y_{n+1} + 20 y_n + (-4n^2+2n+1)$.
There, that "erased" the $5^n$ term in the recurrence. The $n^2.1^n$ term spilled a bit, but no biggie, we can do the same to those, by putting $z_n = y_{n+1} - y_n$, then $u_n = z_{n+1} - z_n$ and finally $v_n = u_{n+1} - u_n$. Each time the term of the form $P(n).1^n$ loses a degree, until it disappears completely.
Hence $v_{n+2} = v_{n+1} + 20v_n$. Now if you unfold back everything, you obtain a big recurrence relation on $x_{n+1}$, whose characteristic polynomial is $(X^2-X-20)(X-1)^3(X-5) = (X+4)(X-1)^3(X-5)^2$.
From there you should know that $x_n$ should be of the form $a.4^n + (bn+c).5^n + (dn^2+en+f)$ 
</s>