You are on page 1of 2

Hey Team,

I mentioned today about interpolation, but breezed over some of the algebra intensive parts
because I know that for the most part you're not all enthusiastic about Euclid (that alliteration is
intentional, I also considered "giddy about Gauss" and "pleased with Pythagoras") I feel I've
done the world a disservice, so here's a post pretty much no one will read.

This is called Lagrangian Interpolation, named after some guy Lagrange. Given any number of
points, you can create (find?) a polynomial that describes it. For the sake of simplicity, I'll use
just three points, but it'll be really obvious how you can expand to any n+1 number of points.

Consider three points, for the sake of avoiding subscript we'll call them (a,A),(b,B) and (c,C).
This is just like your high school algebra class, the first number (the lowercase letter) tells you
how far over in the x (horizontal) direction and the second (capital) tells you how far up in the y
(vertical). It's like Battleship. So if (a,A) = (3,4) you'd go over three and up four (grab some
graph paper and play along).

Now here's the formula you've all been waiting for:

A( x  b)( x  c) B( x  a )( x  c) C ( x  a )( x  b)
y  
(a  b)(a  c) (b  a )(b  c) (c  a )(c  b)

(I’m going through formatting hell right now, so please bear with me).

With this equation, if x = a, both the second and third terms reduce to zero, and the first term
reduces to A:

A(a  b)(a  c) B (a  a )(a  c) C (a  a )(a  b)


y    A00
(a  b)(a  c) (b  a )(b  c) (c  a )(c  b)

So the curve passes through the point (a,A) (and (b,B) and (c,C)). I feel like it might be a little
confusing at this point, but it’s difficult to explain without a white board, so deal with it.

Stop! Example time. (like Hammer time, but without baggy pants). Consider the points (1,1),
(2,3) and (5,8). Ultimately our goal is to find the equation for a curve that passes though all of
these points. We can use Lagrange interpolation to find the equation:

1( x  2)( x  5) 3( x  1)( x  5) 8( x  1)( x  2)


y  
(1  2)(1  5) (2  1)(2  5) (5  1)(5  2)

And if we really wanted to (and we really do) we could reduce it even further:
x 2  27 x  14
y
12

Which actually isn’t too intimidating. Hooray for algebra.

This connects directly to the complexity stuff we were talking about quite nicely. You can see
how lengthy the equation is for just three points, and it just gets obnoxiously bigger as you add
more and more points.

For the 7 points: (1,1),(2,8),(3,2),(4,7),(5,0),(6,6),(7,0) we get this crazy graph.

This can be described by the offensive equation:

-0.2681x6 + 6.4208x5 - 60.743x4 + 287.9x3 - 712.49x2 + 858.18x – 378

The more and more “random” points we add, the worse and worse our descriptive formula gets.
At this point, it’s obvious (I hope) that descriptive equation is just as complex as the bunch of
points themselves.

If you’ve gotten this far, leave a comment or something so I can get a feel for weather or not
there’s a call for something like this.

-Nick

You might also like