I do not know an example. Will ask question if in doubt of the proofs provided thank you!!
Give an example of a function $f: \mathbb{R} \to \mathbb{R}$ which is continuous only at $0$.
5
$\begingroup$
real-analysis
functions
-
1http://math.stackexchange.com/q/194194 – 2012-10-16
3 Answers
3
$ f(x) = \left\{ \begin{array}{rl} x^{2} &\mbox{ if $x$ is rational} \\ -x^{2} &\mbox{ otherwise} \end{array} \right. $
13
Let $g(x)=1$ if $x$ is rational, and $0$ if $x$ is irrational. Let $f(x)=xg(x)$.
4
$ F(x) = \left\{ \begin{array}{rcl} x,& \mbox{if} & x \in \mathbb{Q}\\ -x , & \mbox{if} & x \notin \mathbb{Q} \\ \end{array} \right. $
$|x-0| < \varepsilon \Rightarrow |f(x) - f(0)| = |x| <\varepsilon$. If $x_0 > 0$. There is $x \notin \mathbb{Q}$ sufficiently near $x_0$ such that $f(x) = -x$ is sufficiently near $-x_0$. Thus do not sufficiently near $f(x_0) = x_0$.
-
0That's much easier really... the indicator function for Z should do the trick. – 2012-10-17