Riemann integrable function that is zero at some point in every open interval 
Let $f:[a,b] \to\mathbb{R}$ be integrable. Suppose that for all $a < c < d < b$ exits a point $x \in ]c,d[$ such that $f(x) = 0$. Prove that $\int_a^bf = 0$.

I have tried to prove it using the Theorem of embedded intervals, so let two sequences {$c_n$} and {$d_n$} be such that both of them tend to $x$. Then at that point, $f(x)=0$ so we have $f(x)=0 \; \forall x \in [a,b]$. Then $\int_a^bf = 0$.
 A: For every partition $P=\{a=t_0<t_1<\cdots<t_n=b\}$ let
$$
m_k=\inf_{t\in[t_{k-1},t_k]} \,f(t), \quad
M_k=\inf_{t\in[t_{k-1},t_k]} \,f(t)
$$
Clearly
$$
m_k\le 0 \le M_k,
$$
and hence for every partition $P$
$$
L(f,P)\le 0 \le U(f,P),
$$
and hence
$$
\sup_P L(f,P)\le 0 \le \inf_P U(f,P),
$$
Since $f$ is integrable, then $\sup_P L(f,P)= \inf_P U(f,P)=\int_a^b f$,
and hence $\int_a^b f=0$.
A: The result is an immediate consequence of the definition of Riemann integral. Let $I=\int_{a} ^{b} f(x) \, dx$ then for every $\epsilon>0$ there is a $\delta>0$ such that $|S(P, f) - I|<\epsilon$ for all Riemann sums $$S(P, f) =\sum_{i=1}^{n}f(t_{i})(x_{i}-x_{i-1})$$ with norm of $P$ less than $\delta$ and any choice of tags $t_{i} $ in interval $[x_{i-1},x_{i}]$. Now we can choose the tags $t_{i}$ such that $f(t_{i}) =0$ so that $S(P, f) =0$ and then we have $|I|<\epsilon$ for all positive $\epsilon$ and hence $I=0$. 
A: You know that $\displaystyle \int_a^b f = \sup_{P}L(P,f)$, where $L$ denotes the lower sum, and the infimum is taken over all partitions. You know this because $f$ is Riemann integrable -- that's the definition (well, part of it). Now, using the fact that for any partition $P = \{t_0, t_1, \ldots t_n\}$, $L(P,f)=0$ (why?), what can you say?
