Does every distribution with a Lebesgue integrable density also admit a Riemann integrable density? Suppose we have a continuous distribution function $F$ with density $f$ such that $f$ is Lebesgue integrable. Does $F$ then also have a density that is Riemann integrable?
Here's an attempt to construct a counterexample. Take the density
$$
f(x)=
\begin{cases}
1 & \text{if } x \in [0,1]\setminus\mathbb{Q},\\
0 & \text{otherwise}.
\end{cases}
$$
The Lebesgue integral of this function is $1,$ yet it isn't Riemann integrable. However, one could just use 
$$
\tilde{f}(x)=
\begin{cases}
1 & \text{if } x \in [0,1],\\
0 & \text{otherwise}.
\end{cases}
$$
instead which has the same cumulative distribution function, but is also Riemann integrable.
So my question is, can such a modification always be carried out?
 A: Consider a set $C$ like the standard Cantor set, but of measure $>0$. Take the characteristic function of it.    Note that $C$ closed and the interior of $C$ is empty. Moreover, $C$ is such that for every open interval $I$ that intersects $C$ we have $\mu(C\cap I)>0$. Therefore, for every $x \in C$ and $I$ open interval around $x$ we have $\mu(C\cap I)>0$ and $\mu((\mathbb{R}\setminus C)\cap I)>0$. 
Consider  a function $f$ that is equal almost everywhere to $\chi_C$. We conclude from the above that for every $x\in C$ and every $I$ open interval around $x$, $f$ takes both values $0$ and $1$ in $I$. Therefore $f$ cannot be continuous at $x$. So the set of discontinuities of $f$ contains $C$, and so is of measure $>0$. Therefore, $f$ is not Riemann integrable. 
Conclusion: there does not exist a Riemann integrable function $f$ such that 
$$\int_0^x f(t) dt =\int_0^x \chi_C(x) dx $$ for all $x$. 
Added: This should not be confused with the Cantor distribution, which is a continuous, but singular distribution. 
The Cantor distribution is like this : take the standard Cantor set $C$ (of measure $0$) There exists a Borel measure $\nu$ on $C$ that has total mass $1$. ( since $C$ is like $\{0,1\}^{\mathbb{N}}$) . Define the distribution on $\mathbb{R}$ by $m([0,x])=\nu(C\cap [0,x])$. This gives a continuous, but singular distribution on $\mathbb{R}$, supported on the set $C$, of measure $0$.
