Generalized Gaussian Quadrature via Numerical Spectra of the Laplacian
Numerical Integration; Gauss Quadrature. Sturm–Liouville Problems; Spectral
Methods.
This work presents the study and construction of numerical quadrature formulas
based on a generalization of Gauss quadrature, with emphasis on the application of boundary
conditions and the analysis of the stability of the proposed method. Initially, fundamental
concepts of numerical integration, polynomial interpolation, and classical quadratures,
particularly Newton-Cotes and Gauss formulas, are reviewed. Next, a spectral approach is
developed based on eigenfunctions of Sturm–Liouville problems with Dirichlet and Neumann
conditions, enabling the formulation of a generalized quadrature with nodes and weights
obtained through least-squares optimization. The method is numerically evaluated through
the estimation of the expectation of test functions, with special focus on the triangular
function, and the results are compared with those from Gauss–Legendre quadrature. The
simulations show that, in the Dirichlet case, the spectral quadrature achieves superior
performance for moderate orders, although subject to numerical instabilities at specific
discretization values, which are partially mitigated by mesh refinement. In the Neumann case,
a sawtooth-like pattern dependent on the parity of the number of points is observed,
associated with the structural influence of the constant mode, which makes the quadrature
more sensitive to parameter selection. The results indicate both the advantages and the
intrinsic limitations of the method, emphasizing that the presented analyses are partial and
that further studies may enhance the understanding of the spectral quadrature behavior in
different scenarios.