# Relation between Riemann integrable and Lebesgue integrable functions

Let $$f$$ be Riemann integrable function and $$g$$ be Lebesgue integrable function on $$[0,1]$$. If $$\int_{0}^{1} |f-g| = 0$$, then what we can say about $$g$$ i.e. whether $$g$$ will be Riemann integrable or not?

I feel $$g$$ will be Riemann integrable, because if $$g$$ is not Riemann integrable that means set of discontinuities of $$g$$ must have non zero measure. But from $$\int_{0}^{1} |f-g| = 0$$, we can deduce that $$f$$ and $$g$$ are equal almost everywhere. I want to verify whether I am thinking in right direction or not. Please help me to figure out this problem, thanks in advance.

No, this is not right. Consider $$f=0$$ and $$g=1_\mathbb{Q}$$. In particular, Riemann integrability requires that for almost all $$x$$, $$g$$ is continuous in $$x$$. This is not the same as being equal to a continuous function almost everywhere.

The difference is clear here: $$g$$ is equal to the continuous function $$0$$ a.e., but it is actually continuous nowhere.

• Ok thanks, I got it. Actually I did not try to find a counterexample but instead, I tried to prove. Commented Jun 27, 2020 at 17:42

If $$f\colon[0,1]\longrightarrow\Bbb R$$ is the null function and if $$g\colon[0,1]\longrightarrow\Bbb R$$ is $$1$$ on the rationals and $$0$$ otherwise, then$$\int_0^1|f-g|=0,$$but $$g$$ is not Riemann-integrable.

• I got it, nice counterexample. Commented Jun 27, 2020 at 17:43