[Math] Give an example of a function $f:[0,1] \rightarrow \mathbb{R}$ that is…

analysis

Give an example of a function $f:[0,1] \rightarrow \mathbb{R}$ such that…

(a) $f$ is bounded, but not Riemann integrable on $[0,1]$.
$$
f(x) := \begin{cases} 2x & \text{if $x$ is rational}\\
x & \text{if $x$ is irrational.}
\end{cases}
$$
(b) $f$ is Riemann integrable on $[0,1]$ but not monotone.

$$f(x) := 2$$

(c) $f$ is Riemann integrable on $[0,1]$ but neither continuous nor monotone.

$$f(x) := \begin{cases} 0 & \text{if $x$ is $0$}\\
2 & \text{otherwise.} \end{cases}
$$


Is this correct? Thanks!

Best Answer

In fact there are at least an uncountable number of elements in each of the three classes above.

  1. For $\alpha>0$, the class of functions $f_\alpha(x) := \begin{cases} \alpha & \text{if $x$ is rational}\\ 0 & \text{if $x$ is irrational.} \end{cases}$ satisfy (a)
  2. For $\beta>0{}$, the class of functions $f_\beta(x)=\beta x(1-x){}$ satisfy (b)
  3. For $\gamma>0$, the class of functions $f_\gamma(x)=\gamma x(1-x){}$ for $0<x\leq 1$ and $f_\gamma(x)=-5{}$ satisfy (c)

The domain of definition of each function above is (of course) understood to be $[0,1]$