Solve the second order linear non-homogeneous difference equations

95 Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

Easily you can determine that for the homogeneous recurrence equation

$$ f^h_{k+1}-2f^h_k+f^h_{k-1} = 0 $$

the solution is

$$ f^h_k = c_1 + c_2 k $$

now, a particular solution which should be polynomial, you can propose

$$ f^p_k = c_1 + c_2 k + c_3 k^2 $$

and the coefficient's determination is obtained by substitution in

$$ f^p_{k+1}-2f^p_k+f^p_{k-1} + 1 = 0 $$

obtaining the condition

$$ 1+2c_3 = 0\Rightarrow c_3 = -\frac 12 $$

and finally

$$ f_k = f^h_k + f^p_k = c_1 + c_2 k-\frac 12 k^2 $$

0
On

Apart from trying what Will Jagy said, you can also note that, for $n=2,3,4,\ldots$, $$\begin{align}\sum_{k=2}^n\,(n-k+1)\cdot(-1)&=\sum_{k=2}^n\,(n-k+1)\,\left(f_{k}-2\,f_{k-1}+f_{k-2}\right) \\&=f_n+\sum_{k=2}^{n-1}\,\big((n-k+1)-2(n-k)+(n-k-1)\big)\,f_k\\ &\phantom{aaaaa}+\big((n-2)-2(n-1)\big)\,f(1)+(n-1)\,f(0) \\ &=f_n-n\,f(1)+(n-1)\,f(0)\,. \end{align}$$ Thus, for every $n=0,1,2,\ldots$, $$f_n(n)=n\,f(1)-(n-1)\,f(0)-\sum_{k=2}^n\,(n-k+1)=n\,f(1)-(n-1)\,f(0)-\frac{n(n-1)}{2}\,.$$