I would like to find the general solution of $y(n+2)+2y(n+1)-3y(n) = -2n$.
I've found the general solution of $\tilde{y}(n+2)+2\tilde{y}(n+1)-3\tilde{y}(n) = 0$ to be $\tilde{y}(n) = c_1(-3)^n+c_2$.
I also found that for $b(n) = -2n$ and $L_b(y):= y(n+2)-2y(n+1)+y(n)$ is a difference equation where $L_b(b(n))=0$.
Then by the annihalator method I find that the general solution of $y(n+2)+2y(n+1)-3y(n) = -2n$ must be of the form $y(n) = c_1(-3)^n+c_2 + c_3 + nc_4$.
To find the values of $c_3$ and $c_4$ , I fill in $y(n) = c_1(-3)^n+c_2 + c_3 + nc_4$ into the original difference equation where $c_1 = 0$ and $c_2 = 0$.
This gives me $c_3 + c_4(n+2) + 2c_3 + c_4(n+1) - 3c_3 -3c_4n = -2n \Rightarrow 3c_4 +nc_4 = -2n$.
This equation has no solution, so my question is, how should I solve this?
We first define two linear difference operators: \begin{align} Ly &:= (\tau +3)(\tau - 1) y(n) \\ L_Ay &:= (\tau - 1)^2y(n) \end{align} Then we have the inhomogeneous difference equation \begin{equation} Ly = -b \end{equation} with $b=2n$. Furthermore, we have that \begin{equation} L_Ab = 0 \end{equation} i.e., $L_A$ annihilates $b$. Then $Ly=-b$ implies \begin{equation} L_ALy = -L_Ab = 0 \end{equation} Now define $L'= L_AL$, then we have a linear homogeneous difference equation of order $4$: $$L'y = (\tau+3)(\tau - 1)^3y(n)=0$$ Which has general solution $$y(n) = c_1 + c_2n + c_3 n^2 +c_4(-3)^n$$ with $c_1,c_4 \in \mathbb{C}$ and $c_2,c_3$ have to be determined. Substitution yields the following system of equations for $c_2$ and $c_3$: $$\begin{bmatrix} 4 & 6 \\ 0 & 8\end{bmatrix}\begin{bmatrix} c_2 \\ c_3 \end{bmatrix} = \begin{bmatrix} 0 \\ -2 \end{bmatrix}$$ which yields $c_2 = \dfrac{3}{8}$ and $c_3 = - \dfrac{1}{4}$. Hence the general solution is given by $$y(n) = c_1 + \dfrac{3}{8}n - \dfrac{1}{4}n^2 + c_4 (-3)^n, \quad n \geq 0, \quad c_1,c_4 \in \mathbb{C}$$