I read a good number of posts which deal with this specific topic, but none of them seem to answer my question. If this is a repost, I apologize.
Alright so here is the problem, followed by a theorem which I use, and then my attempted proof:
Exercise 7.4.4. Show that if $f(x)>0$ for all $x\in [a,b]$ and $f$ is integrable, then $\int_{a}^{b} f>0$.
The theorem (and exercise) is from Abbott's Understanding Analysis, and my proof uses Theorem 7.4.2(ii):
Theorem 7.4.2.(ii) Assume $f$ is integrable on $[a,b]$. If $m\leq f(x)\leq M$ for all $x\in [a,b]$ then $$m(b-a)\leq\int_a^b f(x) \leq M(b-a)$$
Now here is my proof:
Proof. Let $f(x)>0$ for all $x\in [a,b]$ and assume $f$ is integrable. Since $f$ is integrable, then we can let (but can we?)
$$m=\inf\{f(x_0):x_0 \in [a,b]\}\text{ and }M=\sup\{f(x_0):x_0\in [a,b]\}$$
Where both $m$ and $M$ are greater than zero since $f(x)>0$.
Now by Theorem 7.4.2.(ii), we can write $$m(b-a)\leq \int_{a}^{b} f\leq M(b-a)$$
And since $0<m(b-a)\leq M(b-a)$, then the integral must be greater than zero as well.
Q.E.D.
I would just like some verification/correction. My doubt is whether or not the values $m$ and $M$ necessarily have to exist, since Theorem 7.4.2.(ii) states that the inequality is only true IF there exists such values for $m$ and $M$. But since $f$ is integrable and $[a,b]$ is compact, then the function should attain a maximum and a minimum, correct?