这个脚本计算勒让德高斯Lobatto求积节点和权重以及LGL Vandermonde矩阵的谱方法。
Legende-Gauss-Lobatto nodes and weights
This script computes the nodes and weights for Legendre-Gauss-Lobatto quadrature as well as the LGL-vandermonde matrix for spectral methods. The nodes are the zeros of (1-x^2)*P_N(x), which include the endpoints. For pure Gauss quadrature, Chebyshev is numerically better and has a lower Lebesgue constant then Legendre, however, the opposite is true for Gauss-Lobatto quadrature.