numerical quadrature
Finding the exact area under a curve by hand means finding an antiderivative — and for most functions a tidy antiderivative simply does not exist (try integrating e^(-x^2) or sin(x)/x in closed form). Quadrature is the practical answer: instead of solving the integral symbolically, you ESTIMATE its area from a finite number of function values, the way you might estimate the area of a pond by sampling its width at a few cross-sections.
Every quadrature rule has the same shape: it approximates the definite integral of f from a to b by a weighted sum of function values, w_1 f(x_1) + w_2 f(x_2) + ... + w_n f(x_n). The points x_i are called nodes and the numbers w_i are weights, and the whole art is choosing them well. The simplest rules sample at equally spaced nodes and fit a low-degree polynomial through the samples: the trapezoidal rule joins the points by straight lines and sums the trapezoid areas; Simpson's rule fits parabolas. Cleverer rules (Gaussian quadrature) free the nodes to be unevenly spaced and place them optimally. To control accuracy you split [a, b] into many small panels and apply a basic rule on each — a composite rule.
Quadrature is everywhere applied mathematics computes an integral: expected values in probability, areas and volumes, the right-hand sides of differential equations, signal energy, financial pricing. The honest framing is that the result is always an APPROXIMATION with a quantifiable error term; the goal is a controlled, understood error, not exactness. Two themes recur: smooth integrands let high-order rules converge breathtakingly fast, while singularities or kinks demand special handling or adaptive refinement; and in high dimensions ordinary quadrature suffers the curse of dimensionality, which is what eventually forces a switch to Monte Carlo methods.
Estimate the integral of f(x) = 1/(1 + x^2) from 0 to 1 (true value pi/4 = 0.785398). Sampling f at the two endpoints and applying the trapezoidal rule gives (1/2)(f(0) + f(1)) = (1/2)(1 + 0.5) = 0.75. Simpson's rule, adding the midpoint, gives (1/6)(f(0) + 4 f(0.5) + f(1)) = 0.78333 — much closer, from just one extra sample.
A definite integral becomes a weighted sum of function samples.
Quadrature integrates a FUNCTION you can evaluate anywhere; it is not the same as summing scattered data or solving an ODE. A rule with weights that sum to b - a will integrate a constant exactly, a basic sanity check — but accuracy on real integrands depends on the rule's polynomial degree and the integrand's smoothness.