# Please prove that $f(x)=0$ on $[a,b]$

Suppose $f$ is a continuous function on $[a,b]$ and $$\int_a^b f(x)g(x) = 0$$ for every integrable function. Show that $f(x) = 0$ on $[a,b].$

Here is what I have so far:

Consider any $x \in [a,b].$ Consider any $y >0.$ Say $g(u) = 1$ for $x<u<x+y,$ and $g(u) = 0$ otherwise. Hence $\int_x^{x+y} f(u) du = 0.$ Hence $\frac{\int_x^{x+y} f(u) du}{y} = 0.$ tend $y = 0$ we get $f(x) = 0.$ Hence proved.

Is this correct?

• I edited your question. Please double check I did not change anything (apparently, Yuval caught one mistake already).
– user2468
Aug 6 '12 at 20:21
• Your proof sounds fine, just remember to invoke explicitly the fundamental theorem of calculus. Aug 6 '12 at 20:21
• Well "dx" is missing...
– Hawk
Aug 6 '12 at 20:27

Hint: Let $x_0$ be a point at which $f(x_0) \ne 0$; Since $f$ is continuous there is an interval about $x_0$ in which $f$ is non-zero (can you prove this?). Now, can you find a $g(x)$ for which $\int_a^b f(x) g(x) dx \ne 0$ given this information?
Note that $\int_{[a,b]}f^2=0$. Then, $f\ge 0$. If there exist $x_0$ such that $f(x_0)>0$ Then, by continuity there exist an interval such that $f^2>0$ there and $\int_{[a,b]}f^2>0$, contradiction.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}