Show that $g(a) = g(b) = 0,\ \int_a^b f(x)g(x)dx=0 $ implies $f(x)=0$ 
Suppose $f$ is continuous on $[a, b]$, if for every continuous function $g$ on $[a, b]$ with $g(a) = g(b) = 0, \int_{a}^{b}f(x)g(x) dx = 0$,  Show $f(x) = 0, \forall x \in [a, b]$, 

I want to prove by contradiction, and then find a continuous $g$ such that $g(a) = g(b) = 0$ but $\int_{a}^{b}f(x)g(x) dx \neq 0$
Proof: Suppose by contradiction that $f(x) > 0 $ for some $x_0 \in [a, b]$. Since $f$ is continuous, $\exists \delta$ such that $f(x) > 0, \forall x \in [x_0 - \delta, x_0 + \delta]$. Take $g(x) = \begin{cases}
0 & \text{ if } x \in (a, x_0 - \delta) \cup (x_0+\delta, b) \\ 
-(x - x_0 - \delta)(x - x_0 + \delta) & \text{ if } x \in (x_0 - \delta, x_0 + \delta) 
\end{cases}$
Now I want to show that since $g$ is continuous on $[a, b]$, then it is integrable. Thus $\int_{a}^{b} g(x) dx = sup L(g, p)$. However, since the lower sum is $> 0$, it follows that the supremum is also $> 0$. Therefore $\int_{a}^{b} > 0$. A contradiction. However, I do not know how to show that $L(g, p) > 0$
 A: Elaborating on N. S.'s comment, if $f$ is non zero at some $x_0 \in [a,b]$, then it is non-zero in some region $[x_0- \delta , x_0 + \delta ]$. WLOG take $f > 0$ in this region.
Then find a $g$ s.t. $g(a) = g(b) = 0$ but $g(x) > 0$ $ \forall x \in [x_0-\delta,x_0+\delta]$ (think of defining $g$ piecewise).
Further, make $g$ non zero only in this region 
(i.e. $g \geq 0$ everywhere, but $g >0$ only in $[x_0-\delta,x_0+\delta]$.
If $ x-\delta < a$ or $ x+ \delta >b$, then we take a smaller value for $\delta$.
The final part is to show the integral is non-zero, but this should not be hard to do (think finding the area or in terms of step functions).
A: Let $g(x)=f(x)(x-a)(b-x)$
 Then $$\int_a^b f(x)^2 (x-a)(b-x) dx =0 $$
 Note that $$f(x)^2 (x-a)(b-x)\geq 0,\ (x-a)(b-x) > 0\ (x\in
 (a,b))$$
If for some $x\in [a,b]$, $f(x)\neq 0$ then since $f$ is continuous, there exists a closed
  set $x\in [s,t]$ : $$ f(x)^2\geq c > 0\ {\rm on}\ [s,t] \subseteq [a,b]$$
Hence $$ \int_a^b f(x)^2 (x-a)(b-x) dx \geq \int_s^t c (x-a)(b-x) dx
> 0 $$ So contradiction.
A: Suppose there exists some $n$ such that $f(n) = a$, $a \neq 0$.  Since $f$ is continuous, let $E$ be the open interval around $n$ where $E \subset [a,b] $. 
Let $E1$ be the open interval around $n$ such that $sgn(e) = sgn(n) \forall e\in E1 \subset E$.
Let $E2 \subset E1$.
Let $E2 = (c_2, d_2)$, $E1 = (c_1, d_1)$.
Construct $g$ so that $g(x) = f(x)$ for $x \in E1$, $g(x) = 0$ for $[a,b] \cap E2'$, and $g(x)$ connects the parts continuously on $E1 \cap E2'$.
Once you have that, then it should be trivial.  Your integrand will be all one sign on $E1$ and non-zero, and zero everywhere else, which means your integral will be non-zero.
EDIT:
I'll go ahead and attempt to construct $g(x)$ on $[c_1,c_2]$ and $[d_2, d_1]$ explicitly.
$g(x) = f(x)* |\frac{x-c_1}{c_2-c_1}|$ on $x \in [c_1,c_2]$, and $g(x) = f(x)*|\frac{x-d_1}{d_2-d_1}|$.
A: Counter example:
$f(x)= const$, $g(x)=sin(x) $, $a=0, b=2 \pi$.
Direct computations shows that 
$\int_{0}^{2\,\pi }f(x) \; \mathrm{sin}\left( x\right) dx =0$.
So you need more constraints.
A: I'll rename the $x_0$ you defined to $c \in [a, b]$.
Let $p$ be the partition $(x_0 < x_1 < x_2 < x_3) = (a < c - \frac{\delta}{2} < c + \frac{\delta}{2} < b)$.
On the intervals $[x_0, x_1]$ and $[x_2, x_3]$, either $g$ vanishes or both $f$ and $g$ are positive, so
$$
   \inf_{x \in [x_0, x_1]} f(x)g(x) = \inf_{x \in [x_2, x_3]} f(x)g(x) = 0.
$$
On the interval $[x_0 - \frac{\delta}{2}, x_0 + \frac{\delta}{2}]$, both $f$ and $g$ are strictly positive, so
$$
  \inf_{x \in [x_1, x_2]} f(x)g(x) > 0.
$$
Summing over all subintervals gives $$L(fg, p) = \delta \inf_{x \in [x_1, x_2]} f(x)g(x) > 0$$
so necessarily $\sup_p L(fg, p)$ > 0.
