I was asked to find a function that is continuous on Z but discontinuous on R\Z. as I'm new to continuity I want a feedback on the function I've created, and also tips on what to look for in these types of question!

$f: \mathbb{R}\to \mathbb{R}$ such that \begin{align} f(x) = \begin{cases} 1 & \text{if $x\notin \mathbb{Z}$} \\ \lfloor x \rfloor & \text{if $x \in \mathbb{Z}$} \end{cases} \end{align}

  • $\begingroup$ That one is continuous for $1≤x<2$, for example. $\endgroup$ – lulu Dec 28 '20 at 17:31
  • $\begingroup$ A tip for this type of question: to show continuity at a point $x\in\mathbb{R}$, you can apply the usual $\epsilon$-$\delta$ definition of continuity. Do you know it? $\endgroup$ – JWP_HTX Dec 28 '20 at 17:32
  • $\begingroup$ To get started, I suggest looking at the function defined on rationals by $f\left(\frac pq\right)=\frac pq$ and by $f(x)=0$ if $x$ is irrational. Show that $f$ is continuous only at $x=0$. Use that to build your example. $\endgroup$ – lulu Dec 28 '20 at 17:33
  • $\begingroup$ $\lfloor x \rfloor =x$ when $x \in \mathbb Z$ so you suggestion is continuous if $x=1$ or $x \in \mathbb R \backslash \mathbb Z$, but is discontinuous if $x \in \mathbb Z \backslash \{1\}$. Almost the opposite of what you are asking for $\endgroup$ – Henry Dec 28 '20 at 18:01

Actually, the function is discontinuous at every integer other than $1$.

You can take, for instance,$$f(x)=\begin{cases}\sin(\pi x)&\text{ if }x\in\Bbb Q\\0&\text{ otherwise.}\end{cases}$$Can you check that it works?

  • $\begingroup$ I guess any non-zero value would work in place of $\sin(\pi x)$? $\endgroup$ – Al.G. Dec 28 '20 at 18:12
  • $\begingroup$ If I put $1$ instead of $\sin(\pi x)$, then I get a function which is discontinuous everywhere. $\endgroup$ – José Carlos Santos Dec 28 '20 at 18:15
  • $\begingroup$ Oh I get it, I misunderstood the question -- I was thinking about the restriction $f|_{\mathbb Z}$ being continuous (albeit on a discrete set...). $\endgroup$ – Al.G. Dec 28 '20 at 18:24
  • $\begingroup$ Nice! I've used your suggestion, but left f(x) = sin(πx) * D(x), D(x) being the derichlet fucntion, that way it will always be 0 on intergers, but not continuous on not integers! $\endgroup$ – MathCurious Jan 4 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.