> [!NOTE] Definition (Riemann Integrable Function) > 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]]. > >Let $\overline{\int }f$ and $\underline{\int }f$ denote the [[Upper Darboux Integral|upper Riemann integral]] and [[Lower Darboux Integral|lower Riemann integral]] of $f$ respectively. Then $f$ is *Riemann Integrable* iff $\underline{\int } f = \overline{\int } f$ > [!Example] Example (Non Riemann Integrable function) > Let $f:[0,1]\to \mathbb{R}$ be given by $f(x) = \begin{cases} 1 & \text{if } x\in \mathbb{Q} \\ 0 & \text{otherwise.}\end{cases}$Then $f$ is not integrable. > >*Proof*. > [!Example] Example (Riemann Integrable function) > Define $f:\mathbb{R}\to \mathbb{R}$ as $f(x)=\begin{cases} \frac{1}{q} & \text{if }x = \frac{p}{q} \in \mathbb{Q} \text{ such that } p \perp q. \\ 0 & \text{otherwise.} \end{cases}$Show that $f$ is RI. > [!Example] Example (Riemann integrable function) > Define $f:[0,1]\to \mathbb{R}$ by $f(x) = \begin{cases} 1 - \left( \frac{1}{q} \right)^{2} & \text{if }x = \frac{p}{q} \in \mathbb{Q} \text{ such that } p \perp q. \\ 1 & \text{otherwise.} \end{cases}$Show that $f$ is Riemann integrable. > [!NOTE] Definition (Riemann integrable real valued function) > Let $f:[a,b]\to \mathbb{R}$ be bounded. Then $f$ is said to be *Riemann integrable* if $\overline{\int} f = \underline{\int} f $and in this case we write $\int_{a}^{b} f(x) \, dx $for the common value.