Theorem: Let be a continous function with and then .
Proof: Assume by contradiction that there is a point so that . The reason why we can ignore the endpoints is because if it was the case that on and then that would make non-continous at either or . Now if then there is a so that on we have i.e. . Since is continous on this closed subinterval it means it attains a mimimum . Now define the function in the following way: if then otherwise . Note is integrable. It follows that .
But would would mean a contradiction.