The possibility of Legendre polynomials application for approximating functions in order to avoid problems with poorly conditioned matrices for using the least squares method is considered. It is shown that the solutions based on the methods of numerical integration have a large error, which does not allow the idea of orthogonalization to be applied to functions given in a table. However, the use of Legendre polynomials as basic functions instead of algebraic ones in the least squares method can significantly improve the conditionality of matrices. In the problem of approximation of periodic functions by finite Fourier sum the numerical integration is also required. But in connection of the Euler-Maclaurin formula, the numerical integration error of periodic functions is essentially less than of polynomial integration, so the problem is solved very accurately and fast.
Read full abstract