Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Gaussian quadrature

A quadrature rule that chooses BOTH where to sample and how much weight to give each sample, to maximize accuracy for a fixed number of evaluations -- unlike a composite rule's fixed, equally spaced grid.

The n-point Gauss-Legendre quadrature rule samples f at the n roots of the degree-n Legendre polynomial on [-1,1], each weighted by w_i=\dfrac{2}{(1-x_i^2)[P_n'(x_i)]^2}, reaching degree of precision 2n-1 -- the maximum possible for n evaluations, and higher than any equally-spaced n-point rule achieves. A general interval [a,b] maps onto [-1,1] by x=\frac{b-a}{2}t+\frac{a+b}{2}.

Examples

  • 2-point Gauss-Legendre quadrature samples at \pm1/\sqrt3, reaching degree of precision 3 -- matching Simpson's rule's own degree of precision with one fewer function evaluation.

Read the full section →
Graph settings

Calculator