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

The function $f:[0,1] \to \mathbb{R}$ where $f(x) := 0$ if$ x \notin \mathbb{Q}$ and $f(p/q) : = \frac{1}{q} , q > 0, p,q$ coprime. How would you show that this is not a step function? Thanks!

share|cite|improve this question
How do you define "step function"? – martini Mar 22 '12 at 13:05
Is $f$ constant on any interval? Does $f$ take on only finitely many values? – David Mitra Mar 22 '12 at 13:07
@DavidMitra Ahh sorry, I thought of a simple function. – AD. Mar 22 '12 at 13:12
up vote 1 down vote accepted

This is known as Thomae's function. It is discontinuous at every rational number, and so is not continuous on any nontrivial interval -- which ought to contradict whatever definition of "step function" you're working with.

share|cite|improve this answer

Your Answer


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