Module for Lagrange Polynomial Approximation
Check out the new Numerical Analysis Projects page.
Background. The
Lagrange polynomial of degree
passes through the
points
for
and
were investigated by the mathematician Joseph-Louis
Lagrange (1736-1813).
Algorithm for the
Lagrange
Polynomial. To
construct the Lagrange polynomial
of degree
, based
on the
points
for
. The
Lagrange coefficient polynomials
for
degree
are:
for
.
You can use the first Mathematica subroutine that does things
in the "traditional way" or you are welcome to use the second
subroutine that illustrates "Object Oriented
Programming."
Animations (Lagrange
Polynomial Approximation Lagrange
Polynomial
Approximation). Internet
hyperlinks to animations.
Evolution of Mathematica Subroutines for the Lagrange Polynomial.
Mathematica Subroutine (Lagrange Polynomial). Traditional programming.
![[Graphics:Images/LagrangePolynomialMod._gr_31.gif]](Images/LagrangePolynomialMod._gr_31.gif)
The above algorithm is sufficient for understanding and/or constructing the Lagrange polynomial.
Object Oriented
Programming. Welcome to the brave new world of
"Object Oriented Programming." Use the following
Mathematica subroutine which is "programmed" using the
"mathematical objects"
. Templates
for the objects are located by going to "File" then select
"Palettes", then select "BasicInput."
Mathematica Subroutine (Lagrange Polynomial). Object oriented programming.
![[Graphics:Images/LagrangePolynomialMod._gr_33.gif]](Images/LagrangePolynomialMod._gr_33.gif)
Mathematica Subroutine (Lagrange Polynomial). Compact object oriented programming.
![[Graphics:Images/LagrangePolynomialMod._gr_34.gif]](Images/LagrangePolynomialMod._gr_34.gif)
Getting
comfortable with objects.
Example 1. Construct
three interpolating polynomials of
degree n=1 for the
function
over
.
Use the following sets of interpolation nodes.
1 (a). Use the
nodes
.
1 (b). Use the
nodes
.
1 (c). Use the
nodes
.
Example
2. Form several Lagrange
polynomials of degree n = 2, 3, 4, and 5 for
the function
over
the interval
using n+1
equally spaced nodes.
Example 3. Error Analysis. Investigate the error for the Lagrange polynomial approximations in Example 2.
Example
4. Summary of the error bounds over the
interval [0, 1] for each of the
quantities
4
(a). Find
.
4
(b). Find
.
4
(c). Find
.
4
(d). Find
.
Old Lab Project (Lagrange Polynomial Approximation Lagrange Polynomial Approximation).
Internet hyperlinks to an old lab project.
Research Experience for Undergraduates
Lagrange
Polynomial Interpolation and
Approximation Lagrange
Polynomial Interpolation and
Approximation
Internet hyperlinks to web sites and a bibliography of
articles.
Downloads (Lagrange Polynomial Lagrange Polynomial). Download this Mathematica notebook.
(c) John H. Mathews 2003