# Lagrange Interpolating Polynomials

- Author:
- Ryan Hirst

Suppose we have a function f(x), whose values are known at a set of points , and we would like to estimate f(x) at points which are not given. If we approximate f(x) by another function y(x) with the same values as f(x) at the given points, we can use y(x) to interpolate additional values.

In Analysis, it is often convenient to write L(x) as a sum of n polynomials, each of order n-1:
Where is the x-value of the kth tabular point. It can be shown that
satisfies the given conditions. Alternately,
I set up the problem more simply. Suppose, for example, n=3. Let points . Then I have
Written as a matrix multiplication, with the coefficients as the unknowns:
Or, in general, , with solution
The inverse matrix can be found using Gaussian elimination.
Geogebra recognizes input A^(-1) as matrix inverse.
L(x) is the same as Polynomial[<list of points>]
__________
Given enough points ( sufficiently large n), L(x) will converge to a smooth function.
If the tabular poitns themselves are not exact, caution is in order. Small changes in the given values can dramatically alter the behavior of the interpolated curve.
For example, suppose L(x) above is, in fact, identically f(x), but there are errors in our data. Try perturbing the points. Use

**Corresponding tools in GGB:****Offset**to slide a new set of points along the curve;**Jitter**to introduce some random displacement.**play**to browse possible changes to L(x) caused by this displacement.