# Find upper sum to prove not Riemann integrability

Let $$f: [0,1] \to \mathbb{R}$$ be defined by $$f(x)=0$$ if $$x$$ is irrational and $$f(x) = x+1$$ if $$x$$ is rational. I want to prove using an argument by upper and lower sums that $$f$$ is not Riemann integrable. I can easily see that $$L(f) = 0$$, but I'm not sure how to find $$U(f)$$.

Any hint is appreciated.

• $U(f) \ge 1$ because every interval contains a rational number. Nov 27, 2020 at 13:46
• You can say $U(f) \geq 1$ Nov 27, 2020 at 13:47
• That's true, thanks! Nov 27, 2020 at 13:51

If you split the interval $$[0,1]$$ into $$n$$ (equal) subintervals, the maximum value of $$f(x)$$ on the $$k$$-th interval is $$f\bigl(\frac kn\bigr)=\frac kn + 1$$, so $$U_n(f)=\frac1n\sum_{k=1}^n\Bigl(\frac kn+1\Bigr)=\frac1n\biggl(\frac{1+2+\dots+n}n +n\biggr).$$ Can you take it from there?
• I found that $U_{n}(f) = \frac{3n+1}{2n}$, so its infimum is $3/2$ and then $U(f) \leq 3/2$, but I got stuck there since I can't conclude that $U(f) \not = 0$ from that inequality. Nov 27, 2020 at 14:09
• You mean $U(f)\ge 3/2$ since it is the infimum. Nov 27, 2020 at 14:28