Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

 Open In Colab

Optimal Evaluation Nodes: The Gauss Points

Up until this point, we have been using techniques for which the data points are fixed, (hopefully) evenly spaced, and at the limits of our subdomains.

Gaussian quadrature assumes you are free to choose the evaluation points xix_i. The goal is then to find special sets of points xix_i (called Gauss points) and weights cic_i for which the integral is computed with maximal polynomial degree precision.

The 2-Point Gauss-Legendre Formula

Let’'s propose a formula for the integral of a function f(x)f(x) in the range [−1,1][-1, 1]:

I=∫−11f(x) dx≈c0f(x0)+c1f(x1)I = \int_{-1}^1 f(x) \,\mathrm{d}x \approx c_0 f(x_0) + c_1 f(x_1)

where the unknowns are c0,c1,x0,x1c_0, c_1, x_0, x_1 (4 degrees of freedom). We require this formula to integrate monomials 1,x,x2,x31, x, x^2, x^3 exactly:

∫−111 dx=2=c0+c1∫−11x dx=0=c0x0+c1x1∫−11x2 dx=23=c0x02+c1x12∫−11x3 dx=0=c0x03+c1x13\begin{aligned} \int_{-1}^1 1 \,\mathrm{d}x &= 2 = c_0 + c_1 \\ \int_{-1}^1 x \,\mathrm{d}x &= 0 = c_0 x_0 + c_1 x_1 \\ \int_{-1}^1 x^2 \,\mathrm{d}x &= \frac{2}{3} = c_0 x_0^2 + c_1 x_1^2 \\ \int_{-1}^1 x^3 \,\mathrm{d}x &= 0 = c_0 x_0^3 + c_1 x_1^3 \end{aligned}

Solving this system yields:

c0=c1=1,x0=−13,x1=13c_0 = c_1 = 1, \quad x_0 = -\frac{1}{\sqrt{3}}, \quad x_1 = \frac{1}{\sqrt{3}}

That is a remarkable result! Any cubic polynomial can be integrated exactly merely through the sum of the function evaluated at two points!

Transformation to an Arbitrary Domain [a,b][a, b]

The preceding case specified integration limits on [−1,1][-1, 1]. To apply Gaussian quadrature to arbitrary integration limits [a,b][a, b], we perform a coordinate change:

x=b+a2+b−a2ξ,dx=b−a2 dξx = \frac{b + a}{2} + \frac{b - a}{2} \xi, \quad \mathrm{d}x = \frac{b - a}{2} \,\mathrm{d}\xi

where ξ∈[−1,1]\xi \in [-1, 1].

The nn-point Gauss-Legendre Formula

Jinkies!

The method may be generalized to nn-point quadrature that integrates polynomials up to degree 2n−12n - 1 exactly:

I=∑i=1ncif(xi)I = \sum_{i=1}^n c_i f(x_i)

with cic_i given by Legendre polynomial weights:

Integration orderCoefficient (cic_i)Gauss Point (xix_i)Error Term
21,11, 1±13\pm \frac{1}{\sqrt{3}}∼f(4)\sim f^{(4)}
389,59,59\frac{8}{9}, \frac{5}{9}, \frac{5}{9}0,±350, \pm \sqrt{\frac{3}{5}}∼f(6)\sim f^{(6)}
40.347855,0.6521450.347855, 0.652145±0.861136,±0.339981\pm 0.861136, \pm 0.339981∼f(8)\sim f^{(8)}
50.236927,0.478629,0.5688890.236927, 0.478629, 0.568889±0.906180,±0.538469,0\pm 0.906180, \pm 0.538469, 0∼f(10)\sim f^{(10)}

Error Analysis for Gauss-Legendre Quadrature

Note that the error is given in terms of higher derivatives of ff, since the step size is no longer an issue. In general, the error is:

Error=22n+1(n!)4(2n+1)[(2n)!]3f(2n)(ξ)Error = \frac{2^{2n+1} (n!)^4}{(2n+1)[(2n)!]^3} f^{(2n)}(\xi)

for some ξ∈[−1,1]\xi \in [-1, 1].

Multidimensional Gauss-Legendre Quadrature

Due to the separable nature of multidimensional integration, extending this concept to NN dimensions is an exercise in repeated application:

∫−11∫−11f(α,β) dα dβ=∫−11[∫−11f(α,β) dβ]dα≈∑ici∑jcjf(αi,βj)\int_{-1}^1 \int_{-1}^1 f(\alpha, \beta) \,\mathrm{d}\alpha \,\mathrm{d}\beta = \int_{-1}^1 \left[\int_{-1}^1 f(\alpha, \beta) \,\mathrm{d}\beta\right] \mathrm{d}\alpha \approx \sum_i c_i \sum_j c_j f(\alpha_i, \beta_j)

Quadrilateral Elements

An example of a quadrilateral with a 3rd integration order is shown below, illustrating the mapping between computational parent coordinates (left) and real physical coordinates (right):

Quadrilateral parent-to-physical coordinate mapping

Coordinates in physical space (x,y)(x, y) are interpolated using bilinear shape functions Ni(α,β)N_i(\alpha, \beta):

x=∑i=14Ni(α,β)xiy=∑i=14Ni(α,β)yi\begin{aligned} x &= \sum_{i=1}^4 N_i(\alpha, \beta) x_i \\ y &= \sum_{i=1}^4 N_i(\alpha, \beta) y_i \end{aligned}

with bilinear shape functions:

N1(α,β)=14(1−α)(1−β)N2(α,β)=14(1+α)(1−β)N3(α,β)=14(1+α)(1+β)N4(α,β)=14(1−α)(1+β)\begin{aligned} N_1(\alpha, \beta) &= \frac{1}{4}(1 - \alpha)(1 - \beta) \\ N_2(\alpha, \beta) &= \frac{1}{4}(1 + \alpha)(1 - \beta) \\ N_3(\alpha, \beta) &= \frac{1}{4}(1 + \alpha)(1 + \beta) \\ N_4(\alpha, \beta) &= \frac{1}{4}(1 - \alpha)(1 + \beta) \end{aligned}

Triangular Elements and Area Coordinates

In irregular domains, a quadrilateral may reduce a side length to zero, thereby becoming a degenerate quadrilateral, or simply a triangle.

Consider dividing a triangle into 3 sub-areas by connecting the vertices to an interior point PP:

Triangular element area coordinates

so as to define areas A1,A2,A3A_1, A_2, A_3. The area coordinates of PP are:

αi=AiA\alpha_i = \frac{A_i}{A}

and since A1+A2+A3=AA_1 + A_2 + A_3 = A:

α1+α2+α3=1\alpha_1 + \alpha_2 + \alpha_3 = 1

Gauss integration points on triangular elements are specified in these normalized area coordinates:

Triangular Gauss integration points