# If $f:D\to \mathbb{R}$ is continuous and exists $(x_n)\in D$ such as that $x_n\to a\notin D$ and $f(x_n)\to \ell$ then $\lim_{x\to a}f(x)=\ell$?

Assertion: If $f:X\setminus\left\{a\right\}\to \mathbb{R}$ is continuous and there exists a sequence $(x_n):\mathbb{N}\to X\setminus\left\{a\right\}$ such as that $x_n\to a$ and $f(x_n)\to \ell$ prove that $\lim_{x\to a}f(x)=\ell$

I have three questions: 1) Is the assertion correct? If not, please provide counter-examples. In that case can the assertion become correct if we require that $f$ is monotonic, differentiable etc.?

2)Is my proof correct? If not, please pinpoint the problem and give a hint to the right direcition. Personally, what makes me doubt it are the choices of $N$ and $\delta$ since they depend on another

3)If the proof is correct, then is there a way to shorten it?

My Proof:

Let $\epsilon>0$. Since $f(x_n)\to \ell$ $$\exists N_1\in \mathbb{N}:n\ge N_1\Rightarrow \left|f(x_n)-\ell\right|<\frac{\epsilon}{2}$$ Thus, $\left|f(x_{N_1})-\ell\right|<\frac{\epsilon}{2}$ and by the continuity of $f$ at $x_{N_1}$, $$\exists \delta_1>0:\left|x-x_{N_1}\right|<\delta_1\Rightarrow \left|f(x)-f(x_{N_1})\right|<\frac{\epsilon}{2}$$ Since $x_n\to a$, $$\exists N_2\in \mathbb{N}:n\ge N_2\Rightarrow \left|x_n-a\right|<\delta_1$$ Thus, $\left|x_{N_2}-a\right|<\delta_1$ and by letting $N=\max\left\{N_1,N_2\right\}$, \begin{gather} 0<\left|x-a\right|<\delta_1\Rightarrow \left|x-x_N+x_N-a\right|<\delta_1\Rightarrow \left|x-x_N\right|-\left|x_N-a\right|<\delta_1\\ 0<\left|x-a\right|<\delta_1\Rightarrow \left|x-x_N\right|<\delta_1+\left|x_N-a\right| \end{gather} By the continuity of $f$ at $x_N$, $$\exists \delta_3>0:0<\left|x-x_N\right|<\delta_3\Rightarrow \left|f(x)-f(x_N)\right|<\frac{\epsilon}{2}$$ Thus, letting $\delta=\max\left\{\delta_1+\left|x_N-a\right|,\delta_3\right\}>0$ we have that, \begin{gather} 0<\left|x-a\right|<\delta\Rightarrow \left|x-x_N\right|<\delta\Rightarrow \left|f(x)-\ell+\ell-f(x_N)\right|<\frac{\epsilon}{2}\Rightarrow \left|f(x)-\ell\right|-\left|f(x_N)-\ell\right|<\frac{\epsilon}{2}\\ 0<\left|x-a\right|<\delta\Rightarrow\left|f(x)-\ell\right|<\left|f(x_N)-\ell\right|+\frac{\epsilon}{2}<\frac{\epsilon}{2}+\frac{\epsilon}{2}=\epsilon \end{gather} We conclude that $\lim_{x\to a}f(x)=\ell$

EDIT: The proof is false. One of the mistakes is in this part:

"Thus, letting $\delta=\max\left\{\delta_1+\left|x_N-a\right|,\delta_3\right\}>0$ we have that, \begin{gather} 0<\left|x-a\right|<\delta{\color{Red} \Rightarrow} \left|x-x_N\right|<\delta{\color{Red} \Rightarrow} \left|f(x)-\ell+\ell-f(x_N)\right|<\frac{\epsilon}{2}\end{gather}"

-
You haven't said what $X$ is. Is it a subset of $\mathbb R$? –  Jonas Meyer Jul 15 '12 at 19:13
Yes. It is a susbest of $\mathbb{R}$ –  Nameless Jul 15 '12 at 19:33

