I'm having some trouble with the following question:
Let $f:[0,1] \to \mathbb R$ be defuned as: $f(x) = 0$, if $x \notin \mathbb Q$, and if $x \in \mathbb Q \cap [0,1]$ and $x = \frac pq$ is an irredicuble fraction, then $f(x) = \frac 1q$.
Prove that $f$ is integrable and find the value of $$\int_0^1 f(x) dx$$
So, first things firs, if $P$ is a partitian of $[0,1]$ I will denote the upper sum of $f$ with respect to $P$ as: $\overline \sum (f,P)$ and the lower sum as: $\underline \sum (f,P).$
What I did is:
I proved that $\sup \left\{\underline \sum(f,P),\ P\text{ is a partition} \right\} = 0$, and intuitively I think that $\inf \left\{\overline \sum(f,P),\ P\text{ is a partition} \right\}$ is also $0$, and that would mean that:
$$\sup \left\{\underline \sum(f,P),\ P\text{ is a partition} \right\} =\inf \left\{\overline \sum(f,P),\ P\text{ is a partition} \right\} = 0$$
And thus the function $f$ is integrable and: $$\int_0^1 f(x) dx = 0$$
The thing is that I'm unable to prove that $\inf \left\{\overline \sum(f,P),\ P\text{ is a partition} \right\} = 0$.
Is this even correct? If so, how can I prove this?