# Difficult partial solution to a reccurence equation

I am trying to help a friend of mine solve

$$a_n + 5 a_{n-1} + 6 a_{n-2} = 12n - 2(-1)^n$$

Now the homogenous solution is easy to find, and one just needs to solve the equation $r^2 + 5r + 6 = 0$ Which has roots $r=-2$ and $r-3$, so the homogenous solution is

$$A (-2)^n + B (-3)^n$$

Which can be confirmed by putting it into the equation. Now usually I would guess that the particular solution was on the form

$$h_p = (An + B) + C(-1)^n$$

but this is clearly wrong, is there any other way to find the solution of the equation ?

-
In fact it is not so simple to guess the form of the particular solution for the inhomogenous term $(-1)^n$ : wolframalpha.com/input/… –  doraemonpaul Oct 1 '12 at 18:28
What's clearly wrong about it? It seems to work for $A=1$, $B=17/12$, and $C=-1$. –  mjqxxxx Oct 1 '12 at 19:06
And in what whay is that equal to $12n - 2(-1)^n$ ? –  N3buchadnezzar Oct 1 '12 at 19:16