This is a small real analysis problem that is a part of another problem I'm tackling, and I strongly believe that the following claim is true, but for some reason I'm unable to prove this using elementary real analysis. Could I please get some hints/advice? I don't think it's hard.
Say $f$ is a continuous real-valued function on $[0,1]$, and $c$ is some upper bound on the function $f$ on $[0,1]$. Also say that $\int_0^1 f(x) dx = c$. Then surely $f$ is equal to $c$ on all of $[0,1]$. Could I please get some help in proving this elementary fact that I believe is true?