I was just working on a Math Subject GRE practice test, and I got the following problem wrong:
Let $f$ be the function defined on the real line by
$\displaystyle f(x) = \begin{cases} \displaystyle \frac{x}{2} &\mbox{if } x \text{ is rational}, \\ \displaystyle \frac{x}{3} & \mbox{if } x \text{ is irrational}. \end{cases}$
If $D$ is the set of points of discontinuity of $f$, then $D$ is the
$(A)\, \text{Empty set} \\ (B)\, \text{set of rational numbers}\\ (C)\, \text{set of irrational numbers}\\ (D)\, \text{set of nonzero real numbers}\\ (E)\, \text{set of real numbers}\\ $
I chose $(E)$, the set of real numbers, since this set is clearly discontinuous at both every rational number and every irrational number. However, the answer key told me the answer is $(D)$, the set of nonzero real numbers.
I find this very confusing because, as far as I know, $0$ is a rational number, since it can be written in the form $\displaystyle \frac{0}{q}$, for any integer $q$. Can $0$ also be irrational? I've been looking online to figure that out, and everywhere I've looked has told me that $0$ is only rational. Are they all wrong, or is there some other reason why $0$ is not a point of discontinuity?
I'm very confused :(
Your initial reasoning is mostly correct; however, you are missing a subtlety here: $f$ is continuous at $0$ because, loosely speaking, the behavior of $x/2$ and $x/3$ in a sufficiently small neighborhood of $0$ are such that they tend to the same limit. If the function had been $$f(x) = \begin{cases} x/2 & x \in \mathbb Q, \\ x/2 + 1 & x \not\in \mathbb Q, \end{cases}$$ then this function is not continuous anywhere on the real line.