The question is to write the general solution for this recurrence relation:
$y_{k+2} - 4y_{k+1} + 3y_{k} = -4k$.
I first solved the homogeneous equation $y_{k+2} - 4y_{k+1} + 3y_{k} = 0$, by writing the auxiliary equation $r^2 - 4r + 3 = (r-3)(r-1) = 0$. Thus $y_k^{h} = c_1(1)^k + c_2 (3)^k$. The general solution is just $y_k^{gen} = y_k^{h} + y_k^{p}$. My trouble is coming up with a particular solution. I keep up coming with $y_k^{p} = 2k^2$ when that doesn't work, but $k^2$ works, so my answer is close. I've gone through the artihmetic several times and cannot spot the mistake, here's the work:
The particular solution is of the form $y_k^{p} = a + bk$. Plugging in recurrence relation: $a + b(k+2) - 4(a + b(k+1) + 3(a + bk) = (a - 4a + 3a) + (bk - 4bk + 3bk) + (2b - 4b) = 0 + 0 - 2b = -4k$.
Thus $b = 2k$, and since our $y_k^p = a + bk$, it doesn't matter what pick $a$ to be so choose $a = 0$, which gives us $y_k^p = 2k^2$.
However, $2k^2$ doesn't satisfy the recurrence relation: $2(k+2)^2 - 8(k+1)^2 + 6k^2 = (2k^2 - 8k^2 + 6k^2) + (8k - 16k) + (8 - 8) = -8k \ne -4k$.
Where is the error in my reasoning? I know $y_k^p = k^2$ works, but why do I keep coming up with $2k^2$.
You started with the assumption that there existed two constants $a,b$ such that $y_k = a+bk$ was a solution. After a bit of algebra you end up with
$y_k$ is a solution $\iff \forall k, y_{k+2}-4y_{k+1}+3y_k = -4k \iff \forall k, b = 2k$.
So $b$ has to be equal to every even integer at once. Obviously this is impossible : you have reached a contradiction and there is no solution of the form $a+bk$.
If $z_k = y_{k+2}-4y_{k+1}+3y_k$, then you can check that $z_{k+1}-z_k$ is constant, and then that $z_{k+2}-2z_{k+1}+z_k = 0$. So the solutions to the orignal equation is a subset of the solutions of a larger homogeneous linear recurrent relation. Its characteristic polynomial is $(r-1)^3(r-3)$, so the solutions to this homogeneous equation ends up being $\{y_k = a+bk+ck^2+d3^k \mid (a,b,c,d) \in \Bbb R^4\}$, so you only have to check which of those satisfy the original equation, and obtain the value of $b$ and $c$.