Let be a continuous function on the interval and assume

for every function which is continuous on the interval . Prove that for all .

* Proof. * Since must hold for * every * function that is continuous on , it must hold for itself (since is continuous on by hypothesis). Therefore we must have,

However, for all . We know from the previous exercise (Section 3.20, #7) that a non-negative function whose integral is zero on an interval must be zero at every point at which it is continuous. By hypothesis is continuous at every point of ; hence, is also continuous at every point of (since the product of continuous functions is continuous). Therefore,

Which implies,

It’s easier to choose g(x) = 1 for every x then by the previous exercice the answer holds immediately

Note that we cannot choose g(x) = 1, because f may change sign on the interval. In that case we are integrating both negative and positive areas which may sum to zero. For example, suppose f(x) = cos(x) and g(x) = 1. Then if we integrate from 0 to 2pi we get zero, even though cos(x) != 0 on every point in the interval.