On integral of a function that is zero except on a measure zero set.

174 Views Asked by At

I was/am trying to prove that if a function $f$ is Riemann integrable on $[a,b]$ and $f(x)=0$ on $[a,b]$ except on a subset $S$ of measure zero, then $\int_{a}^{b}{f(x)dx}=0$

I think I have come up with a proof but it still feels like I´ve glossed over something and it is not legitamate. Here is what I´ve got so far.

Let $\int_{a}^{b}{f(x)dx}=I$

Since $f$ is integrable on $[a,b]$, given $\epsilon >0\hspace{2mm} \exists\delta>0: |I-\sigma|<\epsilon\hspace{2mm}$ if $\sigma$ is any Riemann sum over a partition $P$ and $||P||<\delta$.

Furthermore, since the set $S=\{x\in[a,b]|f(x)\neq0\}$ is of measure zero, given any partition $P=\{x_0,x_1,...,x_n\}$. For all intervalls $[x_{k-1},x_k]$ we can choose a point $c_k\in[x_{k-1},x_k]$ such that $f(c_k)=0$.

Therefore given any partition $P$ of $[a,b]$ there is a Riemann sum $\sigma_0$ such that $\sigma_0=0 \implies |I|<\epsilon$

Is this a valid proof? Because there are functions like Thomae´s function that are Riemann integrable and are $0$ except on a measure zero set. But in that case, for any partition of $\hspace{1mm}[0,1]\hspace{1mm}$, I´ve could have chosen a Riemann sum $\sigma_0$ such that $\sigma_0\neq0$ since all intervalls $\hspace{1mm}[x_{k-1},x_k]\hspace{1mm}$ contain a rational number. Then the inequality $\hspace{1mm}|I-\sigma_0|<\epsilon\hspace{1mm}$ seems more unlikely since $I=0$.