I'd like to know how to find a general term for this recurrence:
$$a_{n+1}=a_n+(b-a_n)\cdot x, \text{where b, x are positive constants}$$
Background:
Linear interpolation equation for a starting point $a$ and ending point $b$ looks like this: $f(x)=(b-a)\cdot x$. I assume $x \in [0, 1]$. So for $x=1$ we are at the point $b$.
It is used in computer graphics to move things around :) Very often the parameters of the function are swaped, $x$ becomes constant and $a$ is taken from the previous iteration of a recursion. It gives an effect of homographic-function-like approaching to $b$ (there is a horizontal asymptote in $b$).
I want to find an exact solution for $a_n$. If I'm correct the relation is a following recurrence:
$$a_{n+1}=a_{n}+(b-a_n)\cdot x$$
I'm curious about the method to get the solution. Wolfram alpha gave me $$a(n)=c_1(1-x)^{n-1}-b(1-x)^n+b$$