I'm learning about Riemann integrable function and need help with the following problem:

Consider the function

$$f(x) = \begin{cases} x, & 0 \leq x \leq 1 \, \text{and} \, x \in \mathbb Q; \\ x^2, & 0 \leq x \leq 1 \, \text{and} \, x \notin \mathbb Q. \end{cases}$$

Examine if $f$ is Riemann integrable.

The definition the author is using for Riemann integrable function is the one comparing the upper/lower sums, i.e. a function $f$ is Riemann integrable if and only if

$$\inf_P\{U(f, P)\} = \sup_P\{L(f, P)\}.$$

This exercise follows from the classic example of the Dirichlet function which is not Riemann integrable on any closed interval. I was able to follow and understand the latter example very well by I'm having difficulties applying a similar method of resolution for this newer function. My intuition tells me that the considered function is not Riemann integrable given that $f(x)$ is analogous to $\chi_{\mathbb Q}$, the Dirichlet function.


1 Answer 1


Consider $L(f,P)$ for an arbitrary partition $P$ and note that $x^2 \leq x$ in the interval and hence when considering the lower sums, we only need to worry about $x \in \mathbb{R} \setminus \mathbb{Q} $. In any given subinterval $[t_{i-1}, t_i]$ of the partition, the $\inf$ of $f$ is precisely equal to the $\inf$ of $g:[t_{i-1}, t_i] \to \mathbb{R}$ given by $g(x) = x^2$. The reason is because $g$ is continuous and increasing and there exist irrationals arbitrarily close to $t_{i-1}$. It thus follows that the $\sup$ of the lower sums is equal to $\int_0^1 x^2 \ dx = \frac 13$.

Analogously, we can show that the $\inf$ of the upper sums is $\int_0^1 x \ dx = \frac 12$.

The function is thus not Riemann integrable.

Alternatively, simply note that $f$ is discontinuous everywhere in $(0,1)$ and use Lebesgue's criterion.

  • $\begingroup$ Thank you for your detailed and clear explanation. I have accepted your answer but I was wondering if you could tell me a little more about the Lebesgue criterion you are mentioning at the end of your answer. I have a basic knowledge in measure theory but I don't know which criterion you are referring to. $\endgroup$
    – glpsx
    Jun 2, 2016 at 8:32
  • $\begingroup$ @VonKar This is the Lebesgue Criterion for Riemann integrability. Basically, a function is Riemann integrable if and only if it is bounded and continuous almost everywhere (formally, its set of discontinuities has measure $0$). This function is discontinuous on $(0,1)$ so it cannot be Riemann integrable. $\endgroup$ Jun 2, 2016 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.