0

Define a function $f$ on the subset $\{0\}\cup\bigcup\left\{\left(\frac1{n+1},\frac1n\right)\middle|\ n\in\mathbb N\right\}$ of $[0,1]$ as follows: $$ f(x) = \begin{cases} 1, &\text{if $n\in\mathbb N$ and $\frac1{2n+1}<x<\frac1{2n}$}; \\ -1, &\text{if $n\in\mathbb N$ and $\frac1{2n}<x<\frac1{2n-1}$}; \\ 0, &\text{if $x=0$}. \end{cases} $$

The function $f$ is constant, and therefore certainly continuous, on each of the intervals that make up its domain, including the degenerate interval $\{0\}$. But $f$ is not a continuous function; although it is continuous at every other point of its domain, it is not continuous at $0$.

In the above example, $f$ is continuous on the interval $[0,0]$, but is discontinuous at $0$. Firstly, does that make sense? Secondly, why is there a discontinuity at $0$? Is it because the intervals $(1/(n+1),1/n)$ become progressively closer to $0$, but alternate between function values of $-1$ and $1$, so there is no limit as $x\to 0$? As a counter-argument, surely we only take the open intervals $(1/(n+1),1/n)$ so that $\{0\}$ is an isolated point.

kennytm
  • 7,495
ahorn
  • 2,236

2 Answers2

4

Any function defined on a point $x_0$ is continuous on the "interval" $\{x_0\}$.

This is because, by definition, a function is continuous on $\{x_0\}$ if:

For every $\epsilon >0$, there exists $\delta >0$ sucht that for every $x\in \{x_0\}$ such that $|x-x_0|<\delta$, we have $|f(x_0)-f(x)|<\epsilon$.

This condition is simple to acchieve, since we only have one $x\in\{x_0\}$, and for that $x$, $f(x)-f(x_0)=0.$


The function is not continuous at $0$ because it is not true that:

For every $\epsilon >0$, there exists $\delta >0$ sucht that for every $x\in \mathcal D(f)$ such that $|x-x_0|<\delta$, we have $|f(x_0)-f(x)|<\epsilon$.

You can see this by setting $\epsilon =\frac12$ and showing that no matter what $\delta$ you pick you can always find an $x$ such that $|x-0|\leq \delta$ and $|f(x)-f(0)|>\epsilon$. Specifically, if you take $x$ to be between $\frac{1}{2n}$ and $\frac{1}{2n-1}$, you will have $|f(x)-f(0)|=1$.

5xum
  • 123,496
  • 6
  • 128
  • 204
0

The text is saying that the restriction of $f$ to each of the intervals that make the domain is a continuous function; the reason is that all these restrictions are constant.

So, yes, (the restriction of) the function can be continuous on $\{0\}$ without the function being continuous at $0$. More precisely, (the restriction of) the function is continuous on $\{0\}$ like any (restriction of a) function defined at $0$.

Why is the function not continous at $0$? Because you can find points arbitrarily close to $0$ where the function differs from the value at $0$ by more than $1/2$.

The situation would be different if the domain of $f$ is the union of open intervals over which the function is continuous; then $f$ would be globally continuous.

egreg
  • 238,574
  • Are the intervals in the domain of $f$ not all open because ${0}$ is a non-open interval included in the domain? Specifically, does you last statement hold because $\inf \bigcup{(1/(n+1),1/n)|n\in \mathbb N}=0$ and ${0}$ is included in the domain? – ahorn May 12 '16 at 07:33
  • 1
    @ahorn More precisely, you can't represent the domain as the union of open intervals. – egreg May 12 '16 at 08:17