### 9.4 Gauss quadratures and summation by parts

When computing a discrete expansion in terms of orthogonal polynomials
one question is how to efficiently numerically approximate the coefficients given in Eq. (9.33). This involves computing weighted integrals of the form
If approximating the weighted integral (9.62) by a quadrature rule,
where the points are given but having the freedom to choose the coefficients , by a counting argument one would expect to be able to choose the latter in such a way that Eq. (9.63) is exact for all polynomials of degree at most . That is indeed the case, and the answer is obtained by approximating by its polynomial interpolant (8.1) and integrating the latter,
where the are the Lagrange polynomials (8.3) and the coefficients
are independent of the integrand . If the weight function is nontrivial, they might not be known in closed form, but since they are independent of the function being integrated they need to be computed only once for each set of nodal points . Suppose now that, in addition to having the freedom to choose the coefficients , we can choose the nodal points . Then we have points and , i.e., degrees of freedom. Therefore, we expect that we can make the quadrature exact for all polynomials of degree at most . This is indeed true and is referred to as Gauss quadratures. Furthermore, the optimal choice of remains the same as in Eq. (9.65), and only the nodal points need to be adjusted.

Theorem 20 (Gauss quadratures). Let be a weight function on the interval , as introduced in Eq. (9.17), and let be the associated orthogonal polynomial of degree . Then, the quadrature rule (9.63) with the choice (9.65) for the discrete weights, and as nodal points the roots of is exact for all polynomials of degree at most .

The following remarks are in order:

• The roots of are referred to as Gauss points or nodes.
• Suppose that . Then the Gauss points, i.e., the roots of the Chebyshev polynomial [see Eq. (9.68)], are exactly the points that minimize the infinity norm of the nodal polynomial in the interpolation problem, as discussed in Section 9.3.3.

One can see that the Gauss points actually lie inside the interval , and do not contain the endpoints or . Now suppose that for some reason we want the nodes to include the end points of integration,

One reason for including the end points of the interval in the set of nodes is when applying boundary conditions in the collocation approach, as discussed in Section 10. Then we are left with two less degrees of freedom compared to Gauss quadratures and therefore expect to be able to make the quadrature exact for polynomials of order up to . This leads to:

Theorem 21 (Gauss–Lobatto quadratures). If we choose the discrete weights according to Eq. (9.65) as before but as nodal points, the Gauss–Lobatto ones, i.e., the roots of the polynomial

with and chosen so that , then the quadrature rule (9.63) is exact for all polynomials of degree at most .

Note that the coefficients and in the previous equations are obtained by solving the simple system

One can similarly enforce that only one of the end points coincides with a quadrature one, leading to Gauss–Radau quadratures. The proofs of Theorems 20 and 21 can be found in most numerical analysis books, in particular [242].

For Chebyshev polynomials there are closed form expressions for the nodes and weights in Eqs. (9.63) and (9.65):

For ,