# To show $f$ is continuous

Let $f:[0,1]\rightarrow \mathbb{R}$ is such that for every sequence $x_n\in [0,1]$, whenever both $x_n$ and $f(x_n)$ converges , we have $$\lim_{n\rightarrow\infty} f(x_n)=f(\lim_{n\rightarrow\infty}x_n),$$ we need to prove $f$ is continuous

well, I take $x_n$ and $y_n$ in $[0,1]$ such that $|(x_n-y_n)|\rightarrow 0$, and the given condition holds,Now enough to show $|f(x_n)-f(y_n)|\rightarrow 0$

I construct a new sequence $$z_1=x_1$$ $$z_2=y_1$$ $$\dots$$ $$z_{2n-1}=x_n$$ and $$z_{2n}=y_n$$

We see, that subsequence of $f(z_n)$ converges so it must be convergent to the same limit. Am I going in right path? please help.

-

Consider the function $f$ on $[0,1]$ defined by $f(0)=0$ and $f(x)=1/x$ for all $x \in (0,1]$. Then it satisfies the hypothesis but is not continuous on $[0,1]$. So the claim is false.  The claim is false because the antecedent requires both $(x_n)$ and $(f(x_n))$ to be convergent. And for all $(x_n)$ that converges to $0, (f(x_n))$ is not convergent and hence the antecedent is false. Therefore the implication stands true, yet the function is not continuous on $[0,1]$! – Kasun Fernando Jul 9 '12 at 14:07

## 1 Answer

I will prove a different claim because I have pointed out that what is mentioned here is wrong by a counter-example.

Let $f:[0,1]→\mathbb{R}$ is such that for every sequence $x_n∈[0,1]$ whenever $(x_n)$ converges , we have $\lim\limits_{n→∞}f(x_n)=f \left(\lim\limits_{n→∞}x_n \right)$ then $f$ is continous on $[0,1]$.

I think the best way is to use proof by contradiction. Assume $f$ is not continuous at $c \in [0,1]$ then there exist $\epsilon_{0} > 0$ such that for all $n \in \mathbb{N}$ there exist $x_{n} \in (c-1/n,c+1/n) \cap [0,1]$ such that $|f(x_n)-f(c)| \geq \epsilon_{0}>0$

Obviously $( x_n )$ converges to $c$ but $(f(x_n))$ does not converge to $f(c)$ ( Note that all the terms of $(f(x_n))$ are a positive distance away from $f(c)$ ) which is a contradiction with the given property of the function.

Since our choice of $c$ was arbitrary, we have that $f$ is continuous on $[0,1]$

-

are you assuming that $f(x_n)$ converges? why not $f(x_n)\rightarrow\infty$? – Taxi Driver Jul 9 '12 at 13:39
Who cares about $f(x_n)$, as long as it does not converge to $f(x)$? – Siminore Jul 9 '12 at 13:41
I am wondering where he is using the fact given about $x_n$ and $f(x_n)$ converges together. – Taxi Driver Jul 9 '12 at 13:42
Consider the function $f$ on $[0,1]$ defined by $f(0)=0$ and $f(x)=1/x$ for all non-zero $x$. Then it satisfies the hypothesis but is not continuous on $[0,1]$. So the claim is false.   What I have proven is the sequential criterion for continuity! – Kasun Fernando Jul 9 '12 at 14:00
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 56, "mathjax_display_tex": 6, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9459408521652222, "perplexity_flag": "head"}