Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was given $f$ is continuous on $[a,b]$ and $\int_a^bf(x)g(x)dx=0$ for all continuous function $g$ on $[a,b]$.

How do I prove that $f$ is identically equal to $0$ on $[a,b]$?

I tried to assume $f$ does not equal to $0$ to get a contradiction, but got stuck. Can I reach this problem with a different approach?

share|cite|improve this question
See what you can deduce from taking $g=f$. – David Mitra Dec 7 '12 at 16:45
up vote 7 down vote accepted

Hint: If $\int_a^b fg=0$ for all $g$ continuous on $[a,b]$ then

$$\int_a^b f(x)^2dx=0.$$

share|cite|improve this answer
Can I let $\epsilon={|f(t)|\over 2}$ and then do it by cases, and get $\int_a^bf(x)^2dx$ either $<0$ or $>0$, which is a contradiction? – Akaichan Dec 11 '12 at 15:42
$f(x)^2=|f(x)|^2$ since $f$ is continuous if its non-zero you can bound it below by $\varepsilon>0$ in some small interval, then this gives that the integral must be positive. – JSchlather Dec 11 '12 at 15:47
So, it's clear that $\int_a^bf(x)^2dx$ can never be negative,, right? Do I need to state that? – Akaichan Dec 11 '12 at 16:29
If $g\geq 0$ then $\int_a^b g(x)dx \geq 0$ assuming $a<b$ of course. You should be able to prove it, but you can most likely state it. – JSchlather Dec 11 '12 at 16:38
and from $\int_a^bf(x)^2dx=0$, I can just infer that $f(x)^2=0$? – Akaichan Dec 11 '12 at 18:07

If you want to go the contradiction route, here's one. Assume there is some $c\in (a, b)$ s.t. $f(c) \neq 0$. Just for simplicity's sake, say $f(c)\gt 0$.

By definition of continuity, there is some $\epsilon >0$ such that for any $x \in (c-\epsilon, c+\epsilon)$, we have $f(x) > 0$. Let $g$ be a function which is $0$ outside that interval, and positive within the interval. Then $$ \int_a^bf(x)g(x)dx $$ is strictly positive. Thus we have a contradiction. (The case $f(c)< 0$ is completely analogous, only the integral is strictly negative. Still, we have a contradiction.)

An example of a $g$ with the properties we want (just to convince you that it exists) is the funtion which is equal to $0$ outside the interval $(c-\epsilon, c+\epsilon)$, and within the interval is equal to $\epsilon^2 - (x-c)^2$

share|cite|improve this answer

Then $ \int_{a}^{b}f(x)^2dx = 0 $. If $ f $ is not null, there exist $ x \in [a,b]: f(x)^2 >0 $ by continuidty $ f>c $ in some interval $ I \subset \Omega $. Thus $ \int_{a}^{b}f(x)^2dx \ge \int_{a}^{b}c^2 = c^2 |I| > 0 $. Contradiction.

share|cite|improve this answer

Another option is for each $x \in (a,b)$, construct a sequence of continuous functions (say piecewise linear) $\{p_n\}$ with the property that $\int_a^b f(y) p_n(y) dy \to f(x)$ as $n \to \infty$. Basically, we want a sequence of functions of total integral 1 so that the majority of the mass of these functions is contained in increasingly smaller intervals around $x$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.