I have the following nonhomogenous recurrence relation:
$a_n = 2 a_{n-1} + 3 a_{n-2} + 8n -4, n \geq 2$
$a_0 = 1, a_1 = 3$
So as you can see, I have a function $f(n) = 8n - 4$ in my relation, which means I have to find a $p_n$ such that $p_n = A p_{n-1} + B p_{n-2} + f(n)$, for $n \geq 3$. After finding $p_n$ I can simply solve the homogeneous recurrence relation. But I have trouble finding $p_n$.
I have tried many things, like for example: $p_n = 8n^2 K_1 - 4K_2 n$, but I end up with complicated equations and I can't find $K_1$ and $K_2$ to determine $p_n$. Or I might not be looking the right way at the equation I end up with.
You should try the function $A+Bn$ for $A,B$ constants and you will obtain the solution $$p_n=-3-2n.$$
Please feel free to show your working if anything goes awry.