6

For a function $f: U \to \mathbb{R}$ where $U$ is a subset of $\mathbb{R}$, it seems like that it being continuous at a point doesn't imply that there is a neighbourhood of the point where it can be continuous. Similarly, it seems like that it being differentiable at a point doesn't imply that there is a neighbourhood of the point where it can be differentiable. I was wondering if there are some counterexamples to confirm the above?

Added:

What are some necessary and/or sufficient conditions for continuity/differentiability at a point and in some neighbourhood of the point to be equivalent?

Can the case of continuity be generalized to mappings between topological spaces?

Thanks and regards!

Tim
  • 47,382

2 Answers2

5

Define $f$ by putting $f(x) = 1$ if $x$ is rational and $f(x) = 0$ if $x$ is irrational. Let $g(x) = x \cdot f(x)$ and let $h(x) = x^2 \cdot f(x).$

$g$ is continuous at $x=0$ and $g$ is not continuous at each $x \neq 0.$

$h$ is differentiable at $x=0$ and $h$ is not differentiable at each $x \neq 0.$

(In fact, $g$ is also not differentiable at $x=0$ and $h$ is not continuous at each $x \neq 0$.)

  • 1
    +1. Thanks! Do you know what are some necessary and/or sufficient conditions for continuity/differentiability at a point and in some neighbourhood of the point to be equivalent? – Tim Feb 10 '12 at 20:44
3

Any function $f$ on $[-1,1]$ with $|f(x)| \le x^2$ is differentiable at $0$. You could e.g. take $f(x) = x^2$ when $x$ is rational and $-x^2$ when $x$ is irrational.

Robert Israel
  • 448,999
  • 1
    +1. Thanks! I wonder what are some necessary and/or sufficient conditions for continuity/differentiability at a point and in some neighbourhood of the point to be equivalent? – Tim Feb 10 '12 at 20:42