# Continuity of a Function with sequences

Let $f(x)$ be a function and $r \in \mathbb{R}$. Prove the following,

$$\lim_{x \rightarrow r}f(x) = f(r) \iff \lim_{n \rightarrow \infty} f(a_n) = f(r)$$

$\forall \{a_n \}^\infty_{n=1} \rightarrow r$

Breaking the statements up into their definitions, we have,

$\lim_{x \rightarrow r}f(x) = f(r)$ : $\forall \epsilon>0, \exists\delta>0 : |x-r|<\delta \Rightarrow |f(x) - f(r)| < \epsilon$

$\lim_{n \rightarrow \infty} f(a_n) = f(r) : \forall \epsilon>0, \exists\delta>0 : |a_n-r|<\delta \Rightarrow |f(a_n) - f(r)| < \epsilon$

$\{a_n \}^\infty_{n=1} \rightarrow r: \forall\epsilon > 0, \exists N > 0: \forall n> N\Rightarrow |a_n -r|<\epsilon$

• Break both sides into their definitions, and spot the places you have to patch up. You can do this much at least. – астон вілла олоф мэллбэрг Apr 27 '17 at 5:17
• I can prove the $\Rightarrow$ direction but I am having problems with the converse direction – Limzy Apr 27 '17 at 5:59

For $\implies$, given a sequence $a_n \to r$, we need to show that $f(a_n) \to f(r)$. Let $\epsilon > 0$, we know that there is $\delta > 0$ so that $|x-r| < \delta \implies |f(x)-f(r)| < \epsilon$. Pick $N \in \mathbb N$ so that $n > N \implies |a_n -r | < \delta$, then see that $|f(a_n) - f(r)| < \epsilon$. Hence, this direction is complete.
Suppose that $\lim_{x \to r}f(x) \neq f(r)$. Then, there is a $\epsilon > 0$, such that for all $\delta > 0$, there is an $x$ such that $|x - r | < \delta$ but $|f(x) - f(r)| > \epsilon$. (This is the negation of the limit definition).
Now, let's define a sequence $a_n$ as follows : if we take $\delta = \frac 1n$ above, then there is $x$(depending on $n$, since $\delta$ is changing with $n$) such that $|x - r | < \delta$ but $|f(x) - f(r)| > \epsilon$. We let $a_n = x$.
Then, note that $a_n \to r$,since we have $|a_n - r| < \frac 1n$, but $f(a_n) \not\to f(r)$, since $|f(a_n) - f(r)| > \epsilon$ for all $n$. This contradicts the fact that for all sequences $a_n$ going to $r$, $f(a_n) \to f(r)$.