[Math] Prove that the function $f$ defined by $f(x)=x$ if $x$ is rational, $f(x)=-x$ if $x$ is irrational, is not Riemann integrable on $[0,1]$

riemann-integration

Prove that $f(x)=\begin{cases}x & \text{ if $x$ is rational } \\ -x & \text{ if $x$ is irrational} \end{cases}$ is not Riemann integrable on [0,1]
I'm trying to workout the upper integral and the lower integral. And to say that they are not equal. But got stuck in between.
Definitions that I have been using:
$\bar{I}(f,P)=\sum_{j=0}^{n}(a_{j+1}-a_j)\sup\left \{f(x)|a_j\leq x\leq a_{j+1} \right \}$
$\underline{I}(f,P)=\sum_{j=0}^{n}(a_{j+1}-a_j)\inf\left \{f(x)|a_j\leq x\leq a_{j+1} \right \}$

$\overline{\int_{0}^{1}}f dx= \underset{\epsilon\rightarrow 0}{\lim}\sup\left \{ \overline{I}(f,P)| P\text{ is a partition on [0,1] with a mesh size}\leq\epsilon \right \}$
$\underline{\int_{0}^{1}}f dx= \underset{\epsilon\rightarrow 0}{\lim}\sup\left \{ \underline{I}(f,P)| P\text{ is a partition on [0,1] with a mesh size}\leq\epsilon \right \}$

Best Answer

Since $\mathbb{Q}$ and $\mathbb{R} \backslash \mathbb{Q}$ are dense. In each Interval there $[a_j,a_{j+1}]$ $\sup\{f(x):x \in [a_j,a_{j+1}]\}= a_{j+1}$ and $\inf\{f(x):x \in [a_j,a_{j+1}]\}= -a_{j+1}$ Therefore

$\overline{\int_{0}^{t}}f dx=t^2/2$,

$\underline{\int_{0}^{t}}fdx=-t^2/2$

Lets assume we want to calculate $\overline{\int_{0}^{t}}f (x) dx$. We take the partition $Z_n=[0,t/n,(2t)/n,...,t]$ note that if $a_j$ denotes the jth term in the partition. $a_j-a_{j+1}=t/n$ and $ t/n\to 0$ for $n\to \infty$ since the supremum of $f$ on each interval is $a_{j+1}=t(j+1)/n$ the integral equals $\lim_{n \to \infty}\sum_{j=1}^n (t/n) \frac{t(j+1)}{n}=t^2/2$

Related Question