# Find the step function for Riemann function

The Riemann function $$f(x)=\begin{cases}\frac 1 q \text{ if } x=\frac p q \in\Bbb Q\\ 0\text{ if } x\in \mathbb R\setminus \Bbb Q\end{cases}$$

is a step function. Then, for any epsilon construct a step function $k:[0,1]\to \mathbb R$ such that $$||f-k||=\sup\{|f(t)-k(t)|:t \in [0,1]\}<\epsilon$$

Suggestion: restrict to $q<1/\epsilon$

-
Is the edit OK? Note it is "Riemann" and "epsilon". – Pedro Tamaroff Oct 24 '12 at 0:21
The Riemann function is a step function? If it were, you could just take $k$ to be $f$. Anyway, it's not good to just dump questions here without telling us what you know about the question, what you have tried, where you get stuck, and so on. – Gerry Myerson Oct 24 '12 at 1:05

Here is a suggestion to get you started : define a function $t_\varepsilon$ by $t_\varepsilon(x)=x\mathbf 1_{x\geqslant\varepsilon}$. Then, $k=t_\varepsilon\circ f$ is a step function (why?) such that $f-\varepsilon\lt k\leqslant f$ (why?).