An Example Of Orthogonal Polynomial Least-Squares Approximation

Chebyshev polynomials of the first kind, and Legendre polynomials are both orthogonal on [−1, 1], but their weighting functions are different. We shall illustrate the approximation behavior of these polynomials through an example wherein we wish to approximate.