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

"Dirichlet function" is meant to be the characteristic function of rational numbers on $[a,b]\subset\mathbb{R}$.

On one hand, a function on $[a,b]$ is Riemann integrable if and only if it is bounded and continuous almost everywhere, which the Dirichlet function satisfies.

On the other hand, the upper integral of Dirichlet function is $b-a$, while the lower integral is $0$. They don't match, so that the function is not Riemann integrable.

I feel confused about which explanation I should choose...

share|cite|improve this question
The Dirichlet function isn't continuous anywhere... – Ayman Hourieh Jul 6 '13 at 20:44
up vote 9 down vote accepted

The Dirichlet function $f$ isn't continuous anywhere. For every irrational number $x$, there is a sequence of rational numbers $\{r_n\}$ that converges to it. We have: $$ \lim_{n\to\infty} f(r_n) = 1 \ne 0 = f(x) $$

Thus, $f$ isn't continuous at irrational numbers. Rational numbers can be handled similarly.

share|cite|improve this answer

The Dirichlet function is nowhere continuous, since the irrational numbers and the rational numbers are both dense in every interval $[a,b]$. On every interval the supremum of $f$ is $1$ and the infimum is $0$ therefore it is not Riemann integrable.

share|cite|improve this answer
The irrationals are not 'dense' in the rationals and vice versa because those two sets are disjoint. What you meant is that the rationals are dense in $[a,b]$ and so are the irrationals. – Patrick Da Silva Jul 6 '13 at 20:49
Yes, that's what I meant, I will correct it. – Fye Jul 6 '13 at 20:52

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.