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 \}$
Since $\mathbb{Q}$ and $\mathbb{R} \backslash \mathbb{Q}$ are dense. In each Interval $[a_j,a_{j+1}]$ we have $\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,\frac{t}{n},\frac{2t}{n},...,t]$. Note that if $a_j$ denotes the j.th term in the partition then $a_{j+1}-a_{j}=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.$