Integrals

Accumulation: areas, totals, averages and probabilities. The other half of calculus, and the mathematics of Monte Carlo, rendering and probabilistic machine learning.

8 topics

Where the derivative asks how fast, the integral asks how much in total. Adding up infinitely many infinitely thin contributions turns out to be everywhere in computing:

INTEGRAL
   ├──► Probability (probabilities are areas under densities; expectations are integrals)
   ├──► Physics (work, mass, energy, position from velocity)
   ├──► Simulation (every time step integrates the equations of motion)
   ├──► Signals (energy, convolution, Fourier coefficients)
   └──► Monte Carlo (estimate an integral by averaging random samples — and render images with it)

In machine learning the connection is real but less direct than with derivatives: the true objective is an expected loss — an integral over the data distribution — which training approximates with averages over mini-batches.

Topics

Antiderivatives and indefinite integrals

FF is an antiderivative of ff if F′=fF' = f; all of them differ by a constant, written ∫f(x) dx=F(x)+C\int f(x)\,\dd x = F(x) + C. Many elementary functions, such as e−x2e^{-x^2}, have no elementary antiderivative.

Fundamental

Riemann sums

Approximate the area under a curve by nn thin rectangles, ∑f(xi∗) Δx\sum f(x_i^\ast)\,\Delta x. As n→∞n \to \infty the sum converges to the integral — slowly for the left/right rule (O(1/n)O(1/n)), faster for the midpoint (O(1/n2)O(1/n^2)).

Fundamental◐ demo

Definite integral

∫abf(x) dx\int_a^b f(x)\,\dd x is the limit of Riemann sums: the signed area between the graph and the axis, or, more generally, the total accumulated by a rate ff over [a,b][a, b].

Fundamental

Integration by substitution

The chain rule read backwards: ∫f(g(x)) g′(x) dx=∫f(u) du\int f(g(x))\,g'(x)\,\dd x = \int f(u)\,\dd u. In probability it is how densities transform when a random variable is transformed.

FundamentalMethod

Integration by parts

The product rule read backwards: ∫u dv=uv−∫v du\int u\,\dd v = uv - \int v\,\dd u. It moves a derivative from one factor to the other — the trick behind the weak formulation of differential equations and finite elements.

FundamentalMethod

Trigonometric integrals

Integrals of products of sin⁡\sin and cos⁡\cos. The key fact: different frequencies are orthogonal — ∫02πsin⁡(mx)sin⁡(nx) dx=0\int_0^{2\pi}\sin(mx)\sin(nx)\,\dd x = 0 for m≠nm \ne n — which is what makes Fourier series work.

University

Partial fractions

Split a rational function into simple pieces Ax−r\frac{A}{x - r}, Bx+Cx2+px+q\frac{Bx + C}{x^2 + px + q} that integrate to logarithms and arctangents. Engineers use the same decomposition to invert Laplace and Z transforms.

UniversityMethod

Improper integrals

Integrals over infinite intervals or of unbounded functions, defined as limits: ∫a∞f=lim⁡b→∞∫abf\int_a^\infty f = \lim_{b\to\infty}\int_a^b f. Every probability density over ℝ\R integrates to 1 this way.

University

Where this area leads in computing

↑ ↓ to navigate · ↵ · Esc