I'm looking for a hint in solving linear nonhomogeneous recurrence relations with constant coefficient; that has a complex roots for characteristic equation. So the recurrence relation is as follows:
$b_n=b_{n-1}-b_{n-2}+b_{n-3}+2n$
I can deduce that the roots are $\lambda_1=1,\lambda_2=i,\lambda_3=-i.$ and particular solution $b_n^p=(1/2)n^2+(3/2)n$; see calculations below. Hence, the solution is in the form:
$b_n=b_n^h+b_n^p=\alpha_1+\alpha_2(i)^n+\alpha_3(-i)^n+(1/2)n^2+(3/2)n.$
What would be the appropriate way for me to translate this general solution so that I can solve it using systems of linear equations; given that I have initial conditions?
calculation for $b_n^p$ is as follows:
$b_n^p=n(\beta_1n+\beta_0)1^n=n^2\beta_1+n\beta_0$
$=(n-1)^2\beta_1+(n-1)\beta_0-(n-2)^2\beta_1-(n-2)\beta_0+(n-3)^2\beta_1+(n-3)\beta_0+2n$
$=(n^2-2n+1)\beta_1+(n-1)\beta_0-(n^2-4n+4)\beta_1-(n-2)\beta_0+(n^2-6n+9)\beta_1+(n-3)\beta_0+2n$
$=n^2\beta_1-2n\beta_1+\beta_1+n\beta_0-\beta_0-n^2\beta_1+4n\beta_1-4\beta_1-n\beta_0+2\beta_0+n^2\beta_1-6n\beta_1+9\beta_1+n\beta_0-3\beta_0+2n$
$=(\beta_1-\beta_1+\beta_1)n^2+(-2\beta_1+\beta_0+4\beta_1-\beta_0-6\beta_1+\beta_0+2)n+(\beta_1-\beta_0-4\beta_1+2\beta_0+9\beta_1-3\beta_0)$
$=(\beta_1)n^2+(-4\beta_1+\beta_0+2)n+(6\beta_1-2\beta_0)$
$0=(-4\beta_1+2)n+(6\beta_1-2\beta_0)$
$\implies\beta_1=1/2,\beta_0=3/2$
$\implies b_n^p=(1/2)n^2+(3/2)n$
The values $b_0$, $b_1$, $b_2$ should be given to you (or found out by you) as initial conditions. Then you just set up a three equations linear system with complex coefficients and solve it for the $\alpha_i$. You will get the complex values of $\alpha_1$, $\alpha_2$, $\alpha_3$.
If your initial conditions are real-valued you can be sure that $\alpha_1\in{\mathbb R}$, and that $\alpha_3=\overline{\alpha_2}$. You can therefore set up your linear system with replacing $\alpha_2$, $\alpha_3$ by $\alpha_2:=\gamma_1+i\gamma_2$, $\>\alpha_3:=\gamma_1-i\gamma_2$, where $\gamma_1$, $\gamma_2$ are now real unknowns. You will see that the resulting system is completely real and delivers $\alpha_1$, $\gamma_1$, $\gamma_2$. The final solution will not have a periodicity that can be notationally served with $(-1)^n$. It will be necessary to introduce $\cos{n\pi\over2}$, $\sin{n\pi\over2}$ or similar things for a straight formula.