Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider the function $f(x)=\begin{cases} x & x\in \mathbb{Q}\cap [0,1] \\ -x & x\in [0,1]-\mathbb{Q} \\ \end{cases}$

I argue that this function is not integrable since given any partition $P$ of $[0,1]$, between any two points $x_n, x_{n+1}$ in the partition there is a rational number $r$ so that $U(f,P)>0.$ Similarly, $L(f,P)<0$. Therefore, $U-L>0$.

Am I correct? Is this function Lebesgue integrable? The latter is my main question.

share|cite|improve this question
up vote 1 down vote accepted

You are correct this function is not Riemann integrable on $[0,1]$. Your reasoning is (almost, see edit) correct, but another quick way to check is to note that its set of discontinuity points, namely $(0,1]$, does not have Lebesgue measure zero.

It is, however, Lebesgue integrable. We have $f(x) = x\chi_{\mathbb{Q} \cap [0,1]}(x) -x\chi_{[0,1]\setminus\mathbb{Q}}(x)$ which is a sum of bounded measurable functions. Since $[0,1]$ has finite measure bounded and measurable implies integrable.

Edit: Your reasoning is almost correct. Showing $U-L>0$ always does not imply the function is not Riemann integrable. You need to show $U-L > \epsilon$ always, for some $\epsilon >0$.

Also, another quick way to see that $f$ is Lebesgue integrable is that $f(x)=-x$ almost everywhere. Since the Lebesgue measure is complete, this implies $f$ is integrable if and only if $g(x):= -x$ is integrable, which of course it is.

share|cite|improve this answer
Great answer, thank you. – D. Rod Nov 5 '12 at 7:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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