Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

we know, the Dirichlet function as: $$ f(x) = \begin{cases} 1, &\text{if } x \text{ is irrational; and } \\ 0, &\text{if }x \text{ is rational}. \end{cases} $$ R.A. Silverman in his book Modern Calculus says that this wild function cannot be plotted at all while M.R.Spiegel in the book Advanced Calculus constructed a graph of $f(x)$ as two parallel lines with $x$-axe, gone via $1$ and $0$. The second athour says: The graph is shown in the adjoining Fig. 2-3. From its appearence it would seem that there are two functional values $0$ and $1$ corresponding to each value of $x$, i.e. that $f(x)$ is multiple-valued, whereas it is actually single-valued. What happens in these two point of views?

enter image description here

share|cite|improve this question
up vote 8 down vote accepted

Silverman would deny that this picture counts as "plotting" the function. What look like two solid lines are actually not solid at all: the top line contains only points whose $x$ coordinate is irrational, and the bottom line contains only points whose $x$ coordinate is rational. These facts are impossible to show in a picture.

share|cite|improve this answer
So the second athour made a mistake for showing this function as I attached it above? – Babak S. May 17 '12 at 1:03
Well, the picture is very informal. It is perhaps overdoing things to say that it looks multiple-valued. – André Nicolas May 17 '12 at 1:26
No, it's not a mistake. Spiegel is quite aware of the situation, which is why he makes that remark you quoted. – Robert Israel May 17 '12 at 1:27
Define "plot" a function -- what does it mean to count as plotting a function? Until then, I don't think there is much to say. And when you do try to define it, all kinds of complexities will crawl out from under the rock, including what it means to plot even "ordinary" functions. I think Speigel was not intending any actual mathematical assertion, just noting the conundrum of "plot". The key is "From its appearence it would seem..." – David Lewis May 17 '12 at 2:32

An interesting answer with the plot of an approaching function is given here.

share|cite|improve this answer

It is impossible to plot the graph of such a function because there are breaks (infinitely many discontinuities).

share|cite|improve this answer
Maybe you should consider the density of the rationals and irrationals. In order to answer questions you must fundament more deeply your answers. – rlartiga May 21 '14 at 3:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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