# Lebesgue Integral
**An [[integral]] equal to the limit of a sequence of sums of the areas of horizontal approximations of the integral as the [[Image|range]] of the function is more finely partitioned.**
![[LebesgueIntegral.svg]]
*A sequence of simple function approximations; the limit of the sequence as the range of the function is more finely partitioned is the Lebesgue integral[^1]*
The **Lebesgue integral** is a definition of the [[integral]] of a [[function]]. It it defined as the convergent value of a sequence of sums of the areas of horizontal approximations of the integral as the *[[Image|range]]* of the function is *more finely sampled*.
## Definition
A common method of defining the Lebesgue integral is using *simple functions*, which are finite linear combinations of *indicator functions*.
### Partitions
> [!NOTE] Partition of the range
> A *partition* of the range of a function $[a, b]$ over a closed interval is a sequence of numbers such that if $a=y_{0}$ and $b=y_{n}$,
> $y_{0}<y_{1}<y_{2}<\cdots<y_{i}<\dots <y_{n}$
>
> The *mesh* of a partition is the *largest difference between adjacent numbers* in the sequence, denoted $\delta$.
It is common to refer to the numbers in a partition as *sample values* of the function.
### Lebesgue measure
The *Lebesgue measure* is the standard method of measuring [[Subset|subsets]] of any Euclidean $n$-spaces. For $n=1,2,3$, the Lebesgue measure is equivalent to length, area, and volume.
As such, the Lebesgue measure of any real closed interval $[a, b]$ is the length $b-a$. The Lebesgue measure of a [[countable set]] of such intervals is the sum of their lengths.
The Lebesgue measure is typically notated as $\mu$.
### Indicator function
> [!NOTE] Indicator function
> An *indicator function* of some subset $A$ of [[set]] $X$ is a function which equals one if its input is in $A$ and zero otherwise.
>
> That is,
> $\mathbf{1}_{A(x)}=\begin{cases}1\quad\text{if }x\in A \\ 0\quad\text{if }x\in A\end{cases}$
For the Lebesgue integral, the most logical choice for the integral of some indicator function $\mathbf{1}_{S}$ over set $S$ is thus
$\int\mathbf{1}_{S}\;d\mu=\mu(S)$
### Simple function
> [!NOTE] Simple function
> A *simple function* is a finite linear combination of a set of indicator functions
> $\sum_{i=0}^{n-1}a_{i}\mathbf{1}_{S_{i}}$
> where $a_{i}$ are real numbers and $S_{i}$ are disjoint Lebesgue-measurable sets.
From the definition of the indicator function and its integral, the integral of a simple function can be written as
$\int\left(\sum_{i=0}^{n-1}a_{i}\mathbf{1}_{S_{i}}\right)\;d\mu=\sum_{i=0}^{n-1}a_{i}\int\mathbf{1}_{S_{i}}\;d\mu=\sum_{i=0}^{n-1}a_{i}\;\mu(S_{i})$
For the Lebesgue integral, the disjoint sets are defined as
$S_{i}=\{x\mid f(x)>y_{i}\}$
which assigns to some set $S_{i}$ a set of $x$ values for which the function is greater than a partition number $y_{i}$.
The coefficients $a_{i}$ are then defined as $\Delta_{i}$, the choice of the heights of the horizontal approximations.
![[LebesgueSimpleFunction.svg|500]]
*A simple function with the representation of a single term highlighted*
A simple function is analogous to a [[Riemann Integral#Riemann sum|Riemann sum]].
### Lebesgue integral
> [!NOTE] Lebesgue integral
> Let $f$ be a non-negative real-valued function defined on a *closed interval*.
>
> The *Lebesgue integral* of $f$ is the limit of the simple functions of $f$ as the mesh of the range partitions approach zero.
> $\int_{a}^{b}f(x)\;dx=\lim_{\delta\rightarrow 0}\sum_{i=0}^{n-1}a_{i}\;\mu(S_{i})=\lim_{\delta\rightarrow 0}\sum_{i=0}^{n-1}\Delta_{i}\;\mu(\{x\mid f(x)>y_{i}\})$
## Definition for signed functions
The definition of the Lebesgue integral only works on non-negative functions but it can be extended to handle signed functions.
For a given *signed* real-valued function $f$, two non-negative functions can be created by splitting the function.
$f^{+}(x)=\begin{cases}f(x)\quad &\text{if } f(x)> 0, \\ 0 \quad&\text{otherwise}\end{cases}$
$f^{-}(x)=\begin{cases}-f(x)\quad &\text{if } f(x)< 0, \\ 0 \quad&\text{otherwise}\end{cases}$
The original function can then be obtained by subtraction of the two new functions.
$f=f^+ -f^{-}$
> [!NOTE] Lebesgue integral of a signed function
> The Lebesgue integral of a *signed function* $f$ is
> $\int f=\int f^{+}-\int f^{-}$
### Integrability
> [!NOTE] Lebesgue-integrability of a signed function
> The Lebesgue integral of a *signed function* $f$ exists if at least one of the Lebesgue integrals of its component functions are finite. That is,
> $\min\left(\int f^{+},\int f^{-}\right)<\infty$
[^1]: The Lebesgue integral is only defined for *non-negative* functions, so only the positive part of the function is integrated here. The Lebesgue integral can also integrate signed functions with additional definitions.