First question in text is 'Let $f$ be real-valued function on $[a,b]\ s.t.$ $f(x)=0$ for all $x\neq c_1, ... , c_n.$ Prove that $f$ is Riemann-integrable with $\int_a^bf =0 $.'
I proved this question by setting $c_0=a , c_{n+1}=b$ and using the fact that $f$ is Riemann-integrable on $[c_{i-1},c_i]$ and $\int_{c_{i-1}}^{c_{i}} f =0 $ for each $i=1, ... , n+1$.
But next question is 'Is the result of first question still true if $f(x)=0$ for all but countably many points in $[a,b]$?'
I have no idea how to prove it. What should I do?
Hint Pick a dense, countable subset $S \subset [a, b]$, and consider its indicator function, $$\chi_S(x) = \left\{\begin{array}{cl}1, & x \in S \\ 0, & x \not\in S \end{array}\right.$$ What are the upper and lower Riemman sums (for any partition) of $\int_a^b \chi_S \,dx$?