Your assertion is wrong. A counterexample is for instance given by the sign function, $sgn : \mathbb R \rightarrow \mathbb R$. The sign function is continuous on $\mathbb R\backslash \{0\}$, but $$\lim_{n\rightarrow \infty} sgn(1/n) = 1,$$

and $$\lim_{n\rightarrow \infty} sgn(-1/n) = -1.$$ Here $(1/n)$ and $(-1/n)$ are both sequences that converge to zero, but the sequences $(sgn(1/n))$ and $sgn(-1/n)$ are very much different.

The mistake in your proof is that the distance between an arbitrary point $x$ that is close to $a$ and members of the sequence does not become arbitrary small, so you don't have something like for all $\delta_3$ there is an $N_3$ such that $$\vert x-x_n\vert≤\delta_3, ~~\text{for } n≥N_3.$$ But your proof would need something like this.

In our counterexample with the function $sgn$ this more or less means that if the sequence is given by $-(1/n)$ then I know something about $sgn(x)$ for negative $x$, but I can not say anything about the function values for positive $x$.

-
How should we restict the sequence $x_n$ then? –  Nameless Jul 15 '12 at 19:26
Don't you mean $\left|x-x_n\right|\le \delta_3$ for $n\ge N_3$? I never implied that. In which line exactly is the fault located? –  Nameless Jul 15 '12 at 19:32
heuristically speaking, you would need something like a "spacefilling" sequence for your assertion to be true. Also you say in the equation that follows the sentence "By the continuity of f ..." that all $x$ for which $\vert x-x_N\vert ≤ \delta_3$ those $x$ also suffice $\vert f(x)-f(x_n)\vert < \epsilon/2$. But you forgot to think about what $x$ suffice $\vert x-x_N\vert ≤ \delta_3$ in the first place. –  h.h.543 Jul 15 '12 at 19:43
Does it matter? We don't want to prove the existence of such $x$ but rather the implication ($\Rightarrow$) for the limit. Isn't that right? –  Nameless Jul 15 '12 at 19:50

Another example: Let $f:\mathbb R\setminus\{0\}\to\mathbb R$ be defined by $f(x)=\mathrm{sign}(x)$, $x_n=\frac{1}{n}$. This example is also monotone and differentiable. However, it is not uniformly continuous, and a uniformly continuous function will have a limit at $a$.

-

You need to have $f(x_n) \to l$ for all sequences $x_n \to a$, not just one sequence.

For example, let $a=(0,0)$ with $f(x,y) = \frac{x y}{x^2+y^2}$. This is continuous on $\mathbb{R}^2 \setminus \{a\}$, and the sequence $x_n=(\frac{1}{n},0) \to a$, with $f(x_n) \to 0$ (excuse abuse of notation), but $f$ is not continuous at $a$.

-
@JonasMeyer: Yes, that is a much better counterexample. –  copper.hat Jul 15 '12 at 19:18
I can prove that this is true if we have the ''all sequences'' part. The question is how can we determine a limit with just one sequence –  Nameless Jul 15 '12 at 19:25
As all of the answers above show; you can't without additional constraints. –  copper.hat Jul 15 '12 at 19:27
I agree. What are these are the additional constraints? Uniform continuity is one example. What can we say about the sequence (positive, monotonic) etc. –  Nameless Jul 15 '12 at 19:40
If you are in $\mathbb{R}$, you just need the left and right limits to have the same finite value. Then you can define $f$ to have the appropriate value there. –  copper.hat Jul 15 '12 at 19:45

There are some important examples in complex analysis, say $D$ is the unit disk in $\mathbb C = \mathbb R^2$ (so not in $\mathbb R$ as in this question). Some examples of functions, analytic and hence continuous in $D$ are studied, where radial limits exist, but not tangential limits. These will be counterexamples to what you ask in that case.

-