> [!NOTE] Theorem (Necessary Condition for Riemann Integrability)
> Let $[a,b]$ be a [[Closed Real Interval|closed real interval]].
>
> Let $f:[a,b]\to \mathbb{R}$ be a [[Bounded Real Function|bounded]] [[Real Function|real function]].
>
>Then $f$ is [[Darboux Integrable Function|Riemann integrable]] iff for all $\varepsilon>0,$ there exists a [[Finite Partition of Closed Real Interval|finite partition]] of $[a,b]$ such that $U(f,P)-L(f,P)<\varepsilon$where $U(f,P)$ and $L(f,P)$ denote the [[Upper Darboux Sum|upper]] and [[Lower Darboux Sum|lower Riemann sums]] of $f$ with respect to $P$ respectively.
**Proof**: ($\Longleftarrow$) For any finite partition of $[a,b],$ $P$ $L(f,P)\leq \underline{\int} f \quad \land \quad \overline{\int} f \leq U(f,P)$ Therefore $\overline{\int}f - \underline{\int} f \leq U(f,P) - L(f,P). $Suppose the condition holds. Since the right side can be made smaller that any positive $\varepsilon$ the left side must be $0$ since [[There are no infinitesimal real numbers|there are no infinitesimal real numbers]].
($\Longrightarrow$) Suppose $f$ is Riemann integrable then $\int f = \overline{\int} f = \inf_{Q}U(f,Q)$so by [[Characteristic Property of Infimum of Subset of Real Numbers]], we can choose a partition $Q_{1}$ with $U(f,Q_{1})< \int f + \frac{\varepsilon}{2}$Similarly by [[Characteristic Property of Supremum of Subset of Real Numbers]] we can choose $Q_{2}$ so that $L(f,Q_{2})>\int f - \frac{\varepsilon}{2} $Now choose $P$ to a [[Common Refinement of Finite Partition of Closed Real Interval|common refinement]] of $Q_{1}$ and $Q_{2}.$ By [[Upper & Lower Darboux Sums of Refinement]], it will satisfy both inequalities and hence $U(f,P)-L(f,P)<\varepsilon.$