Choosing the nodes as well as the weights
A quadrature rule replaces an integral by a weighted sum of function values. When nodes are fixed in advance, matching additional powers eventually exhausts the available weights. Gaussian quadrature also chooses the nodes. For a positive weight on a finite interval, carefully chosen nodes integrate every polynomial of degree at most exactly. The extra accuracy is not magic: it comes from the roots of a polynomial orthogonal to all lower-degree polynomials.
Let and let be continuous and strictly positive on . Write
The weight is part of the integral, whereas the numbers are quadrature weights. The accuracy target is polynomial, so it needs a name.
Definition 7.2.1
(Degree of exactness)
A rule is exact through degree if for every polynomial of degree at most .
The orthogonal polynomial and its roots
Define on real polynomials. Positivity of makes this an inner product. Applying Gram–Schmidt to , then scaling the last polynomial to be monic, gives the polynomial defined next.
Definition 7.2.2
(Monic orthogonal polynomial for a weight)
The monic orthogonal polynomial for the weight on is the unique monic polynomial of degree with for every polynomial of degree less than .
Theorem 7.2.3
(Roots of the orthogonal polynomial)
The polynomial has distinct real roots in .
Proof
(Sign changes against a lower-degree factor)
Let be the distinct roots inside at which changes sign, and put , with if . Away from its zeros, has a constant sign throughout : each sign change of is canceled by the corresponding factor in . The product is not identically zero, so the strictly positive weight makes . If , however, and orthogonality gives , a contradiction. Hence ; a degree- polynomial has at most roots, so all are distinct and interior.
Constructing the rule
Let be these roots and the Lagrange basis polynomial satisfying . Set . This already makes the rule exact for polynomials of degree at most , because their Lagrange interpolants equal the polynomials themselves.
Theorem 7.2.4
(Gaussian exactness)
With the nodes and weights just defined, is exact for every polynomial of degree at most . Every is positive, and no rule using these distinct nodes can be exact for all polynomials of degree .
Proof
(Division by the orthogonal polynomial)
Divide any polynomial of degree at most by :
Orthogonality gives . At each node, , so . For positivity, has degree , so the just-proved exactness yields
Finally, , but . Since has degree , exactness cannot extend to every polynomial of that degree. More generally, the same square-product argument rules out degree- exactness for any rule based on real nodes in the interval, regardless of its weights.
Proof X-ray
Why division unlocks twice as many degrees
The remainder is integrated exactly by interpolation. The quotient term vanishes at all nodes, while orthogonality makes its integral vanish too. These two zeros are different facts: one concerns sampling and the other concerns the integral. Together they handle degree up to .
The bound enters at one place only: dividing a polynomial of degree at most by leaves a quotient of degree at most , and only then does lie in the class that is orthogonal to. At degree the quotient may have degree , for example itself, and the orthogonality is no longer available; this is exactly the polynomial used at the end of the proof. The positivity of is used twice, once to place the roots inside and once to make and strictly positive.
Worked examples
Worked example 7.2.5
(Two nodes, computed from moments)
Take on . A monic quadratic orthogonal to and satisfies
Thus and . Symmetry and exactness for constants give . For , the rule gives , whereas ; the error is . Exactness through degree three does not include degree four.
Worked example 7.2.6
(Moving the two-node rule to another interval)
On an arbitrary interval with unit weight, the affine change transports the two nodes to and multiplies each weight by . The derivative and error constants also scale with this change; copying the constant unchanged would be incorrect.
For instance, on put . The nodes are and both weights equal . For ,
so the transported rule is again exact for a cubic.
Worked example 7.2.7
(Three nodes and the first failure at degree six)
For on write . Orthogonality to and involves only even integrands for and , and forces by parity, while orthogonality to gives
Hence , with nodes . Exactness for and gives and , so and . As a check, is integrated exactly: . The odd powers cancel by symmetry. Degree six is the first failure: , whereas , an error of .
Counterexample mode
Polynomial exactness is not universal exactness
For any prescribed nodes, the nonnegative polynomial vanishes at every sample point. The quadrature result is zero for any finite weights, while its integral against is positive. For the two-node rule on with , the polynomial is : it vanishes at , so returns , yet . Therefore a finite collection of samples cannot integrate every smooth function exactly. Polynomial exactness is a precise guarantee for a specified finite-dimensional class, not a universal error bound.
Common mistakes
Two misreadings of the main theorem recur.
Common mistake
(Reading 2n-1 as 2n)
A rule with Gaussian nodes is exact through degree . The two-node rule above integrates exactly but misses by , so " nodes, degree " is off by one.
Common mistake
(Treating positive weights as an error bound)
Positive quadrature weights prevent cancellation between the weights themselves, but do not guarantee a small error for every function or immunity to floating-point error. Smoothness, the integrand's behavior, numerical node computation and conditioning still matter. A high degree of exactness is a structural property, not a complete stability analysis.
Practice and solutions
Quick check
(With one node and on , construct the Gaussian rule and state its degree of exactness.)
Find the monic degree-one polynomial orthogonal to constants.
Solution · Answer
The monic degree-one polynomial orthogonal to constants is , so the node is zero and its weight is . The rule is exact through degree one, but fails for .
Quick check
(Use the two-node rule on to approximate .)
Compare the degree of the integrand with the degree of exactness.
Solution · Answer
The polynomial has degree three, so the result is exact: .
Quick check
(Explain why at least one weight of a rule exact for constants must be positive when .)
Apply the rule to the constant function .
Solution · Answer
Exactness for the constant function gives , so not all weights can be nonpositive.
Quick check
(Can an -node rule with arbitrary signed weights be exact for all degree- polynomials? Explain.)
Look for a nonnegative polynomial that vanishes at every node.
Solution · Answer
No. The square is nonnegative, has degree and vanishes at all nodes, yet has positive integral. This argument does not assume positive weights.