We present a computational method for solving a class of boundary-value pro
blems in Sturm-Liouville form. The algorithms are based on global polynomia
l collocation methods and produce discrete representations of the eigenfunc
tions. Error control is performed by evaluating the eigenvalue problem resi
duals generated when the eigenfunctions are interpolated to a finer discret
ization grid; eigenfunctions that produce residuals exceeding an infinity-n
orm bound are discarded. Because the computational approach involves the ge
neration of quadrature weights and arrays for discrete differentiation oper
ations, our computational methods provide a convenient framework for solvin
g boundary-value problems by eigenfunction expansion and other projection m
ethods. (C) 2000 Elsevier Science Inc. All rights reserved.