Consider the following linear difference equation $$ f_{k} = 1 + \frac{1}{2} f_{k+1} + \frac{1}{2} f_{k-1}, 1\le k \le n-1$$
with $f_0 = f_n = 0$. How do I find the solution? I consider the homogeneous version $$ f_{k+1} - 2f_k + f_{k-1} = -1$$
and found that the solution is $C_1 + C_2 k$. But I don't know how to find a particular solution to the non-homogeneous equation.