this follows from the riemann integral problem earlier:

suppose function f: [0,1] $\displaystyle \rightarrow$ R is defined as:

f(x) = 0 if x is irrational.

f(0) = 0,

f(p/q) = 1/q if p and q are natural numbers with no common factors.

now prove f is riemann integrable on [0,1] and determine $\displaystyle \int^1_0f(x)dx$

i've worked it out but im not sure if this is correct since it not clear whether the function is non negative: so here goes my solution:

let $\displaystyle \epsilon$ be an arbitrary positive number. Hence, there is a finite number N = N($\displaystyle \epsilon$) of points x$\displaystyle \epsilon$[0,1] such that f(x) $\displaystyle \geq \epsilon$. Each of these can at most belong to 2 sub intervals & therefore

U(f,P) $\displaystyle \leq$ $\displaystyle \epsilon + 2N||P||$

As the mesh can be chosen to be arbitrarily small we have:

$\displaystyle \int^1_0f(x)dx \leq \epsilon $

As $\displaystyle \epsilon$ can be chosen to be arbitrarily small we get $\displaystyle \int^1_0f(x)dx \leq 0$ $\displaystyle .........formula \bigodot$

But f is non negative(not sure if im correct here about the function being non negative)so: $\displaystyle 0 \leq \int^1_0f(x)dx$ .........$\displaystyle formula \bigotimes$

Side note: If lower riemann integral and upper riemann integral have common values then we know >>>>>>>>> lower riemann integral = upper riemann integral...

$\displaystyle \bigodot, \bigotimes$ and the side note imply that

lower riemann integral $\displaystyle \int^1_0f(x)dx$ = upper riemann integral $\displaystyle \int^1_0f(x)dx$ = 0.

This means that the function f is riemann integrable and $\displaystyle \int^1_0f(x)dx$ = 0..

.. lol that took some while to type out.

burning question... was my proof correct? the bit im unsure about is whether the function is non negative or not. ive assumed it is, as noted on the proof