# Given $f \in \mathcal{R}_a^b$, $\int f g = 0$ for every continuous $g$. Prove $f$ is zero at each point of continuity of $f$.

I attempted a proof by contradiction but am not sure if my proof holds up. Especially the last step:

Suppose we assume it is the case that $f$ is not zero at some point of continuity of $f$.

Let us consider the function $g$ and define it as $g = f$.

In this case, $\int fg = \int f*f = \int f^2$.

If $f$ is not zero at some point, defined as $x_0$, of continuity of $f$, then there is a neighborhood around $x_0$, $(x_0 - \delta, x_0 + \delta)$, such that $f \neq 0 ~ \forall ~ x \in (x_0 - \delta, x_0 + \delta)$. And if $f \neq 0$, then $f^2 > 0$.

It is thus the case that $\int_{x_0 - \delta}^{x_0 + \delta} f^2 > 0$. However, we supposed that $\int f g = 0$ for every continuous $g$. This is a contradiction , and so it must be the case that $f$ is zero at every point of continuity of $f$.

• You can't use $g=f$, because $f$ might not be continuous. – Alan Nov 2 '17 at 16:51
• What does $\mathcal{R}_a^b$ mean? – md2perpe Nov 2 '17 at 17:52

If $x_0$ is a point of continuity for $f$, then the evaluation of $f$ at $x_0$ can be realized as the limit of a sequence of integrals. Your assumption prescribes that all elements of such a sequence must vanish, and so their limit must vanish, too.
That is, and more precisely, there exists a sequence $(g_n)_{n\in\mathbb N}$ of continuous functions such that: $$g_n(x)\ge 0, \quad g_n(x)=0\ \text{for }|x-x_0|\ge \frac1 n, \quad f(x_0)=\lim_{n\to\infty}\int_a^b f(x)g_n(x)\, dx.$$ Once such a sequence will be constructed, the theorem will be proven, because $\int_a^b f(x)g_n(x)\, dx=0$ for all $n$.
To construct such a sequence we may start from a "triangle" shaped function $$g(x)=\begin{cases} 0, & x< 1\\ x+1, & 1\le x <0 \\ 1-x, & 0\le x < 1 \\ 0, & 1\le x,\end{cases}$$ and then translating at $x_0$ and applying a dilation so that the triangle is more and more spiky and concentrated around $x_0$: $$g_n(x):=n g(n(x-x_0)).$$ Notice that, by construction, we have that $\int_{\mathbb R} g_n(x)\, dx =1$ for all $n$.
Now consider the integral $$I(n)=\int_a^b f(x)g_n(x)\, dx.$$ If $n$ is sufficiently big, the interval $[x_0-\frac1n, x_0+\frac1n]$ is contained in $[a, b]$. This is good, because we can rewrite $I(n)$ as an integral over this smaller interval. By the mean value theorem for integrals, we can write $$\tag{1} I(n)=f(x_n)\int_{x_0-\frac1n}^{x_0+\frac1n} g(x)\, dx=f(x_n),$$ where we have used that $g$ integrates to $1$. Notice that, in (1), the point $x_n$ is contained in the interval $[x_0-\frac1n, x_0+\frac1n]$, so as $n\to \infty$, we have that $x_n\to x_0$. Since $x_0$ is a point of continuity of $f$, we conclude that $$I(n)=f(x_n)\to f(x_0).$$
Let $x_0$ be a point of continuity of $f$, and assume by contradiction that $f(x_0)\neq 0$. To fix the ideas, assume $f(x_0) > 0$ and let $\alpha := f(x_0) / 2$. Since $f$ is continuous at $x_0$, there exists $\delta \in (0, (b-a)/2)$ such that $f(x) \geq \alpha$ for every $x\in (x_0-\delta, x_0+\delta) \cap [a,b]$. Let $$g(x) := \max\{\delta - |x-x_0|, 0\}, \qquad x\in [a,b].$$ Clearly $g$ is continuous, and $$f(x) g(x) \geq \alpha (\delta - |x-x_0|), \qquad \forall x \in (x_0-\delta, x_0+\delta)\cap [a,b],$$ so that $$\int_a^b f\, g \geq \frac{\alpha\delta}{4} > 0,$$ a contradiction.
Let $p$ be a point where $f$ is continuous, and suppose $f(p) \neq 0$ (suppose $f(p)>0$ w.l.o.g.). Using the continuity of $f$ at $p$, let $U$ be a neighbourhood where $f(x)>f(p)/2$ for all $x \in U$. Pick $g$ a non-negative "bump" continuous function with support in $K \subset U$ such that $g(x)=1$ for all $x \in F \subset K$, with $F$ being a non-degenerate interval (it should be easy for you to construct such a $g$ - for instance, you can do it piecewise-linearly). We then have that $$\int_{[a,b]} fg=\int_K fg \geq \int_F fg=\int_F f \geq l(F)\cdot\frac{f(p)}{2}>0,$$ a contradiction.