Gauss-Legendre Nodes and Weights
Enter a degree n to compute the Gauss-Legendre quadrature nodes x_i and weights w_i on the standard interval [-1, 1] and list them in a table.
Input
Enter a degree n to compute the Gauss-Legendre quadrature nodes x_i and weights w_i on the standard interval [-1, 1].
Number of nodes (1–256)
Result
Degree n
5
Nodes and weights on the standard interval [-1, 1]
Number of nodes
5
Sum of weights
2
Interval
[-1, 1]
Nodes and weights
Shows the nodes x_i (roots of the Legendre polynomial) and weights w_i on the standard interval [-1, 1].
| # | Node x_i | Weight w_i |
|---|---|---|
| 1 | -0.5384693101 | 0.4786286705 |
| 2 | -0.9061798459 | 0.2369268851 |
| 3 | 0 | 0.5688888889 |
| 4 | 0.9061798459 | 0.2369268851 |
| 5 | 0.5384693101 | 0.4786286705 |
How it works
- The nodes x_i are the roots of the degree-n Legendre polynomial P_n(x), computed on the standard interval [-1, 1].
- Roots are found by Newton's method using the asymptotic initial guess cos(π(i+3/4)/(n+1/2)), with derivative P_n'(x)=n(xP_n(x)−P_{n-1}(x))/(x²−1).
- Weights are computed as w_i = 2 / ((1 − x_i²) (P_n'(x_i))²). Nodes are assembled using the even/odd symmetry of P_n.
- The sum of the weights equals 2 in theory (the length of [-1, 1]), which serves as an accuracy check.
- To use an arbitrary interval [a, b], map x = (b−a)/2·t + (a+b)/2 and scale weights by (b−a)/2.
Related calculators
Gaussian Quadrature Nodes & Weights (Numerical Integration)
NumericalCompute the nodes and weights of Gaussian quadrature rules (Legendre, Chebyshev, Laguerre, Hermite) for any order, and numerically integrate any f(x) with Gauss–Legendre.
Open calculator →Gauss-Legendre Quadrature (Numerical Integration) Calculator
NumericalEnter f(x), the interval [a, b] and the order n to evaluate the definite integral ∫f(x)dx with high accuracy using Gauss-Legendre quadrature. Shows the nodes, weights and function values.
Open calculator →Gauss-Hermite Quadrature Nodes & Weights
NumericalEnter the order n to list the Gauss-Hermite quadrature nodes (roots of the Hermite polynomial Hₙ) and weights for the weight function e^(-x²) in a table.
Open calculator →Gauss-Laguerre Quadrature Nodes and Weights
NumericalEnter the order n to compute the nodes (zeros of the Laguerre polynomial Lₙ) and weights of Gauss-Laguerre quadrature in a table. Useful for evaluating ∫₀^∞ e^(-x) f(x) dx numerically.
Open calculator →
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Gauss-Legendre Nodes and Weights