# Integral
**The continuous analogue of a sum.**
![[Integral.svg|500]]
*A definite integral can be represented as the total signed area of the region between the graph of a function and the $x$-axis on the closed interval*
An **integral** is the continuous equivalent to a sum of discrete values. It may also refer to an [[antiderivative]], in which case they are also known as **indefinite integrals**.
A **definite integral** is the *signed area* of the region bounded by the graph of a [[function]] and the $x$-axis between two points on the real line.
The process of determining an integral is *integration* and is the inverse of [[Derivative|differentiation]]. Integration and differentiation are related by the [[fundamental theorem of calculus]].
## Definition
### Riemann integral
> [!Riemann integral]
> Let $f$ be a *bounded* real-valued function that is *continuous almost everywhere* on a *closed interval*.
>
> $f$ is *Riemann-integrable* on the interval if the limit of the [[Riemann integral#Riemann sum|Riemann sums]]
> $\sum_{i=0}^{n-1}f(t_{i})\Delta_{i}$
> of $f$ exists as the size of the sub-intervals $\Delta_{i}$ approaches zero.
>
> This limit is the [[Riemann integral]] of $f$ on the interval.
![[RiemannIntegral.svg]]
*A sequence of Riemann sums converging towards the integral as the width of the partitions approach zero; the limit of the sequence is the Riemann integral*
A proper Riemann integral is neither able to integrate *unbounded* functions nor functions with an *uncountable* number of [[Discontinuity|discontinuities]].
Unbounded functions require [[Improper Integral|improper integrals]], an extension of definite integrals, to compute. Functions with many discontinuities are computable using *Lebesgue integrals*.
### Lebesgue integral
> [!Lebesgue integral]
> Let $f$ be a *non-negative* real-valued function defined on a *closed interval*.
>
> $f$ is *Lebesgue-integrable* on the interval if the limit of
> $\sum_{i=0}^{n-1}\Delta_{i}\;\mu(\{x\mid f(x)>y_{i}\})$
> exists as the size of the [[Image|range]] partitions $\Delta_{i}$ approaches zero, where $\mu$ is the [[Lebesgue Integral#Lebesgue measure|Lebesgue measure]].
>
> This limit is the [[Lebesgue integral]] of $f$ on the interval.
![[LebesgueIntegral.svg]]
*A sequence of simple function approximations converging towards the integral as the size of the range partitions approach zero; the limit of the sequence is the Lebesgue integral*[^1]
#### Signed functions
The Lebesgue integral of some *signed* real-valued function $f$ can be found by splitting the function into two non-negative functions, $f^{+}$ and $f^{-}$.
$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 function can then be represented as
$f=f^{+}-f^{-}$
> [!NOTE] Lebesgue integral of a signed function
> If it exists, the Lebesgue integral of a *signed function* $f$ is
> $\int f=\int f^{+}-\int f^{-}$
## Notation
The notation for a definite integral of the function $f(x)$ with respect to $x$ over the interval $[a,b]$ is
$\int_{a}^{b}f(x)\;dx$
The function is known as the *integrand* and $a$ and $b$ are known as the *limits* or *bounds of integration*. The interval $[a,b]$ is also known as the *interval of integration*.
If the integral is indefinite then the integral is notated without limits.
$\int f(x)\;dx$
## Properties
### Linearity of integration
The integral of a *linear combination* of functions is equal to the same linear combination of their individual integrals.
> [!NOTE] Multiplication by a scalar
> $\int_{a}^{b}\alpha f(x)\;dx=\alpha\int_{a}^{b}f(x)\;dx$
> [!NOTE] Addition
> $\int_{a}^{b}f(x)+g(x)\;dx=\int_{a}^{b}f(x)\;dx+\int_{a}^{b}g(x)\;dx$
### Inequalities
> [!NOTE] Inequalities between functions
> If $f(x)\le g(x)$ for all $x$ on the interval $[a,b]$, then
> $\int_{a}^{b}f(x)\;dx\le\int_{a}^{b}g(x)\;dx$
### Degenerate intervals
> [!NOTE] Reversed interval
> If $f(x)$ is a real-valued function defined over a closed interval $[a,b]$ such that $a < b$, then
> $\int_{b}^{a}f(x)\;dx=-\int_{a}^{b}f(x)\;dx$
> [!NOTE] Integral over a point
> If $f(x)$ is a real-valued function defined on a point $a$, then
> $\int_{a}^{a}f(x)\;dx=0$
## Extensions
### Improper integral
An [[improper integral]] is an extension of Riemann integrals in which either the integrand function or limits of integration are *unbounded* or the integrand contains a *discontinuity*.
An improper integral is actually the limit or the sum of limits of a definite integral. Thus, improper integrals are described as either convergent or divergent. An improper integral has a value if and only if it converges, although a [[Cauchy principal value]] can be assigned to divergent integrals.
Improper integrals over unbounded limits are of any of the following forms:
$\int_{a}^{\infty}f(x)\;dx\quad\int_{-\infty}^{b}f(x)\;dx\quad\int_{-\infty}^{\infty}f(x)\;dx$
![[ImproperIntegralUnboundedLimit.svg|550]]
*Improper integral with unbounded limits of integration*
![[ImproperIntegralUnboundedFunction.svg|400]]
*Improper integral of an unbounded function*
### Multiple integral
A [[multiple integral]] is the generalisation of a definite integral to functions of *multiple variables*. In a multiple integral, the interval of integration is replaced with the *domain of integration*.
A double integral, for example, is an integral equal to the *signed volume* between the surface of a multivariable function and the plane on which the domain of integration is defined.
$\int_{D} f(x,y)\;dA=\iint_D f(x,y)\;dA=\int_{a}^{b}\left[\int_{c}^{d}f(x,y)\;dy\right]\;dx$
![[DoubleIntegral.svg|500]]
*A double integral*
### Line integral
A [[line integral]] is a generalisation of the integration of multivariable functions, typically scalar or vector fields, onto *curves* as the domain of integration.
The following are the notations for a general line integral over a scalar and a vector field, respectively:
$\int_C f\;ds=\int _{a}^{b}f(\mathbf{r}(t))|\mathbf{r}'(t)|\;dt$
$\int_C \mathbf{F}(\mathbf{r})\cdot d\mathbf{r}=\int_{a}^{b}\mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)\;dt$
![[LineIntegral.svg|500]]
*A line integral of a scalar field*
#### Contour integral
A [[Contour Integral|contour integral]] is a generalisation of the line integral to integrating *complex functions* along contours in the [[Complex Number\|complex plane]]. Often, the contour on which the integral is taken is *closed* and *orientated* which may be notated with if a circle intersecting the integral sign.
$\int_{\gamma}f(z)\;dz\quad\oint_{\gamma}f(z)\;dz$
![[ContourIntegral1.svg|600]]
![[ContourIntegral2.svg|500]]
*A contour integral; the contour of integration (above) and the modulus of the integrand function (below) are shown*
### Surface integral
A [[surface integral]] is a generalisation of multiple integrals onto *surfaces* as the domain of integration. It is analogous to a line integral where the domain of integration is *two-dimensional* instead.
The following are the notations for a general surface integral over a scalar and a vector field,
respectively:
$\iint_{S}f\;dS=\iint_{T}f(\mathbf{r}(u,v))\left\|{\frac{\partial\mathbf{r}}{\partial u}\times\frac{\partial\mathbf{r}}{\partial v}}\right\|\;du\;dv$
$\iint_{S}\mathbf{F}\cdot d\mathbf{s}=\iint_{T}\mathbf{F}(\mathbf{r}(u,v))\cdot\left(\frac{\partial\mathbf{r}}{\partial u}\times\frac{\partial\mathbf{r}}{\partial v}\right)\;du\;dv$
![[SurfaceIntegral.svg|600]]
*A surface of integration divided into differential patches*
[^1]: The Lebesgue integral is only defined for *non-negative* functions, so only the positive part of the function is integrated here.