Showing that a set $S \subset [a,b]$ is dense. 
Let $f:[a,b] \to [0,\infty)$ be a Riemann integrable function such that $\int_{a}^{b} f(x) \ dx =0$. Then how does one show that the set $S= \{x \in [a,b] \ : \ f(x)=0\}$ is dense in $[a,b]$.



*

*To show $S$ is dense in $[a,b]$ i have to show that given $x,y\in[a,b]$  there is a $z \in S$ such that $x<z<y$. 


Not sure how to go from here.
 A: If $S$ is not dense in $[a,b]$  then there exists an open set $U\subseteq [a,b]$ such that $U\cap S=\emptyset$.
Let $(c-\delta,c+\delta )\subseteq U$.
Then $0=\int_{[a,b]} f\ge \int _{c-\delta}^{c+\delta}f> 0$ (since $f\ge 0$)
which is false.
A: Suppose you find $x,y\in[a,b]$, $x \neq y$ and $[x,y]\cap S =\emptyset$. Then $f(s)>0 \ \forall s\in [x,y]$.
Say $c_0=\inf_{s\in[x,y]} f(s)$, then $c_0>0$.
Therefore $\int_a^bf(s)ds\ge\int_x^y f(s)ds \ge c_0 (y-x)>0.$ 
A: Since I was asked, I will put together the proof:
$f$ is Riemann integrable on $[a,b]$ $\iff$ f is bounded and continuous almost everywhere on $[a,b]$ (Lebesgue's criterion of Riemann integrability)
Suppose $S$ is not dense in $[a,b]$. There exists $a\leq c<d\leq b$ such that $[c,d] \cap S=\emptyset$, which is $f(x)>0$ on $[c,d]$
$f$ cannot be discontinuous on the whole $(c,d)$, because this set has (Lebesgue) measure $>0$, so there is a point of continuity $x_0\in(c,d)$
From the continuity property and for an arbitrary $\epsilon\in(0,f(x_0))$, we can find a $\delta>0$ with $[x_0-\delta,x_0+\delta]\subset (c,d)\subset[a,b]$ such that $f(x)\geq\epsilon>0$ for all $x\in[x_0-\delta,x_0+\delta]$
Thus:
$\int_{a}^{b}f(x)dx \ge \int_{x_0-\delta}^{x_0-\delta}f(x)dx\ge2\delta\epsilon>0$
contradiction with $\int_{a}^{b}f(x)dx=0$
A: Prove the contrapositive: if $S$ is not dense in $[a,b]$, then $\;\displaystyle\int_a^b f(x)\,\mathrm d\mkern1mu x>0$.
