Question:hard

Let \( f: \mathbb{R} \to \mathbb{R} \) be the function given by \[ f(x) = \begin{cases} \cos x, & \text{if } x \in \mathbb{Q} \\ 0, & \text{if } x \notin \mathbb{Q} \end{cases} \]
Which of the following statements is/are TRUE?

Show Hint

A function can be Riemann integrable even if it is discontinuous at some points, as long as the set of discontinuities has measure zero.
Updated On: Jun 1, 2026
  • \( f(x) \) is continuous at 0.
  • \( f(x) \) is continuous at \( \frac{\pi}{2} \).
  • \( f(x) \) is Riemann integrable on \( [0, 1] \) and \( \int_0^1 f(x) \, dx = \sin 1 \).
  • \( f(x) \) is Riemann integrable on \( [0, 1] \) and \( \int_0^1 f(x) \, dx = 0 \).
Show Solution

The Correct Option is B

Solution and Explanation

Step 1: Understand the function.
Here $f(x)=\cos x$ when $x$ is rational and $f(x)=0$ when $x$ is irrational. Every interval has both kinds of points, so the two rules fight each other.

Step 2: Continuity at $0$.
At $x=0$ the point is rational so $f(0)=\cos 0=1$. But irrationals close to $0$ give value $0$. The values do not approach $1$, so $f$ is not continuous at $0$. Option A is false.

Step 3: Continuity at $\tfrac{\pi}{2}$.
Now $\cos\tfrac{\pi}{2}=0$. Near $\tfrac{\pi}{2}$, rational points give $\cos x$ which is close to $0$, and irrational points give exactly $0$. Both sides head to $0$, which equals $f(\tfrac{\pi}{2})$. So $f$ is continuous at $\tfrac{\pi}{2}$. Option B is true.

Step 4: Riemann integrability on $[0,1]$.
On $[0,1]$ the values $\cos x$ are not zero, so $f$ jumps between $\cos x$ and $0$ at every point. The function is discontinuous everywhere on $[0,1]$, which is far more than a measure zero set. So $f$ is not Riemann integrable here.

Step 5: Conclusion.
Since $f$ is not integrable, both integral options are false, and only the continuity at $\tfrac{\pi}{2}$ holds.
\[ \boxed{\text{Only B is TRUE}} \]
Was this answer helpful?
0