Particular solution of non-homogeneous recurrence relation can somebody help me with my homework, please? I have to solve this: 
$a_{n}$ = $-a_{n-1}$ + $12a_{n-2}$ - 10n + 13 + $7.3^{n}$
$a_{0} = 3$, $a_{1}=24$.
I know to solve this (homogeneous equation):
$a_{n}$ = $-a_{n-1}$ + $12a_{n-2}$ 
$a_{n}$ = $x^{n}$
$x^{n}$ = -$x^{n-1}$ + $12.x^{n-2}$
$x^{n}$ + $x^{n-1}$ - $12.x^{n-2}$ = 0
(x + 4)(x - 3) = 0
$t_n$ = $(-4)^{n}.\alpha$ + $3^{n} \beta$
How can I find particular solution? ....using A,B,C... because i don't know solve this with sum (I found here something with sum, but we did't use sum on course).
Thanks everyone for your help :) 
 A: You have:
$$a_n = -a_{n-1} + 12a_{n-2} - 10n + 13 + 7\cdot 3^n$$
$$a_{n+1} = -a_{n} + 12a_{n-1} - 10(n+1) + 13 + 7\cdot 3^{n+1}$$
Subtracting the first from the second equation you get:
$$a_{n+1} = 13a_{n-1} - 12a_{n-2} - 10 + 14 \cdot 3^n$$
Repeat the same trick to get rid of the constant and you have:
$$a_{n+2} = a_{n+1} + 13a_n - 25a_{n-1} + 12a_{n-2} + 28\cdot 3^n$$
Now subtract three times the above equation from:
$$a_{n+3} = a_{n+2} + 13a_{n+1} - 25a_{n} + 12a_{n-1} + 28\cdot 3^{n+1}$$
You will get a homogeneous linear recurrence relation
A: thanks for your answer. I understand all your steps, but how long have I do this steps? I don't understand. :(
I tried to use "our" method .... but it has no solution and I don't know what I have to do with $7.3^n$.
This is my solution:
$t_n$ = $(-4)^{n}.\alpha$ + $3^{n} \beta$
$a_{n}$ = $t_{n}$ + $u_{n}$ 
$u_{n}$ =$s^{n}$ . $n^{m}.Q(n)$ 
$u_{n}$ =$-4$ . $n^{1}.(An + B)$ 
$-4$ . $n^{1}.(An + B)$ = $(n-1)^1(A(n-1)+B) + (n-2)^1(A(n-2)+B) -10n + 13 + 7.3^n$ =
$(n-1)(An-A+B) + (n-2)(An-2A+B)-10n+13+7.3^n$ = 
$(An^2-An+Bn-An+A-B) + (An^2 - 2An + Bn -2An+4A-2B)-10n + 13 + 7.3^n $ 
= $2An^2 - 6An + 5A + 2Bn - 3B - 10n + 13 + 7.3^n$
$n^2: -4A  = 2A$ ?????
$n^1: -4B = -6A+2B-10$
$n^0: 0 = 5A - 3B +13$
Thanks much.
A: With problems like this I like to reduce it to a standard form, say $f_n=af_{n-1}+bf_{n-2}$. There are many different types of terms here so this will require a series of transforms, So let's take a general expression like
$$T_n=AT_{n-1}+BT_{n-2}+Cn+D+EF^n$$
In a series of three transforms we can obtain the desired equation for $f$, thus
$$
\begin{align}
&1.\quad T_n=S_n+pn+q\\
&2.\quad S_n=F^nR_n\\
&3.\quad R_n=f_n+r
\end{align}
$$
In the first transform we'll eliminate the terms $Cn+D$. In the second, we'll factor out the $F^n$, but still have a constant, which we'll eliminate with the third transform.
Here the algebra is simple, so I'll just give the results. From the first transform,
$$
S_n=AS_{n-1}+BS_{n-2}+EF^n\\
p=-\frac{C}{A+B-1}\\
q=\frac{p(A+2B)-D}{A+B-1}\\
$$
From the second transform,
$$
R_n=\frac{A}{F}R_{n-1}+\frac{B}{F^2}R_{n-1}+E\\
$$
And from the third transform,
$$
f_n=\frac{A}{F}f_{n-1}+\frac{B}{F^2}f_{n-1}\\
r=-\frac{E}{A/F+B/F^2-1}
$$
Next we must consider the initial conditions for $f$. Starting with $T_0,T_1$, we have
$$
S_0=T_0-q\\
S_1=T_1-p-q\\
$$
$$
R_0=S_0=T_0-q\\
R_1=S_1/F=(T_1-p-q)/F\\
$$
$$
f_0=R_0-r=T_0-q-r\\
f_1=R_1-r=(T_1-p-q)/F-r
$$
Then we can back out the solution for $T_n$ as follows
$$
R_n=f_n+r\\
S_n=F^nR_n\\
T_n=S_n+pn+q
$$
I have verified these results numerically for positive and negative random values of $A,B,C,D,E,F,T_0,T_1$.
