I practicing some exercises in real analysis. I came to following question.
Question Iet $A\subseteq B\subseteq\mathbb{R}$ and let $f:B→\mathbb{R}$ and $g$ be restriction of $f$ to $A$ then, show that by example, if $g$ is continuous at $c$ then it need not follows that $f$ is continuous at $c$
My attempt: since $g$ is continuous at $c$ so that, $\lim_{x \to c} g(x)= g(c)=f(c)$ but this need not be equal to $\lim_{x \to c} f(x)$ and hence $f$ need not be continuous at point $c$ .
But Question asked for example. I saw hint that, take $f(x)=sgn(x)$ on $B=[0,1]$ and $g(x)=sgn(x)$ on $A=(0,1]$ and $c=0$.
But i didn't understand this example!
Because, as point $c=0$ is not in domain of $g(x)$ and hence how can be $g$ is continuous at point $c$?
(Since what i know, for contnuity of any function $f$ at a point $c$ we must have $f$ is defined at point $c$, $\lim_{x \to c} f(x)$ must exist and these two values i.e $f(c)$ and $\lim_{x \to c} f(x)$ must be equal)
So above example in hint is wrong? Am i correct? Is there is any other example? Please help.
Yes, the hint is wrong by the reason that you have mentioned: $0$ does not belong to the domain of $g$.
Instead, take $A=[0,\infty)$, $B=\Bbb R$, $c=0$,$$f(x)=\begin{cases}1&\text{ if }x\geqslant0\\0&\text{ otherwise,}\end{cases}$$and, of course, $g=f|_A$.