Interactive Educational Modules in
Scientific Computing

Basis Functions

This module demonstrates how the same polynomial can be expressed in different ways as a linear combination of various sets of basis functions. It also gives insight into some of the differences among several common polynomial bases

The user first chooses a target polynomial f(x), either by selecting its degree and typing in its coefficients, or by selecting Random Polynomial to have a polynomial generated randomly. To see the functions in a particular polynomial basis combine to form the target polynomial, the user selects a polynomial basis then repeatedly clicks the Next button. At each step, the approximating polynomial of next higher degree is added to the plot, and its coefficients are shown below in an expansion in terms of the basis functions φi of the selected basis.

Certain characteristics of the available polynomial bases are illustrated here. The monomial basis is built as a succession of Taylor polynomial approximations around zero. The Lagrange basis functions have the property of taking either the value 0 or 1 at the interpolation points. The Newton basis functions take the value 0 at all previously interpolated points. The orthogonal Chebyshev basis functions minimize the maximum error over the interval of interpolation, often getting a good approximation to the target polynomial with fewer basis functions than the other bases.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 7.3.

Developers: Evan VanderZee and Michael Heath