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}\).