Question about integrability Let f be a continious function on [a,b] and exist a partition P of [a,b] such that $\bar{S}(f,p)=\int_a^b f(x)dx$. Prove that f is a constant function. I thought stratting assuming the claim is not correct and then must exist $x_0,x_1 \in [a,b]$ such that without the loss of genraility $f(x_0)<f(x_1)$. Then looking at the sum of darboux, somehow the $\bar S(f,p)$ does not converge to the integral. Why is this correct?
 A: Start out from the given partition $P$. The indirect assumption that $f$ is not constant implies that it is not constant over at least one interval $I_n=[a_n,a_{n+1}]$ of the partition. Then choose $x_1\in I_n$ such that $f(x_1)$ is maximal. Then there exists $x_0\in I_n$ such that
 $f(x_0)<f(x_1)$. 
Then, by continuity, for $\varepsilon:=\displaystyle\frac{f(x_1)-f(x_0)}2$ there is a $\delta>0$ such that $f(x)<f(x_1)-\varepsilon$ if $\ |x-x_0|<\delta$. This interval $(x_0-\delta,x_0+\delta)$ intersects $I$ in an interval with positive length, say $\varrho>0$. Over this interval we estimate $f$ from above by $f(x_1)-\varepsilon$, and on the rest of $I$ we estimate $f$ by $f(x_1)$. Then we have
$$ \begin{align}
\int_{a_n}^{a_{n+1}}f\  &\le\ \varrho\,(f(x_1)-\varepsilon)+(a_{n+1}-a_{n}-\varrho)\,f(x_1)\ < \\
&<\ (a_{n+1}-a_n)\,f(x_1)
\end{align} $$
Since over each interval $I_k$ we always have $\displaystyle\int_{I_k}f\le (a_{k+1}-a_k)\,\max_{I_k}f$, it means that
$$\int_a^bf < \bar S(f,P)\,.$$
