Question:medium

Which of the following function is discontinuous at every point of \(\mathbb{R}\)?

Show Hint

Functions defined piecewise on rationals/irrationals are continuous only at points where the defining rules give the same value. To find points of continuity for \(f(x) = \begin{cases} g(x) & x \in \mathbb{Q}
h(x) & x \notin \mathbb{Q} \end{cases}\), solve \(g(x)=h(x)\). If there are no solutions, the function is discontinuous everywhere (assuming g and h are continuous).
Updated On: Feb 10, 2026
  • \( f(x) = \begin{cases} 1, & \text{if } x \text{ is rational}
    -1, & \text{if } x \text{ is irrational} \end{cases} \)
  • \( f(x) = \begin{cases} x, & \text{if } x \text{ is rational}
    0, & \text{if } x \text{ is irrational} \end{cases} \)
  • \( f(x) = \begin{cases} x, & \text{if } x \text{ is rational}
    2x, & \text{if } x \text{ is irrational} \end{cases} \)
  • \( f(x) = \begin{cases} x, & \text{if } x \text{ is rational}
    -x, & \text{if } x \text{ is irrational} \end{cases} \)
Show Solution

The Correct Option is A

Solution and Explanation

Step 1: Continuity Concept:
A function \(f\) is continuous at \(c\) if \( \lim_{x \to c} f(x) = f(c) \). For piecewise functions on rationals and irrationals, the limit \( \lim_{x \to c} f(x) \) exists only if both pieces approach the same value as \( x \to c \). If this limit doesn't exist for any \( c \in \mathbb{R} \), the function is discontinuous everywhere. This is because both rationals and irrationals are dense in \(\mathbb{R}\).

Step 2: Examples:

A. Dirichlet-like Function: \( f(x) = 1 \) for rational \(x\), and \( f(x) = -1 \) for irrational \(x\). At any \(c\), there are both rational and irrational numbers nearby. Therefore, \(f(x)\) oscillates between 1 and -1 as \(x\) approaches \(c\), and the limit \( \lim_{x \to c} f(x) \) does not exist for any \(c\). The function is discontinuous everywhere.
B. Thomae-like Function: \( f(x) = x \) for rational \(x\), and \( f(x) = 0 \) for irrational \(x\). Continuity is possible only where the pieces meet, i.e., at \( c = 0 \). At \(c=0\), \( \lim_{x \to 0} f(x) = 0 \) and \(f(0)=0\). The function is continuous at \(x=0\) and discontinuous elsewhere.
C. \( f(x) = x \) for rational \(x\), and \( f(x) = 2x \) for irrational \(x\): Continuity is possible only where \( c=2c \), which means \( c=0 \). At \(c=0\), \( \lim_{x \to 0} f(x) = 0 \) and \(f(0)=0\). The function is continuous at \(x=0\) and discontinuous elsewhere.
D. \( f(x) = x \) for rational \(x\), and \( f(x) = -x \) for irrational \(x\): Continuity is possible only where \( c=-c \), which means \( c=0 \). At \(c=0\), \( \lim_{x \to 0} f(x) = 0 \) and \(f(0)=0\). The function is continuous at \(x=0\) and discontinuous elsewhere.
Step 3: Conclusion:
Only example (A) is discontinuous at every point in \(\mathbb{R}\).
Was this answer helpful?
0