Mathwords logoMathwords

Quadrature — Definition, Formula & Examples

Quadrature is the process of computing or approximating the value of a definite integral, especially by numerical methods. Historically, it referred to finding a square with the same area as a given curved region.

Quadrature denotes the numerical evaluation of a definite integral abf(x)dx\int_a^b f(x)\,dx by expressing it as a weighted sum i=1nwif(xi)\sum_{i=1}^{n} w_i\,f(x_i), where xix_i are prescribed nodes in [a,b][a,b] and wiw_i are corresponding weights chosen so that the sum approximates the integral to a desired accuracy.

Key Formula

abf(x)dxi=1nwif(xi)\int_a^b f(x)\,dx \approx \sum_{i=1}^{n} w_i\,f(x_i)
Where:
  • f(x)f(x) = The integrand — the function being integrated
  • xix_i = The nodes (sample points) in the interval $[a,b]$
  • wiw_i = The weights assigned to each node
  • nn = The number of nodes used in the approximation

How It Works

A quadrature rule replaces the integral with a finite sum. You evaluate the integrand ff at specific points (nodes), multiply each value by a weight, and add the results. Simple rules like the trapezoidal rule use equally spaced nodes with uniform-style weights. More sophisticated rules, such as Gaussian quadrature, choose nodes and weights to exactly integrate polynomials of the highest possible degree. The accuracy improves as you increase the number of nodes or use rules tailored to the integrand's behavior.

Worked Example

Problem: Use the trapezoidal rule (a basic quadrature method) with n=4n = 4 subintervals to approximate 02x2dx\int_0^2 x^2\,dx.
Set up nodes and step size: The interval is [0,2][0,2] with n=4n=4, so the step size is h=0.5h = 0.5. The nodes are x0=0,  x1=0.5,  x2=1,  x3=1.5,  x4=2x_0=0,\; x_1=0.5,\; x_2=1,\; x_3=1.5,\; x_4=2.
h=204=0.5h = \frac{2-0}{4} = 0.5
Evaluate the integrand: Compute f(xi)=xi2f(x_i) = x_i^2 at each node.
f(0)=0,  f(0.5)=0.25,  f(1)=1,  f(1.5)=2.25,  f(2)=4f(0)=0,\; f(0.5)=0.25,\; f(1)=1,\; f(1.5)=2.25,\; f(2)=4
Apply the trapezoidal rule: The trapezoidal quadrature formula uses weights h/2h/2 on the endpoints and hh on interior nodes.
T=h2[f(x0)+2f(x1)+2f(x2)+2f(x3)+f(x4)]=0.52[0+0.5+2+4.5+4]=0.25×11=2.75T = \frac{h}{2}\bigl[f(x_0) + 2f(x_1) + 2f(x_2) + 2f(x_3) + f(x_4)\bigr] = \frac{0.5}{2}[0 + 0.5 + 2 + 4.5 + 4] = 0.25 \times 11 = 2.75
Answer: The trapezoidal quadrature gives 2.752.75. The exact value is 832.66\frac{8}{3} \approx 2.6\overline{6}, so the approximation has an error of about 0.0830.083.

Why It Matters

Many integrals arising in physics and engineering have no closed-form antiderivative, so quadrature is the primary tool for evaluating them. Gaussian quadrature and adaptive methods are built into virtually every scientific computing library, from MATLAB's `integral` to Python's `scipy.integrate.quad`.

Common Mistakes

Mistake: Assuming quadrature and symbolic integration are the same thing.
Correction: Quadrature produces a numerical approximation of a definite integral's value. Symbolic integration finds an antiderivative as a formula. When no closed-form antiderivative exists, quadrature is often the only option.