What are all continuous functions $f:[a,b] \to \mathbb{R}$ such that $\int_a^b f = sup_{[a,b]} f$
it's clear that it is not all constant functions as given $[0,1]$ of the function $f(x) = 1$ then we have equality but as soon as given an interval of magnitude greater than $1$ this will fail to be equality. For instance $[0,2]$ gives $2 \not = 1$. So if it doesn't hold for all constant functions then it cannot hold for all linear functions.
The only continuous function I can find that it works with is $f(x) = 0, \forall x \in \mathbb{R}$.
Am I missing something here? $a , b$ are independent of the function. I've been able to construct intervals which give equality for a given function but not universally of any $[a,b]$ other than the zero function.