The article describes a method for calculating interpolation coefficients of expansion using Chebyshev polynomials. The method is valid when the desired function is bounded and has a finite number of maxima and minima in a finite domain of interpolation. The essence of the method is that the interpolated desired function can be represented as an expansion in Chebyshev polynomials; then the expansion coefficients are determined using the collocation method by reducing the problem to solving a well-conditioned system of linear algebraic equations for the required coefficients. Using the well-known useful properties of Chebyshev polynomials can significantly simplify the solution of the problem of function interpolation. A technique using the Clenshaw algorithm for summing the series and determining the expansion coefficients of the interpolated function, based on the discrete orthogonality of Chebyshev polynomials of the 1st kind, is outlined.
Earlier we developed a stable fast numerical algorithm for solving ordinary differential equations of the first order. The method based on the Chebyshev collocation allows solving both initial value problems and problems with a fixed condition at an arbitrary point of the interval with equal success. The algorithm for solving the boundary value problem practically implements a single-pass analogue of the shooting method traditionally used in such cases. In this paper, we extend the developed algorithm to the class of linear ODEs of the second order. Active use of the method of integrating factors and the d’Alembert method allows us to reduce the method for solving second-order equations to a sequence of solutions of a pair of first-order equations. The general solution of the initial or boundary value problem for an inhomogeneous equation of the second order is represented as a sum of basic solutions with unknown constant coefficients. This approach ensures numerical stability, clarity, and simplicity of the algorithm.