Extending $f: (0,1]\mapsto\mathbb{R}$ to a continuous function from $[0,1]$ to $\mathbb R$

continuitydefinitionreal-analysis

Theorem

Consider the continuous function $f: (0,1]\mapsto\mathbb{R}$ defined by $f(x)=\sin(\frac{1}{x}).$ I have to answer the following question :

show that it is impossible to extend this
function to continuous function from
$[0,1]$ to $\mathbb R$

It is not clear to me what is the question asked me to show:

Is it asking me to show that $\sin(\frac{1}{x})$ is discontinuous ?

If not what is it asking me to do ,exactly?

This question is in the Compactness chapter.Either way best way to prove it
is to use proof by contradiction

PS:I thought of using Intermediate Value Theorem

Best Answer

The thing the question wants you to say is that it is not possible to define $f(0)$ which makes the function continuous on $[0,1]$.

To see that you define $f(0)=r$ say . for arbitrary $r\in\mathbb{R}$

You will get that for $\epsilon=\frac{1}{2}$. You have $\exists \,x$ such that

$|\sin(\frac{1}{x})-r|\geq \frac{1}{2}$ for all $\delta>0$ such that $0<|x|<\delta$.

So you see that no-matter how you define $f(0)$, you will end up with a discontinuity at $x=0$.