Suppose f is continuous on $I=\{x|a \leq x \leq b\}$ and $\int_a^b \! f(x)g(x) \, \mathrm{d}x = 0$ for all functions $g$ which are continuous on $I$. Prove that $f(x) = 0$.
In this case, the integral is the Darboux integral with the definition $\int_a^b \! f(x) \, \mathrm{d}x = \inf\{S^{+}(f,\bigtriangleup)\} = \sup\{S_{\_}(f,\bigtriangleup)\}$, where $S^{+}(f,\bigtriangleup) = \sum\limits_{i=1}^n M_{i}(x_{i}-x_{i-1})$ and $S_{\_}(f,\bigtriangleup) = \sum\limits_{i=1}^n m_{i}(x_{i}-x_{i-1})$, and $M_{i}$ and $m_{i}$ are the l.u.b and g.l.b of f on $I_{i}$ respectively.
What I want to say is that you cannot force $S^{+}(f,\bigtriangleup)$ to $0$ by forcing $(x_{i}-x_{i-1})$ to $0$, since the decrease in subinterval length is offset by the increase in the number of subintervals. Instead, you must force $f(x)g(x)$ to $0$, and since $g(x)$ can be any (non-zero) function continuous on $I$, $f(x)$ must be $0$.
Is that right? If so, how can I formally state the first sentence of that?