Let $ f: [a, b] \rightarrow {\mathbb {R}} $ be continuous and such that $$ \int_ {a} ^ {b} {f (x) g (x) dx} = 0 $$ for all $ g: [a, b] \rightarrow {\mathbb {R}} $ continuous with $ g (a) = g (b) = 0 $. Show that $ f $ is null in $ [a, b] $.
Test (Attempt): Let's see that $ f $ is null, that is, $ f (x) = 0 $, for every $ x \in [a, b]$. By absurdity. Let $c\in [a, b]$ be such that $ f (c) \neq 0 $. Suppose that $ f (c)> 0 $. Since $ f $ is continuous in $ [a, b] $, then for $ \epsilon = \frac {f (c)} {2}> 0 $, there exists $ \delta> 0 $ such that if $ x \in [a, b] \cap {(c- \delta, c + \delta)} $, then $ f (x)> 0 $.
Anyone have a suggestion?
Suppose then that
$\exists y \in (a, b), \; f(y) \ne 0; \tag 1$
replacing $f(x)$ with $-f(x)$ if necessary, we may assume that
$f(y) > 0; \tag 2$
the continuity of $f(x)$ then allows us to assert the existence of some real
$\epsilon > 0 \tag 3$
such that
$x \in [y - \epsilon, y + \epsilon] \subset (a, b) \Longrightarrow f(x) \ge \dfrac{f(y)}{2}; \tag 4$
we may now define a function
$g:[a, b] \to \Bbb R \tag 5$
as follows:
$x \in [a, y - \epsilon], \; g(x) = 0, \tag 6$
$x \in [y - \epsilon, y], \; g(x) = \dfrac{f(y)}{2}(x - (y - \epsilon)), \tag 7$
$x \in [y, y + \epsilon], \; g(x) = \dfrac{f(y)}{2}((y + \epsilon) - x), \tag 8$
$x \in [y + \epsilon, b], \; g(x) = 0;\tag 9$
then $g(x)$ is easily seen to be a continuous function on $[a,b]$ with
$g(a) = g(b) = 0; \tag{10}$
the graph of $g(x)$ is flat and fixed at $0$ for $x \in [a, y - \epsilon] \cup [y + \epsilon, b]$ and exhibits a positive triangular "spike" of height $\epsilon f(y)/2$ centered at $y$ with base $[y - \epsilon, y + \epsilon]$; it follows then that
$x \in [a, y - \epsilon] \cup [y + \epsilon, b] \Longrightarrow f(x)g(x) = 0, \tag{11}$
$x \in [y - \epsilon, y] \Longrightarrow f(x)g(x) \ge \dfrac{(f(y))^2}{4}(x - (y - \epsilon)), \tag{12}$
$x \in [y, y + \epsilon] \Longrightarrow f(x)g(x) \ge \dfrac{(f(y))^2}{4}((y + \epsilon) - x); \tag{13}$
it is easy to see that $f(x)g(x) \ge 0$ is a continuous function on $[a,b]$ and that
$x \in (y - \epsilon, y + \epsilon) \Longrightarrow f(x)g(x) > 0, \; x \notin (y - \epsilon, y + \epsilon) \Longrightarrow f(x)g(x) = 0; \tag{14}$
it follows then that
$\displaystyle \int_a^b f(x)g(x) \; dx > 0, \tag{15}$
which contradicts our hypothesis that
$\displaystyle \int_a^b f(x) g(x) \; dx = 0; \tag{16}$
we are thus forced to conclude that
$f(x) = 0, \; \forall x \in [a, b]. \tag{17}$
$OE\Delta$.