# Paper 1, Section II, F

Let $f:[0,1] \rightarrow \mathbb{R}$ be a bounded function. Define the upper and lower integrals of $f$. What does it mean to say that $f$ is Riemann integrable? If $f$ is Riemann integrable, what is the Riemann integral $\int_{0}^{1} f(x) d x$ ?

Which of the following functions $f:[0,1] \rightarrow \mathbb{R}$ are Riemann integrable? For those that are Riemann integrable, find $\int_{0}^{1} f(x) d x$. Justify your answers.

(i) $f(x)= \begin{cases}1 & \text { if } x \in \mathbb{Q} \\ 0 & \text { if } x \notin \mathbb{Q}\end{cases}$

(ii) $f(x)=\left\{\begin{array}{ll}1 & \text { if } x \in A \\ 0 & \text { if } x \notin A\end{array}\right.$,

where $A=\{x \in[0,1]: x$ has a base-3 expansion containing a 1$\}$;

[Hint: You may find it helpful to note, for example, that $\frac{2}{3} \in A$ as one of the base-3 expansions of $\frac{2}{3}$ is $\left.0.1222 \ldots .\right]$

(iii) $f(x)=\left\{\begin{array}{ll}1 & \text { if } x \in B \\ 0 & \text { if } x \notin B\end{array}\right.$,

where $B=\{x \in[0,1]: x$ has a base $-3$ expansion containing infinitely many $1 \mathrm{~s}\}$.