How to solve this recurrence relation?
- $f(1) = a;$
- $f(2) = b;$
- $f(x) = 2f(x-1)-f(x-2)+2;$
Where $a$ and $b$ are positive integers
I want to find $f(x)$ representation with $a$ and $b$ only
Also I am sorry, I really not familiar with it, I got into this as part of my development project
This is a linear recurrence relation. Look it up.
First, find the solutions to $f(n)=2f(n-1)+f(n-2) $.
Then find the solution to the whole equation. Hint: Try constant, $n, n^2,$ ... until you find something that works.
Add these to get the general solution.