5
$\begingroup$

Given $$f(x) = \begin{cases} \frac{1}{q} & \text{if}~~ x = \frac{p}{q},(p,q)=1 ~,p\leqslant q, \text{is rational},~ 0\leqslant x \leqslant 1 \\ 0 & \text{if}~~ x ~~\text{is irrrational}, 0\leqslant x \leqslant 1 \end{cases} $$ I want to find both the Lebesgue and the Riemann integral of $f(x)$.

this is my attempt.

For the Lebesgue integral, I define $f(x) = 1\cdot 1_{\mathbf{Q}\cap [0,1]} +0\cdot 1_{[0,1]\setminus \mathbf{Q}}$. Then $$\begin{align*} \int_0^1 f(x)dx & = 1\cdot \mu(\mathbf{Q}\cap [0,1]) + 0 \\ & = 0 . \end{align*}$$ where $\mu$ is the Lebesgue measure.

I think the Riemann integral should also be $0$. Here is what I've done.
Let $P$ be a partition of $[0,1]$. Then since the irrationals are dense in $[0,1]$, every subinterval of $P$ will have a point where $f(x) = 0$. So the lower sum, $L(f,P) = 0.$ Thus $$\underline{\int_0^1} f(x) dx = \sup L(f,P) = 0.$$

Going with my guess, $\overline{\int_0^1} f(x)dx$ should also be 0$, but I don't know how to get it. so I want help with it. Also, is what I've done above alright?

  • 1
    [this](http://math.stackexchange.com/questions/106488/upper-riemann-sum-of-a-function) may help.2012-03-14
  • 0
    In your treatment of the Lebesgue integral, you state a wrong equality for $f(x)$. But you do have $f(x)=0$ a.e., so it comes out okay. It is useful to know that when the Riemann and Lebesgue integrals both exist, they must yield the same value.2012-03-14
  • 0
    @HaraldHanche-Olsen: I fixed it.2012-03-14
  • 0
    @DavidMitra: Thanks for the link.2012-03-14

1 Answers 1