Numerical Analysis/Lagrange example

We'll find the interpolating polynomial passing through the points , , , using the Lagrange method.

We first use the formula to write the following:

After some simplification, we get:

And our answer:

.

Adding a point edit

Now we'll add a point to our data set, and find a new interpolating polynomial. Let us add the point   to our set. Starting over with the Lagrange formula, we write:

 

Simplifying, we get:

 

 

And our polynomial is:

 .