I was trying to prove that a continuous function $f:[a,b]\to\Bbb{R}$ is integrable and thought that I came up with an easy solution so I checked the internet and here is a long proof: https://proofwiki.org/wiki/Continuous_Function_is_Riemann_Integrable. This makes me think that something is wrong with my argument:
We know that $f$ attains its maximum and minimum on $[a,b]$, call them $A$ and $B$ resp. Assume that $f$ is not constant so that $A\not=B$ (when $f$ is constant it is trivial to prove that $f$ is integrable). Let $\epsilon>0$. It suffices to find a partition such that $U(P)-L(P)<\epsilon$. This is true for a partition with mesh $<\epsilon/(A-B)$. Isn't it?