Home / Maths for AI / Symbols / Calculus

Integral

Say it: "the integral of"

What it means

The area under a curve; a continuous version of ∑\sum. ∫abf(x) dx\int_a^b f(x)\,dx adds up f(x)f(x) times tiny widths dxdx from aa to bb.

Example

∫01x dx=12\int_0^1 x\,dx = \tfrac{1}{2}

The area of a triangle with base 1 and height 1.

In code

import numpy as np
x = np.linspace(0, 1, 100001)
print(round(np.trapezoid(x, x), 4))

Output

0.5

Where it appears in machine learning

Probabilities of continuous variables are areas under a density; expected values are integrals.

Related symbols

Learn it properly in the free lesson Probability & Distributions, with practice questions that check your answers.