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? 
 A: Slow, but reliable: 
write out the equation for $x_{n+1}$ and subtract it from the one you got, set $\Delta x_{n+1} = x_{n+1}-x_n$, then do the same with $x_n$ and set $y_n = \Delta x_{n+1} - \Delta x_{n}$. Thus you'll get rid of the square term. After this divide through $5^n$, and set $b_n = \frac{y_n}{5^n}$. By now you should have a simple equation of the form 
$$
b_n = a b_{n-1} + c = a^2b_{n-2}+ac+c = \ldots=\varphi(n)b_0+S
$$
Now start rolling back, use the telescoping sum: $\sum_{k=1}^{n} \Delta x_k = x_{n}-x_0$. Can you handle from here? 
A: 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)$ 
