Exercises
Legendre polynomials and orthogonality
The Legendre polynomials satisfy
with
(a) Use the recurrence relation to derive , , and .
(b) Verify directly that
(c) Verify that
(d) Explain why every polynomial of degree at most 2 is orthogonal to .
Lagrange interpolation and differentiation
Consider the support points
(a) Construct the three Lagrange basis polynomials .
(b) Verify the interpolation property
(c) Construct the interpolation polynomial for
using only the values , and show that the polynomial is recovered exactly.
(d) Construct the differentiation matrix
(e) Verify that
(f) Use to recover exactly.
Three-point Legendre–Gauss quadrature
For , the LG points are the roots of .
(a) Determine the three LG points.
(b) Using symmetry and exact integration of 1, , and , derive the three quadrature weights.
(c) Verify that the resulting rule integrates every monomial , , exactly.
(d) Evaluate the quadrature error for
(e) Explain why this result is consistent with the LG exactness degree .
Proof of Legendre–Gauss exactness
Let be a polynomial of degree at most .
(a) Show that it can be written as
where and have degree at most .
(b) Use Legendre orthogonality to show that
(c) Show that the LG quadrature contribution from is also zero.
(d) Prove that the quadrature integrates exactly.
(e) Conclude that -point LG quadrature is exact for every polynomial of degree at most .
Low-order LGL construction and singularity
Consider the LGL grid.
(a) Starting from the roots of , derive the four LGL points.
(b) Compute the four LGL quadrature weights.
(c) Construct the Lagrange basis polynomials associated with the four points.
(d) Construct the differentiation matrix
(e) Verify that
(f) Conclude that is singular.
(g) Relate the singularity to the fact that the state polynomial has degree , whereas its derivative has degree .
Legendre–Gauss differential and integral forms
Let be the LG points and introduce the non-collocated initial point
Approximate the state by
(a) Show that the state polynomial has degree at most .
(b) Show that its derivative has degree at most .
(c) Derive the rectangular differentiation equations
(d) Assuming is invertible, derive
(e) Explain why acts as an integration matrix.
(f) Derive the terminal-state recovery equation
Explicit two-point LG differentiation matrix
Use LG points,
together with the initial support point .
(a) Construct the three Lagrange basis polynomials.
(b) Construct the LG differentiation matrix evaluated at and .
(c) Partition it as
(d) Verify that is nonsingular.
(e) Compute .
(f) For
recover , , and , and compare them with the exact integral of .
Legendre–Gauss–Radau differential and integral forms
Let be left-LGR collocation points, where
and introduce the non-collocated terminal support point
Approximate the state by
(a) Determine the degree of the state polynomial.
(b) Determine the degree of its derivative.
(c) Show that collocation at the LGR points gives
(d) Assuming is invertible, derive the corresponding integral form.
(e) Explain why the terminal state is directly included in the state polynomial but is not a collocation value.
(f) Explain why the LGR scheme provides a control value at the initial time, whereas the LG scheme does not.
Comparison of LG, LGR, and LGL
For each of the LG, LGR, and LGL methods using quadrature points, determine:
(a) which endpoints are included among the collocation points;
(b) the polynomial defining the collocation points;
(c) the exact polynomial degree of the quadrature rule;
(d) the degree of the state interpolant used in the corresponding pseudospectral construction;
(e) the degree of the derivative polynomial;
(f) whether the state differentiation matrix is square or rectangular;
(g) whether an ordinary inverse or an invertible square submatrix exists;
(h) how the terminal state is represented.
Then, for , compute the exactness degree of all three quadrature rules and determine which methods are guaranteed to integrate exactly.
Complete LGR pseudospectral transcription
On the normalized interval , consider
subject to
Use left-LGR collocation points and the non-collocated terminal point .
(a) Define all state and control decision variables.
(b) Write the LGR state interpolation polynomial.
(c) Construct the collocation equations in matrix form.
(d) Write the Gaussian-quadrature approximation of the integral cost.
(e) Write the complete finite-dimensional objective.
(f) Write the initial boundary constraint.
(g) Assemble the complete nonlinear program.
(h) Determine the number of scalar decision variables and equality constraints.
(i) Explain where the terminal state enters the NLP even though is not a collocation point.