Real Analysis · Moderate

Differentiability of a Rational-Irrational Function

Moderate Real Analysis question for IIT JAM · CSIR-NET · GATE. Choose an option, check your answer, then read the detailed solution.

Real AnalysisDifferentiability and ContinuityModerateIIT JAM · CSIR-NET · GATE17 November 2026

Question RA-047

Define f: R -> R by f(x) = x^2 if x belongs to Q and f(x) = 0 if x does not belong to Q. Which of the following is true?

Detailed Solution

We are given the function f(x) = x^2, if x belongs to Q, f(x) = 0, if x does not belong to Q. We examine the differentiability of f at x = 0 and at an arbitrary nonzero point. Step 1: Differentiability at x = 0. Since 0 belongs to Q, we have f(0) = 0. By the definition of derivative, f'(0) = lim(h->0) [f(h) - f(0)]/h. For rational h, we have f(h) = h^2. Therefore, [f(h) - f(0)]/h = h. For irrational h, we have f(h) = 0. Therefore, [f(h) - f(0)]/h = 0. Thus, the difference quotient is either h or 0. Consequently, |[f(h) - f(0)]/h| <= |h|. By the Squeeze Theorem, f'(0) = lim(h->0) [f(h) - f(0)]/h = 0. Hence, f is differentiable at x = 0 and f'(0) = 0. Step 2: Discontinuity at every nonzero point. Let a be any nonzero real number. Since both rational and irrational numbers are dense in R, there exist two sequences (r_n) and (s_n) such that r_n belongs to Q, s_n does not belong to Q, and r_n -> a, s_n -> a. Along the rational sequence, f(r_n) = r_n^2 -> a^2. Along the irrational sequence, f(s_n) = 0 -> 0. Since a is nonzero, a^2 is not equal to 0. Therefore, the two sequential limits are different, and hence f is discontinuous at x = a. Since differentiability implies continuity, f cannot be differentiable at any nonzero point. Step 3: Final conclusion. The function is differentiable at x = 0, with f'(0) = 0, and is not differentiable at any other point. Therefore, f is differentiable exactly at x = 0. Thus, the correct option is $\boxed{\mathrm{B}}$. Analysis of Options: Option A: FALSE. The function is differentiable at x = 0. Option B: TRUE. The function is differentiable exactly at x = 0, and f'(0) = 0. Option C: FALSE. The function is discontinuous at every nonzero rational point and hence cannot be differentiable there. Option D: FALSE. Although f is differentiable at 0, it is discontinuous at every nonzero real number. Hence, OPTION B IS THE UNIQUE CORRECT ANSWER.
Concepts tested: DifferentiabilityContinuityRational and Irrational NumbersDensity of Q and R\QSqueeze TheoremSequential Criterion for Continuity
💬 Discuss this problem
Have a doubt or a different approach? Continue the mathematics discussion on Telegram.
Join Telegram Discussion

Keep Practising

More Real Analysis Questions

Boundedness and Continuity of a Sum Involving a Derivative

AdvancedIIT JAM · CSIR-NET · GATE13 Nov 2026

Let f: R -> R be differentiable and suppose that |f(x)| <= 1 and |f'(x)| <= 1 for all x in R. Define g(x) = f(x) +…

Attempt Question →

Uniqueness of Fixed Points Using Rolle's Theorem

AdvancedIIT JAM · CSIR-NET · GATE21 Nov 2026

Let f: R -> R be differentiable with f'(x) != 1 for every x in R. Which of the following must be true?

Attempt Question →

Differentiability and Continuity of Derivatives

AdvancedIIT JAM · CSIR-NET · GATE19 Nov 2026

Define f: R -> R by f(x) = x^3 sin(1/x) for x != 0 and f(0) = 0. Which of the following is true?

Attempt Question →