Gaussian Quadrature Calculator

Optimal integration nodes

CalculatorsFreeNo Signup
4.6(531 reviews)
All Tools

Loading tool...

About Gaussian Quadrature Calculator

A Gaussian quadrature calculator using Gauss-Legendre nodes and weights. Achieves 2n−1 degree accuracy with n points. Shows nodes, weights, and weighted contributions. Compare with exact integrals. Select from preset functions. All calculations are client-side. Superior accuracy for smooth functions.

Gaussian Quadrature Calculator Features

  • Gauss-Legendre
  • Nodes/weights
  • n-point
  • Exact compare
  • Presets
Gaussian quadrature: ∫₋₁¹f(x)dx ≈ Σwᵢf(xᵢ). Nodes xᵢ are roots of Legendre polynomials. n-point rule is exact for polynomials up to degree 2n−1. Far more efficient than equally-spaced methods for smooth functions.

How to Use

Select integration:

  • f(x): Choose function
  • n: Number of points
  • [a,b]: Bounds (mapped from [-1,1])

Why These Nodes?

Legendre polynomial roots are optimal: they minimize the integration error. Unlike equally-spaced points, they cluster near endpoints, reducing Runge phenomenon.

Accuracy

n points → exact for degree 2n−1. 3 points match degree-5 polynomials. 5 points match degree-9. Exponential convergence for analytic functions.

Step-by-Step Instructions

  1. 1Select a function.
  2. 2Choose n (points).
  3. 3Set bounds [a,b].
  4. 4View nodes and weights.
  5. 5Compare with exact.

Gaussian Quadrature Calculator — Frequently Asked Questions

Why is Gaussian quadrature so accurate?+

Both nodes AND weights are optimized. Simpson's optimizes weights with fixed nodes; Gaussian optimizes both, doubling the polynomial degree achieved. For n points: degree 2n−1 vs n (Simpson's).

How do I integrate over [a,b] instead of [-1,1]?+

Change of variables: x = (b−a)t/2 + (a+b)/2. The integral becomes ((b−a)/2)∫₋₁¹f(mapped_t)dt. Apply Gauss-Legendre to the transformed integrand.

When should I NOT use Gaussian quadrature?+

For functions with singularities, discontinuities, or rapid oscillations. Use adaptive methods instead. Also poor for functions only available at fixed points (use interpolatory rules).

Share this tool: