I have been trying to solve this
$f(n) = 2 \cdot f(n-1) - f(n-2) + 2 \cdot k$
and failed , can anybody help ? $n>4$
The values of $ f(1) = a,\,f(2) = b,\, f(3) = c$ and $f(4) =d $
where $ a,b,c,d,k $ are constants
EDIT:
This is an example $ a=1/6 ,b =1/3 ,c =1/3 ,d = 1/2 $
$f(5)$ should be $1$
but by constant difference method I am not getting it
and sorry about this .. there is another piece of information $k = f(2) - f(1)$ (always)
P.S $ a,b,c,d $ can have different values than above .. i.e i need a general solution
Let $f(n)-f(n-1)=g(n)$. Then, we have $$g(n)-g(n-1)=2k.$$ Hence, we have $$g(n)=g(2)+2k(n-2),$$ i.e. $$f(n)-f(n-1)=f(2)-f(1)+2k(n-2).$$ Hence, for $n\ge 2$, we have $$\begin{align}f(n)&=f(1)+\sum_{i=2}^n\left(f(2)-f(1)+2k(i-2)\right)\\&=f(1)+(n-1)(f(2)-f(1))+2k\cdot\frac{(n-2)(n-1)}{2}\\&=\color{red}{kn^2+(f(2)-f(1)-3k)n+2f(1)-f(2)+2k}\end{align}$$ Note that this holds for $n=1$.