12
$\begingroup$

I have this question:

Find a function $f :\mathbb R \to\mathbb R$ which is discontinuous at the points of the set $\{\frac1n : n \text{ a positive integer}\} \cup \{0\}$ but is continuous everywhere else.

I really don't know what to do. I was thinking maybe: $$ f(x) = \begin{cases} 1 \quad&\text{if }x=0 \\ 0 &\text{if } x \text{ is in } \{\tfrac1n : n \text{ a positive integer}\}\\ x &\text{otherwise} \end{cases} $$ But that kind of seems like 'cheating'. Is there a better example?

EDIT: Would it be better to have:

$$ f(x) = \begin{cases} 1 &\text{if } x \text{ is in } \{\tfrac1n : n \text{ a positive integer}\}\cup \{0\}\\ 0 &\text{otherwise} \end{cases} $$

$\endgroup$
6
  • $\begingroup$ Looks like Thomae's function: en.wikipedia.org/wiki/Thomae's_function $\endgroup$ Commented Jan 25, 2013 at 13:35
  • $\begingroup$ Actually a later part of this question seems to involve that function. $\endgroup$ Commented Jan 25, 2013 at 13:38
  • 5
    $\begingroup$ That's not cheating at all, as long as the function is well defined (it certainly is) and it verifies the requisites (does it?) $\endgroup$ Commented Jan 25, 2013 at 14:11
  • $\begingroup$ It does verify the requisites right? f(x) = 0 as x tends to 0 but f(0)=1 which is not the same, so it's discontinuous at 0, Same for all the 1/n as well, unless I've got this very wrong. $\endgroup$ Commented Jan 25, 2013 at 16:38
  • 2
    $\begingroup$ I fully agree with @leonbloy. Since the function satisfies the assumptions, it is a correct answer. It is good in that it is simple, so you immediately see what happens. That possibly makes it better than any "natural" example. $\endgroup$ Commented Apr 8, 2013 at 8:11

3 Answers 3

3
$\begingroup$

You can modify the fractional part function: $ \{x\} = \lceil x \rceil - x $, which is discontinuous at integers; to

$$ f(x) = \begin{cases} 0 & ; x = 0 \\ \left\{\dfrac{1}{x}\right\} & ; otherwise \end{cases} $$

$\endgroup$
1
$\begingroup$

I'm going to assume your true question is finding an answer that you do not consider "cheating."

Question/Problem
Find a function $f:\mathbb{R}\to\mathbb{R}$ such that $f$ is discontinuous at each point in $K\overset{\text{def}}{=}\{\frac{1}{n}:n\in\mathbb{N}\text{ and }n\ne 0\}\cup\{0\}$ and $f$ is continuous at each point in the complement of $K$ which is denoted $(\mathbb{R}\setminus K)$

General Answer
Let $g:\mathbb{R}\to\mathbb{R}$ be an arbitrary continuous function. Let $\epsilon>0$ be an arbitrary positive real number.

Your edited answer has $g$ be the zero function and $\epsilon$ be $1$

Define $f:\mathbb{R}\to\mathbb{R}$ by $$f(x)=\begin{cases} g(x)+\epsilon&\text{if }x\in K\\ g(x)&\text{if }x\in(\mathbb{R}\setminus K) \end{cases}$$ for every $x\in\mathbb{R}$ where $K\overset{\text{def}}{=}\{\frac{1}{n}:n\in\mathbb{N}\text{ and }n\ne 0\}\cup\{0\}$.

The reason why I introduce "$K$" is because this method can be used for any given nowhere dense set $K$ where you want discontinuities. The set you were given is not special in any way for this problem. However it is a classic example of a compact set, but that's not relevant to your problem.

$\endgroup$
2
  • 1
    $\begingroup$ Your reason for introducing $K$ is misleading. The given set is special: it contains no open intervals. If $K = [0, \infty)$ your construction yields a function with only one point of discontinuity: $0$. $\endgroup$ Commented Jun 1, 2015 at 15:35
  • $\begingroup$ Post has been edited. (thanks) $\endgroup$ Commented Jun 5, 2015 at 8:39
0
$\begingroup$

Put $A = \{\frac{1}{n}\mid n \geq 1\}$ and

$$f: \mathbb{R} \to \mathbb{R}: x \mapsto \begin{cases} 0 \quad x \notin A\cup \{0\} \\ 1 \quad x \in A \cup \{0\} \end{cases}$$

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.