Is the characteristics function of a countable set is Riemann integrable on $[0,1]?$

lebesgue-integralmeasure-theoryreal-analysisriemann-integration

Is the characteristic function of a countable set Riemann-integrable on $[0,1]?$

My attempt: I think so

Take $\mathbb{1}_\mathbb{Q}$. We know $m^*(\mathbb{Q})=0$ this implies $\mathbb{1}_\mathbb{Q}$ is Riemann-integrable

Best Answer

No. Consider $\chi_{\Bbb Q\cap[0,1]}$. It is not Riemann integrable as each point of $[0,1]$ is a point of discontinuity since both $\Bbb Q,\Bbb R\backslash \Bbb Q$ are dense in $\Bbb R$. Note that Lebesgue measure of $[0,1]$ is $1$. Here is the statement, which we want

$f:[a,b]\to\Bbb R$ is Riemann integrable if and only if set of points of discontinuity is a measure zero set.

You may also give an argument like this, $$U(P,\chi_{\Bbb Q\cap[0,1]})-L(P,\chi_{\Bbb Q\cap[0,1]})=1\text{ for every partition }P\text{ of }[0,1].$$

Note that $\chi_{\Bbb Q\cap[0,1]}$ is Lebesgue integrable, with Lebesgue integral $0$ because it is almost equal to $0$ function, as you mentioned Lebesgue outer measure of $\Bbb Q$, hence Lebesgue measure of $\Bbb Q$ is zero.

But note that $\chi_S$, where $S=\{0\}\cup\{1/n: n\in\Bbb N\}$ is Riemann Integrable on $[0,1]$, as the point of discontinuity of $\chi_S$ is exactly $S$, and Lebesgue measure of $S$ is zero.

Another nice example is that $$f(x)=\begin{cases}0 &\text{ if }x\text{ is irrational},\\ \frac{1}{q} & \text{ if }x=\frac{p}{q}\text{ with }p\in\Bbb Z, q\in \Bbb N,\gcd(p,q)=1.\end{cases}$$

This function is Riemann integrable on $[0,1]$ as each irrational point is a point of continuity of $f$.