Need to show that $\int_a ^b f(x)g(x)dx=0 \implies f\equiv 0$ The question below is inspired by this one.

Assume $f$ is continuous on $[a,b]$ and $\int_a ^b f(x)g(x)dx=0 $ for
  every  function $g$ possessing continuous derivative such that
  $g(a)=g(b)=0$. Is it true that $f\equiv 0$ on the interval $[a,b]$?

The hint I was given is to cook up a smooth function with compact support out of $e^{-1/x^2}$. Expanded version of the hint was this: set $f(x)=e^{-1/x^2}$ for $x$ positive and $f(x)=0$ for $x$ non-positive and consider $\int_0^xf(t)f(1-t)dt$.
I have no idea what lies behind this hint (i.e., how could one come up with such an integral) and do not know how to use the hint either.
 A: The function $h(x) = f(x) f(1-x) $ looks a little like an upside-down bathtub: it's 0 for $x \le 0$ and for $x \ge 1$, but nonzero (indeed, positive) for $0 < x < 1$. 
For any interval $[p, q]$, the function $h_{p, q} (x) = f(\frac{x-p}{q-p})$ is similar: it's nonzero on the interior of the interval, zero outside it.
If you scale it up by a constant, you can arrange that $\int_p^q h_{p,q}(x) = 1$.
You'd like to show that for any $c$ in $[a, b]$, $f(c) = 0$. 
Suppose not .. suppose that $f(c) = A > 0$. Then there's an interval $[p, q]$, containing $c$, indeed, with $a < p < c < q< b$ on which $f(x) \ge A/2$. (Why?)
That tells you that 
$$
\int_a^b f(t) h_{p,q}(t)~dt = \int_p^q f(t) h_{p,q}(t) dt \ge \int_p^q \frac{A}{2} h_{p, q}(t) ~ dt.
$$
What can you say about that last integral? How does this related to the claim about $f$ and "any $g$"? 
A: Suppose that $f(y) \neq 0$ for some $y \in [a,b]$, without loss of generality, $f(y) > 0$. Then for some $\delta > 0$, $f(x) > 0$ for $x \in (y-\delta, y+\delta)$, and assume that $\delta$ is such that this interval is still contained in $[a,b]$ (if not, we are free to make it smaller).
Let $G(x) = \exp\left( \frac{1}{1-x^2} \right)$ for $x \in (-1,1)$ and $G(x)=0$ for $|x| > 1$. Then we make $g(x) = G(\frac{x-y}{\delta})$. Now we have a compactly supported function $g$ whose support is exactly $(y-\delta, y+\delta)$, and $g$ is strictly positive on $(y-\delta, y+\delta)$.
What can we say about $$\int_a^b f(x)g(x) dx = \int_{y-\delta}^{y+\delta} f(x)g(x) dx?$$
