TITLE: Necessary & sufficient conditions on the parameters in a recursive sequence
QUESTION [5 upvotes]: For $a,b\in\mathbb R$ the sequence $(x_n)_{n\in\mathbb N}$ is defined
  recursively: $$x_1:=b,\;\;x_{n+1}=x_n^2+(1-2a)x_n+a^2$$ What is the
  necessary condition on $a,b$ and what the sufficient condition for the
  sequence to converge? Then evaluate $\displaystyle\lim_{n\to\infty}x_n$.

My attempt:
As far as I'm concerned, I'm required to prove the sequence $(x_n)_{n\in\mathbb N}$ is a Cauchy sequence,i.e., 

the elements become arbitrarily close to each other as the sequence
  progresses.

$$f(x):=x_n$$
Since the sequence can be represented by a parabola, I chose the vertex as the candidate for the limit $L\in\mathbb R$, and therefore:
$$\forall x_n\in [L, b]$$
or more precisely by the definition,
$$(\forall\varepsilon>0)(\exists n_{\varepsilon}\in\mathbb N)(\forall n\in\mathbb N)((n>n_{\varepsilon})\implies(|x_n-L|<\varepsilon))$$
$$\forall x_n\in[L,b]\;x_n\in\mathcal R_f$$
Using the usual method (and the fact the limit is a fixed point of $f$):
$$L=L^2-(1-2a)+a^2\iff (L-a)^2=0\implies L=a$$
$$b\in\Gamma_f\implies b\geq 0$$
But, I don't know the answer what the necessary and what the sufficient condition on the parameters $a,b$ is. May I ask for advice on how to end the problem and correction for possible mistakes?

REPLY [3 votes]: From the recurrence formula, if $x_n$ converges, it's limit is $a$.
This becomes more intuitive if you look at $x_n - a$ instead of $x_n$ and you write the recurrence formula as
$$x_{n+1}-a = (x_n-a)^2+(x_n-a)$$
$x_n$ converges when $y_n:=x_n-a$ converges and notice that $y_n$ is increasing. The problem now becomes casework on the initial term $y_1 := b-a$ with the recurrence $y_{n+1} =y_n^2+y_n$. It diverges when $y_1< -1$ and $y_1 >0$, and converges when $y_1 \in [-1,0]$. So the condition is $b \in [a-1,a]$ (both necessary and sufficient).