Let $f(x)=x(1-x), x\in [0,1]\cap \Bbb Q$, and $=0,\ x\in [0,1]\backslash \Bbb Q$. Can we show that $f(x)$ in not Riemann integrable on $[0,1]$.
If the inteval is $[a,b]$ with $0<a<b<1$, then it is easy to see that the sup of Riemann sum $>$ the inf of it. However, what about the case $[0,1]$?
The endpoints do not matter: just choose partitions $P_n=\left \{ 0,1/n,2/n,\cdots, (n-1)/n,1 \right \}$ of $[0,1]$ and note that
$U(P_n,f)\ge \sum^{n}_{k=1}\frac{k}{n}(1-\frac{k}{n})\frac{1}{n}=\frac{n(n+1)}{n^{2}}-\frac{n(n+1)(2n+1)}{6n^{3}}\to 1-\frac{1}{3}=\frac{2}{3}$ as $n\to \infty$,
whereas
$L(P_n,f)=0$ for all integers $n.$
Or better yet, note that $f$ is discontinuous on an uncountable set, so can not be Riemann integrable.