1

My question is based on the fact that if there is any special program, that allows to graph certain peculiar functions such as the following, $$f(x)=\begin{cases} 1, & \text{ if } x\in\mathbb Q; \\ 0, & \text{ if } x\notin \mathbb Q. \end{cases}$$ Or, $$g(x)=\begin{cases} 0, & \text{ if } x\in(\mathbb R\setminus \mathbb Q)\cup \{0\}, \\ 1/q & \text{ if } x=p/q,\ \gcd(p,q)=1,\ p\neq 0. \end{cases}$$

Blue
  • 75,673
James A.
  • 824
  • 6
    Graphing $f(x)$ is quite problematic, as computers (having finite decimal expansions) effectively consider every real number rational. – Blue Apr 26 '21 at 07:57
  • 3
    Graphing $f(x)$ is impossible, computer or no computer. Given any real number $(r)$, rational or irrational, and any $\delta > 0$, no matter how small, there will be both a rational and an irrational number in the neighborhood around $(r)$, of radius $\delta.$ – user2661923 Apr 26 '21 at 08:23
  • 2
    Graphing $g(x)$ is impossible as well. The reason is the same. – Peter Apr 26 '21 at 08:24
  • 1
    The image of that function will look like function const = 0 because rationals have 0 measure, whole measure is in irrational numbers. – robin3210 Apr 26 '21 at 08:39
  • Ah ok, thank you very much for clarifying my doubt about those two functions. – James A. Apr 26 '21 at 18:57
  • One has to wonder why $0$ gets to be an honorary irrational in the second function, rather than have $g(0) = 1$ like all the other integers. – Paul Sinclair Apr 26 '21 at 20:15

0 Answers0