# Step functions and the characteristic function of rationals

A function $t: [a, b] \rightarrow \mathbb{R}$ is called a step function when a $k \in \mathbb{N}$ and numbers $z_0,...,z_k$ with $a = z_0 \leq z_1 \leq ... \leq z_k = b$ exist, such that for all $i \in \{1,2,...k\}$ the restriction $t |_{(z_{i-1},z_{i})}$ is constant. Let $f: [0,1] \rightarrow \mathbb{R}$ be defined by $$f(x) = \left\{ \begin{array}{rcl} 1, & \mbox{if} & x \in \mathbb{Q} \\ 0, & \mbox{if} & x \notin \mathbb{Q} \end{array} \right.$$

Show:

(i) The function $f$ is a point-wise limit of step functions.

(ii) There is no uniform convergent series of step functions, whose limit-function is $f$.

So the book I'm reading mentions this Dirichlet function all the time. Still I'm having trouble finding a solution to this exercise. All help is very much appreciated!

-

For part ii).

If a sequence of Riemann integrable functions $f_n$ converges uniformly to $f$, then what can you say about the Riemann integrability of $f$?

It seems like this question is trying to point out a drawback of Riemann integration which, if I remember correctly, motivated the discovery of Lebesgue integration.

-