Continuous functions preserve convergent sequences (source code)

= Continuous functions preserve convergent sequences
{title2=$x_n\to a\ \Longrightarrow\ f(x_n)\to f(a)$}

For $f:D\to\mathbb R$ and $a\in D$, <continuity> at $a$ is equivalent to the following condition: every <sequence> $(x_n)$ in $D$ with $x_n\to a$ satisfies $f(x_n)\to f(a)$. This is useful when a <numerical method> or a <proof> approaches a point through successively refined <function inputs>: applying a <continuous function> preserves the intended <limit>.

For the forward direction, choose $\delta$ from the <epsilon-delta definition of continuity>. A <convergent sequence> eventually lies in that input window, so its <function outputs> eventually lie in the requested output band. Conversely, if <continuity> fails, there is some $\varepsilon_0>0$ for which every input window contains an allowed $x$ with $|f(x)-f(a)|\geq\varepsilon_0$. Choosing such an $x_n$ within $1/n$ of $a$ gives $x_n\to a$ while $f(x_n)$ does not tend to $f(a)$. This converse relies on the countable shrinking windows available in <metric spaces>; a general <topological space> needs a different formulation.