# 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.

Consider the following linear difference equation
$$\displaystyle{f}_{{k}}={1}+{\frac{{{1}}}{{{2}}}}{f}_{{{k}+{1}}}+{\frac{{{1}}}{{{2}}}}{f}_{{{k}-{1}}},\ {1}\le{k}\le{n}-{1}$$
with $$\displaystyle{f}_{{0}}={f}_{{n}}={0}$$. How do i find solution?

• Questions are typically answered in as fast as 30 minutes

### Plainmath recommends

• Get a detailed answer even on the hardest topics.
• Ask an expert for a step-by-step guidance to learn to do it yourself.

Befory
Apart from trying what Will Jagy said, you can also note that, for $$\displaystyle{n}={2},{3},{4},\ldots,$$
$$\displaystyle{\sum_{{{k}={2}}}^{{n}}}{\left({n}-{k}+{1}\right)}\cdot{\left(-{1}\right)}={\sum_{{{k}={2}}}^{{n}}}{\left({n}-{k}+{1}\right)}{\left({f}_{{k}}-{2}{f}_{{{k}-{1}}}+{f}_{{{k}-{2}}}\right)}$$
$$\displaystyle={f}_{{n}}+{\sum_{{{k}={2}}}^{{{n}-{1}}}}{\left({\left({n}-{k}+{1}_{{-{{2}}}}{\left({n}-{k}\right)}+{\left({n}-{k}-{1}\right)}\right)}{f}_{{k}}+{\left({\left({n}-{2}\right)}-{2}{\left({n}-{1}\right)}\right)}{f{{\left({1}\right)}}}+{\left({n}-{1}\right)}{f{{\left({0}\right)}}}\right.}$$
$$\displaystyle={f}_{{n}}-{n}{f{{\left({1}\right)}}}+{\left({n}-{1}\right)}{f{{\left({0}\right)}}}$$
Thus, for every $$\displaystyle{n}={0},{1},{2},\ldots,$$
$$\displaystyle{{f}_{{n}}{\left({n}\right)}}={n}{f{{\left({1}\right)}}}-{\left({n}-{1}\right)}{f{{\left({0}\right)}}}-{\sum_{{{k}={2}}}^{{n}}}{\left({n}-{k}+{1}\right)}={n}{f{{\left({1}\right)}}}-{\left({n}-{1}\right)}{f{{\left({0}\right)}}}-{\frac{{{n}{\left({n}-{1}\right)}}}{{{2}}}}$$
###### Have a similar question?
James Kilian
Easily you can determine that for the homogeneous recurrence equation
$$\displaystyle{{f}_{{{k}+{1}}}^{{h}}}-{{2}_{{k}}^{{h}}}+{{f}_{{{k}-{1}}}^{{h}}}={0}$$
the solution is
$$\displaystyle{{f}_{{k}}^{{h}}}={c}_{{1}}+{c}_{{2}}{k}$$
now, a particular solution which should be polynomial, you can propose
$$\displaystyle{{f}_{{k}}^{{p}}}={c}_{{1}}+{c}_{{2}}{k}+{c}_{{3}}{k}^{{2}}$$
and the coefficient's determination is obtained by substitution in
$$\displaystyle{{f}_{{{k}+{1}}}^{{p}}}-{2}{{f}_{{k}}^{{p}}}+{{f}_{{{k}-{1}}}^{{p}}}+{1}={0}$$
obtaining the condition
$$\displaystyle{1}+{2}{c}_{{3}}={0}\Rightarrow{c}_{{3}}=-{\frac{{{1}}}{{{2}}}}$$
and finally
$$\displaystyle{f}_{{k}}={{f}_{{k}}^{{h}}}+{{f}_{{k}}^{{p}}}={c}_{{1}}+{c}_{{2}}{k}-{\frac{{{1}}}{{{2}}}}{k}^{{2}}$$