# Riemann Integral
**An [[integral]] equal to the limit of a sequence of sums of the areas of vertical rectangular approximations of the integral as the width of the rectangles approach zero.**
![[RiemannIntegral.svg]]
*A sequence of Riemann sums; the limit of the sequence as the width of the partitions approaches zero is the Riemann integral*
The *Riemann integral* is a definition of the integral of a function. It is defined as the convergent value of a sequence of sums of the areas of vertical rectangles formed by a *partition of the integral* as the widths of the sub-intervals approaches zero. These sums are known as *Riemann sums*.
Riemann integrals are typically evaluated by *numerical integration* or the [[fundamental theorem of calculus]].
## Definition
### Partitions
> [!Partition of an interval]
> A *partition* of an interval $[a, b]$ is a sequence of numbers such that if $a=x_{0}$ and $b = x_{n}$,
> $x_{0}<x_{1}<x_{2}<\cdots<x_{i}<\dots <x_{n}$
> A pair of adjacent numbers form a *sub-interval* $[x_{i},x_{i+1}]$, the length of which is $\Delta_{i}=x_{i+1}-x_{i}$.
>
> The *mesh* of a partition is the *length of the longest sub-interval*, and is denoted $\delta$.
A *tagged partition* is a partition in which each sub-interval is assigned a *sample point*, that is, for each sub-interval $[x_{i}, x_{i+1}]$, it is tagged with a number $x_{i} \le t_{i} \le x_{i+1}$.
The partition used *does not* need to create *equal length* sub-intervals and the Riemann integral gives the correct value as long as the width of each sub-interval approaches zero.
### Riemann sum
> [!Riemann sum]
> Let $f$ be a real-valued function defined on a *closed interval*.
>
> The *Riemann sum* of $f$ is, with respect to a tagged partition of $f$,
> $\sum_{i=0}^{n-1}f(t_{i})\Delta_{i}$
![[RiemannSum.svg|500]]
*A Riemann sum with the representation of a single term highlighted*
A Riemann sum consists of a term for *each sub-interval* $[x_{i}, x_{i+1}]$ equal to the product of the *value* of the function *at the sample point* $f(t_{i})$ of the sub-interval and the *width* of the interval $\Delta_{i}$.
Thus, each term represents the signed area of a rectangle and the entire Riemann sum is an *approximation of the signed area* between the graph of $f$ and the $x$-axis.
### Riemann integral
> [!Riemann integral]
> Let $f$ be a real-valued function defined on a *closed interval*.
>
> The *Riemann integral* of $f$ is the limit of the Riemann sums of $f$ as the mesh of the tagged partitions approaches zero.
> $\int_{a}^{b}f(x)\;dx=\lim_{\delta\rightarrow0}\sum_{i=0}^{n-1}f(t_{i})\Delta_{i}$
## Integrability
For a Riemann integral to exist, the mesh of tagged partitions of the function must be able to tend towards zero.
> [!Riemann integrability]
> A function is *Riemann-integrable* if, for all $\varepsilon > 0$, there exists some $\delta > 0$ such that for any tagged partition of the function whose mesh is less than $\delta$,
> $\left|\left(\sum_{i=0}^{n-1}f(t_{i})\Delta_{i}\right)-s\right|<\varepsilon$
> If the function is Riemann-integrable, then its Riemann integral is equal to $s$.
An alternate characterisation of functions as Riemann-integrable or not is the *Lebesgue-Vitali theorem*.
> [!NOTE] Lebesgue-Vitali theorem
> The *Lebesgue-Vitali theorem* states that a *bounded function* on a *closed interval* is Riemann-integrable if and only if it has *countably many [[Discontinuity|discontinuities]]*.