Let $f$ a continuous function for all its domain and the sequence: \begin{eqnarray*} a_{1}=x_{0}, \hspace{0.5cm}a_{n}=f(a_{n-1}) \end{eqnarray*} for each $n\geq 2$. Show that if the sequence converges to a value $a\in D_{f}$ then $f(a)=a$.
My sketch
To show that $f(a)=a$ I will show that, for $\varepsilon >0$: \begin{eqnarray*} |f(a)-a|< \varepsilon \end{eqnarray*} and I know that: \begin{eqnarray*} |f(a)-a|&=&|f(a)-a_{n}+a_{n}-a|\\ &\leq&|f(a)-a_{n}|+|a_{n}-a|\\ &=&|f(a)-f(a_{n})|+|a_{n}-a| \end{eqnarray*} For hypotesis I know that sequence converges to $a\in D_{f}$ that is: For all $\varepsilon>0 $, exist $N\in \mathbb{N}$ such that, if $n\geq N$: \begin{eqnarray} |a_{n}-a|<\frac{\varepsilon}{2} \end{eqnarray} and by other hand, I know that function is continuous in every point in its domain, so, using the convergent sequence and $f$ I have that for all $\varepsilon >0$ and $\delta=\varepsilon$ for all points in the sequence I have that $|a_{n}-a|<\delta$ then: \begin{eqnarray} |f(a_{n})-f(a)|<\frac{\varepsilon}{2} \end{eqnarray} Then: \begin{eqnarray} |f(a)-a|&\leq& |f(a)-f(a_{n})|+|a_{n}-a|\\ &\leq& \frac{\varepsilon}{2}+\frac{\varepsilon}{2}\\ &=& \varepsilon \end{eqnarray} therefore, like $\varepsilon$ is arbitrary, then $f(a)=a$.
Is this correct? or I have to consider other way?