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.

Legendre Polynomials, Lagrange Interpolation, and Gaussian Quadrature

This section develops the mathematical foundation behind Gaussian quadrature and orthogonal collocation. The key ingredients are Legendre polynomials, Lagrange interpolating polynomials, and Gaussian integration rules.

Legendre Polynomials

Legendre polynomials satisfy

ddτ((1τ2)dPndτ)+n(n+1)Pn(τ)=0,\frac{d}{d\tau}\left((1-\tau^2)\frac{dP_n}{d\tau}\right) +n(n+1)P_n(\tau)=0,

for n=0,1,n=0,1,\ldots on τ[1,1]\tau\in[-1,1].

The first two are

P0(τ)=1,P1(τ)=τ.P_0(\tau)=1,\qquad P_1(\tau)=\tau.

The recurrence relation is

(n+1)Pn+1=(2n+1)τPnnPn1.(n+1)P_{n+1}=(2n+1)\tau P_n-nP_{n-1}.

Orthogonality

Legendre polynomials satisfy

11Pi(τ)Pj(τ)dτ=22j+1δij.\int_{-1}^{1}P_i(\tau)P_j(\tau)\,d\tau = \frac{2}{2j+1}\delta_{ij}.

Therefore every polynomial of degree at most n1n-1 is orthogonal to PnP_n.

Lagrange Interpolation

Given distinct support points

τ1,,τN,\tau_1,\ldots,\tau_N,

define

Li(τ)=jiττjτiτj.L_i(\tau)= \prod_{j\ne i} \frac{\tau-\tau_j}{\tau_i-\tau_j}.

These satisfy

Li(τj)=δij.L_i(\tau_j)=\delta_{ij}.

Hence an interpolant is

g(τ)i=1Ng(τi)Li(τ).g(\tau)\approx \sum_{i=1}^{N} g(\tau_i)L_i(\tau).

Gaussian Quadrature

Approximate

11g(τ)dτi=1Nwig(τi),\int_{-1}^{1}g(\tau)\,d\tau \approx \sum_{i=1}^{N}w_i g(\tau_i),

where

wi=11Li(τ)dτ.w_i=\int_{-1}^{1}L_i(\tau)\,d\tau.

Legendre–Gauss (LG)

LG points are the roots of

PN(τ).P_N(\tau).

Using NN points exactly integrates every polynomial of degree

2N1.2N-1.

Legendre–Gauss–Radau (LGR)

One endpoint is fixed, typically

τ1=1.\tau_1=-1.

The remaining points are roots of

PN(τ)+PN1(τ).P_N(\tau)+P_{N-1}(\tau).

Exactness:

2N2.2N-2.

Legendre–Gauss–Lobatto (LGL)

Both endpoints are fixed,

τ1=1,τN=1.\tau_1=-1,\qquad\tau_N=1.

Interior points are roots of

PN1(τ).P'_{N-1}(\tau).

Exactness:

2N3.2N-3.

Comparison

MethodEndpointsExact degree
LGNone2N12N-1
LGROne2N22N-2
LGLBoth2N32N-3

Why Gaussian Quadrature Works

A polynomial of degree at most 2N12N-1 can be decomposed into

g(τ)=PN(τ)f(τ)+h(τ),g(\tau)=P_N(\tau)f(\tau)+h(\tau),

where ff and hh have degree at most N1N-1. Orthogonality eliminates the first term after integration, while the remainder is represented exactly by the Lagrange interpolant.

Accuracy Growth

For LG quadrature:

PointsExact degree
23
35
47
59
611
713

Each additional collocation point increases the exact polynomial degree by two.

Application to Optimal Control

Gaussian quadrature provides highly accurate approximations for:

Summary

Connection. Those approximation tools determine both quadrature weights and the endpoint structure of the LGL transcription.