 Suppose you have n plus one points. You can generally find an nth degree polynomial whose graph runs through these points, but this requires solving a system of equations. We can simplify this process by using the Newton-Basis polynomials. So suppose you have n plus one points, the kth Newton polynomial is given by this rather daunting formula, but we can view this as the product of factors of the form x minus x i for i less than k. And we make our initial polynomial, f zero x, equal to one. The Newton polynomial will then be where the AIs are coefficients to be determined. Now you might wonder why we have what seems to be a very roundabout way of finding this interpolating polynomial. Well suppose n of x is our Newton polynomial. Notice that the kth Newton-Basis polynomial has factors of the form x minus x i for all i less than k. And what this means is that for x equal to x i, the Newton-Basis polynomial will vanish. Its value will be zero. And this actually makes it much easier to solve our system of equations. Let's see how that works. So let's say we want to find our Newton-Basis polynomial for the curve that runs through these points, and then we'll find our Newton polynomial itself. So we have three points, so n is equal to two. It's always one less than the number of points because we start counting it as zero. And so we have f zero of x, which is always equal to one, and f one of x and f two of x. Now, f one of x will be the product of factors of the form x minus x i for all i less than one. The only such factor is actually x minus x zero. That's our first x coordinate. And so f one of x is x minus one. F two of x will be the product of the factors of the form x minus x i for all i less than two. And these are the factors x minus x zero and x minus x one. So f two of x will be, and so our Newton polynomial will be a zero plus a one times x minus one plus a two times x minus one x minus four. And now we need to solve for the a i's. Now since the curve passes through one three, we know that if x is equal to one, n of x should be equal to three. So if we substitute in x equals one, and here's why the form of the Newton basis polynomials is so useful. Notice that x equal to one are second and third Newton polynomials are going to evaluate to zero, so the unknowns a one and a two don't appear in our equation. And so we end up with the equation three equal to a zero, which gives us our first coefficient. Next we know the curve passes through four negative five, and so we know that if x is equal to four, n of x should equal negative five. Now we already know a zero, and again, because of the form of our Newton basis polynomial, the last factor disappears and our equation only has one unknown value. And so we solve and find our value for a one. And again the curve passes through six four. So filling in the values that we already know, we find that if x is equal to six, y is equal to four. And this gives us an equation with only one unknown, and we can solve for that last coefficient. And since we know the coefficients, we can write the Newton polynomial. And this works no matter how many points we have. So if I have four points, then n is equal to three, and we'll have four Newton basis polynomials, f zero always equal to one, f one, that's x minus the first of our x values, f two, well that'll be x minus the first x value, times x minus the second x value, f three will be x minus each of the first three x values. Notice that the last x value never gets to the table as it were. In other words, x minus this last x value is not going to be a factor of any of our Newton polynomials. And again, we can go through each of our points in sequence. Since the graph passes through zero five, then if x is equal to zero, then y is equal to five. And again, since each of these last three polynomials has a factor of x, then when x is equal to zero, they'll vanish, and the other thing we'll have left is a zero. Since the graph passes through two three, then if x is equal to two, n of x is equal to three. And again, these last two terms have a factor of x minus two. So when x is equal to two, they'll vanish. And we already know the value of a is zero. And so in the resulting equation, the only unknown we have is going to be a one. And so we can solve for it. Since the graph passes through four negative seven, if x is equal to four, n of x will be negative seven. And again, if x is equal to four, this last term vanishes, and we'll get an equation where the only unknown is a two. So we solve. And in our last point, if x is equal to five, then n of x is equal to 12. And that gives us an equation, which we can then solve for a three. And so we have the coefficients of our polynomial, which in this case turns out to be a cubic.