 Last time, we have defined divided difference and proved some of the properties of it. Today we are going to prove some more properties of the divided difference, but before that I want to consider map from C A B space of continuous functions, which will associate f with a interpolating polynomial. And we are going to show that this map is linear, when you consider the three functions 1, x and x square, then you are going to have convergence. So, we look at a continuous function defined on C A B, x 0, x 1, x n, these are n plus 1 distinct points in the interval A B. We know that there is a unique interpolating polynomial which interpolates the given function at these points x 0, x 1, x n. In fact, that interpolating polynomial is given by summation i goes from 0 to n f x i l i x. So, this is the Lagrange form. Now, consider map i n from C A B to C A B, which will associate our function f to the interpolating polynomial. Now, it is easy to see that this map is linear and by that we mean that i n of alpha f plus g, where f and g are continuous functions belong to C A B, alpha is a real number, is equal to alpha times i n f plus i n g. P n approximates, P n interpolates the given function at n plus 1 points, it is a polynomial of degree less than or equal to n. Q n interpolates g, then when you look at alpha P n plus Q n, it is value at x j that is going to be equal to alpha f plus g at x j. That means, alpha P n plus Q n is going to interpolate alpha f plus g. Since P n and Q n are polynomials of degree less than or equal to n, this alpha P n plus Q n it is going to be the interpolating polynomial of alpha f plus g. Hence, i n of alpha f plus g is equal to alpha times P n plus Q n, which is equal to alpha times i n f plus i n g. Now, look at the three functions, f x is equal to 1. In fact, the interpolating polynomial they reproduce the polynomials. So, when f x is equal to 1 interpolating polynomial will be equal to f for n bigger than or equal to 0. For the function f x is equal to x, i n f will be equal to f for n bigger than or equal to 1 and f x is equal to x square that means, i n f will be equal to f for n bigger than or equal to 2. Hence, for these three functions norm of i n f minus f it is infinity norm will tend to 0 as n tends to infinity. Now, recall Karoukin theorem. In the Karoukin theorem it was that if you have a sequence of maps which are linear and which are positive such that there is convergence for three functions 1 x and x square. In that case there is going to be convergence for all continuous functions. In fact, when we wanted to show that the Bernstein polynomials converge to f in the infinity norm it is Karoukin theorem which we have used. Now, we have a new i n new map i n which is linear which converges in for three functions 1 x x square, but it is not going to be positive. So, we have we can look at a simple example. Look at f x is equal to x square x belonging to interval 0 to 2. So, clearly f x is bigger than or equal to 0 on this interval. Now, we have to look at interpolating polynomial. So, the graph of function will be something like this. So, here you have got at 2 it is going to take value 4. If I take my interpolating points to be 2 and 1. So, I choose x 0 is equal to 1 and x 1 is equal to 2. So, I consider the linear polynomial. So, I look at p 1 a polynomial of degree less than or equal to 1 such that p 1 at x 0 is equal to f x 0 and p 1 at x 1 is equal to f x 1. We know that it is going to be the straight line passing through the point x f x corresponding to value 2 and value 1. In fact, we can write p 1 x explicitly it is going to be equal to f at 1 is equal to 1 f at 2 is going to be equal to 4. So, p 1 x will be given by 4 into x minus 1 plus p 1 x is equal to 4. So, p 1 x will be given by 4 into x minus 1 plus 1 into 2 minus x. So, that when x is equal to 2 it is 1 when x is equal to 2 it is going to be equal to 4 and when x is equal to 1 then it is going to be equal to. So, it should be 1 minus x you want that p 1 at 2 should be equal to 4. So, it will be 1 minus x at 2 it is going to be 4 at 1 it will be 1. So, it is 4 into x minus 1 plus 1 into 2 minus x. So, that is going to be equal to 3 x minus 2. So, our p 1 x is 3 x minus 2 p 1 x will be less than 0 if x is less than 2 by 3. So, even if f x is equal to 4 it will be much bigger than or equal to 0 p 1 x need not be bigger than or equal to 0 and hence you have the Karoukin theorem it needs the function to be the map to be positive which is not the case and hence it is not applicable. In fact, I had said that for the interpolating polynomial there is going to be problem about the convergence that for not for all continuous functions you are interpolating polynomials they are going to converge. So, the map is it reproduces polynomials and hence it we are going to have convergence for all polynomials it will be a linear map, but it will not be positive map. So, now let us get back to the properties of divided difference. So, the divided difference is defined as look at the coefficient of x raise to n in the interpolating polynomial p n x there is a unique polynomial p n such that p n x j is equal to f x j. So, whatever is the coefficient of x raise to n that is going to be our divided difference based on points x 0 x 1 x n. Now, last time we saw that if f is a polynomial of degree m which is less than n then the divided difference is going to be 0 because if f is a polynomial of degree m which is less than or equal to n then in the interpolating polynomial is function itself f being a polynomial of degree m it will be of this form. So, a 0 plus a 1 x plus a m x raise to m to that we add 0 into x raise to m plus 1 plus 0 into x raise to n. So, the coefficient of x raise to n is going to be 0. So, this was the first property second property is it does not depend on the order of x 0 x 1 x n and the third is important property which is the recurrence formula that the divided difference based on n plus 1 points is expressed as difference of two divided differences based on n points divided by x n minus x 0. Then the value of divided difference in terms of function values is given by this formula where w x is function x minus x 0 x minus x 1 x minus x n. So, these were the four properties which we proved last time. Now, today we are going to prove another property and that is the linearity of the divided difference. So, if you consider f and g to be two functions and alpha to be a real number then the divided difference of alpha f plus g will be alpha times divided difference of f plus divided difference of g. Let p n interpolate function f at x j q n interpolate g at x j we have already seen that alpha p n plus q n interpolates alpha f plus g. Now, divided difference of alpha f plus g will be coefficient of x raise to n in alpha p n plus q n and that will be alpha times coefficient of x raise to n in p n plus coefficient of x raise to n in q n. So, here this beta actually should be 1. So, it is linearity of the divided difference. Now, the next property is suppose your function f is sufficiently differentiable. Suppose f is n times differentiable then the divided difference of f based on x 0 x 1 x n that will be equal to nth derivative of c divided nth derivative of f evaluated at c divided by n factorial for some point c in the interval a b. If you take special case to be n is equal to 1 then this theorem says that divided difference of f based on x 0 x 1 which is equal to f dash c. Now, that is nothing but the mean value theorem. So, let us prove this result and then once we prove this we will define divided difference when the points are not distinct, but they coincide. So, our f is sufficiently differentiable. So, f sufficiently differentiable x 0 x 1 x n these are distinct points in the interval a b p n at x j is equal to f at x j j is equal to 0 1 up to n. So, let me define e x to be difference of f minus p n. We assume that f is n times differentiable p n being a polynomial it is infinitely many times differentiable because of the interpolation condition e of x j will be 0 for j is equal to 0 1 up to n. So, now look at e x j is equal to e of x j plus 1 is equal to 0 and e is differentiable. So, by Rohl's theorem e dash y j will be equal to 0 for j is equal to 0 1 up to n minus 1. So, that means e has at least n plus 1 0s then e dash it is going to have at least n 0s which will mean that e double dash will have at least n minus 1 0s e has at least n plus 1 0s e dash has at least n 0s. So, e double dash will have at least n minus 1 0s and when you continue the argument you will have an argument e n this will have at least 1 0. So, suppose e n at c is equal to 0 for some c now we will look at the nth derivative of e e n x will be equal to nth derivative of f minus nth derivative of p n p n is a polynomial of degree less than or equal to n. So, its nth derivative is going to be constant and then so we have e x is equal to f x minus p n x e n at c is equal to 0 p n x is a polynomial of the form a 0 plus a 1 x plus a n x raise to n. When you consider nth derivative of p n that is going to be n factorial into a n and by definition of divided difference a n is nothing but divided difference based on x 0 x 1 up to 0. So, this is the definition of nth derivative to x n and thus we get f n c minus p n it is nth derivative at c to be equal to 0 which will give us f of x 0 x 1 up to x n to be equal to nth derivative of f evaluated at c divided by n factorial. So, this is the generalization of mean value theorem in order to define the divided difference we do not need function to be differentiable we do not even need it to be continuous, but if it happens to be n times differentiable then the divided difference is going to be nth derivative evaluated at c divided by n factorial. Now, we said that there exist c in the interval a b in fact c will be in the smallest interval which contains our interpolation points x 0 x 1 x n because when you look at the interpolating polynomial what comes into picture is our interpolation points x 0 x 1 x n and value of function f at those points. So, now the divided difference is equal to f n c divided by n factorial where c lies in the smallest interval which contains x 0 x 1 x n. If your points x 0 x 1 x n these are ordered then that interval is going to be closed interval x 0 to x n. If your x 0 x 1 x n they all coincide they are all equal then our interval is a single point and then it seems logical to define the divided difference based on x 0 repeated n plus 1 times to be f n x 0 divided by n factorial. So, f of x 0 x 1 x n is equal to f n c by n factorial c belonging to smallest interval containing x 0 x 1 x n and hence we define f of x 0 x 0 x 0 repeated n plus 1 times to be equal to f n x 0 divided by n factorial. We want to show another property of divided difference and that is the continuity of the divided difference. Our divided difference f of x 0 x this is going to be equal to f x minus f x 0 divided by x minus x 0 if x is not equal to x 0. If x is not equal to x 0 then f dash x 0 if x is equal to x 0 our function f is defined on interval a b. Let us assume f to be differentiable so that we can talk of f dash x 0 now you fix x 0 then f of x 0 x this becomes a function of x. Our claim is that if you consider g x to be equal to f of x 0 x x 0 fixed this g is going to be continuous because when you consider value of x not at x 0 then f x minus f x 0 divided by x minus x 0 f being a continuous function so we have got quotient of two continuous functions. And at x 0 we have limit x tending to x 0 and at x 0 we have limit x tending to x 0. f x minus f x 0 divided by x minus x 0 that is f dash x 0 so that proves continuity of f x 0 x and now consider the higher order divided difference. If x 0 and x 1 are fixed the divided difference based on x 0 x 1 x it is same as divided difference based on x 0 x x 1 because it is independent of order. Now this will be equal to by recurrence relation f of x 1 x or x x 1 minus f of x 0 x is equal to f of x 1 x or x x 1 minus f of x 0 x divided by x 1 minus x 0. We have already seen that this divided difference is continuous this divided difference is continuous you are dividing by a constant. So, this divided difference will be continuous and in general by induction if you look at divided difference based on x 0 x 1 x n x that is going to be a continuous function. Now, we want to look at building of polynomials when we looked at the interpolating polynomial we when we proved its existence and uniqueness then we already had the Lagrange form explicitly we had written p n x using Lagrange polynomial. Now that time we said that the disadvantage of this Lagrange form is suppose you have found interpolating polynomial interpolating x 0 x 1 x n and then you add just one more interpolating point then you have to do all the work again. So, that is why what we want to do is if I have found already p n x and I add one more interpolating point then I should be able to do able to do it so that I just add one more extra term and that is why we defined the divided difference. Now, let us see how if you have found p n minus 1 x how to get p n x. So, p n minus 1 is the interpolating polynomial interpolating given function at x 0 x 1 x n minus 1 p n is polynomial of degree less than or equal to n which interpolates the given function not only at x 0 x 1 x n minus 1, but also at x n and our claim is that p n x will be equal to p n minus 1 x plus this extra term. So, now, we are going to prove this and then from that we can write the Newton form for the Lagrange polynomial. So, we have got p n minus 1 x j to be equal to f x j for j is equal to 0 1 up to n minus 1 p n minus 1 x n minus 1. So, p n at x j is equal to f x j for j is equal to 0 1 up to n if I look at p n x minus p n minus 1 x this is going to vanish at x 0 x 1 x n minus 1 at the common 0s p n at x j will be equal to f x j is equal to p n minus 1 x j for j is equal to 0 1 up to n minus 1. So, we are going to have factors x minus x 0 up to x minus x n minus 1. Now, these are n brackets. So, right hand side this will be a polynomial of degree n. So, this will be a polynomial of degree n p n is a polynomial of degree less than or equal to n p n minus 1 is a polynomial of degree less than or equal to n minus 1. So, here what we will have will be a constant alpha a constant. So, p n x minus p n minus 1 x it has got this form. Now, let us calculate what is alpha. So, alpha is coefficient of n minus 1 minus 1 of x raise to n on the right hand side coefficient of x raise to n on the left hand side will be p n minus 1 is a polynomial of degree less than or equal to n minus 1. So, coefficient of x raise to n on the left hand side will be coefficient of x raise to n on the left hand side will be p n in p n x because there will be no contribution from p n minus 1 x. But coefficient of x raise to n in p n x is nothing but f of x 0 x 1 x n the divided different. So, thus you get p n x is equal to p n minus 1 x plus this divided difference multiplied by x minus x 0 x minus x n minus 1. So, thus we have shown that p n x is equal to p n minus 1 x plus this term. Now, you can replace n by n minus 1 and get a formula for p n minus 1 in terms of p n minus 2. So, p n x is p n minus 1 x plus this divided difference into x minus x 0 x minus x 1 x minus x n minus 1 replace n by n minus 1. So, you will get p n minus 1 x is equal to p n minus 2 x plus you are replacing n by n minus 1. So, you have got this divided difference into x minus x 0 x minus x n minus 2 which gives us p n x to be equal to p n minus 2 x plus these two terms. So, you can continue this process and then you can have p n x to be equal to f x 0 plus f of x 0 x 1 x minus x 0 plus this term. So, we have got the power form which is p n x is equal to h n 0 plus a 1 x plus a n x raise to n. Now, we have got another form. So, you have p n x is equal to a 0 plus a 1 x plus a n x raise to n and then we have p n x is equal to f x 0 plus f of x 0 x 1 x minus x 0 plus f of x 0 plus f of x 0 plus f of x 0 plus x 1 x n x minus x 0 x minus x n minus 1. So, it is of the form alpha 0 plus alpha 1 into x minus x 0 plus alpha n into x minus x 0 x minus x n minus 1. So, this is known as Newton form. This is the power form. Our alpha n is divided difference based on x 0 x 1 x n. Suppose, your points are all 0. So, if you have got x 0 is equal to x 1 is equal to x n is equal to 0. Then the divided difference f of x 0 x 1 x n this is going to be equal to nth derivative at 0 divided by n factorial and hence your p n x will be alpha 0 plus alpha 1 x plus alpha n x raise to n where alpha n is f n 0 by n factorial. So, that is nothing but the Taylor's truncated series. So, here the center is 0. Here you have got different centers. You have got x minus x 0 then x minus x 0 x minus x 1 and so on. So, this is the Newton form. This is the power form and we have looked at the Lagrange form. Look at the divided difference table. When we want to construct a interpolating polynomial then I am first going to look at only three points x 0 x 1 x 2. Look at the function values. So, f x 0 f x 1 f x 2. The first thing we do is we evaluate this divided difference. So, it will be f x 1 minus f x 0 divided by x 1 minus x 0. So, that will give us this term then divided difference based on x 1 and x 2. So, you calculate that and then you calculate the divided difference based on x 0 x 1 x 2 which will be this entry minus this entry divided by x 2 minus x 0. So, you prepare divided difference table. Then when we want to write the p 3 x you have x 0 x 1 x 2. It should be p 2 x. Actually it is a second degree polynomial. So, this will be f x 0 plus f of x 0 x 1 into x minus x 0 plus this divided difference multiplied by x minus x 0 x minus x 1. So, you are looking at these three entries and then you are writing your polynomial. Now, instead of taking the interpolation points as x 0 x 1 x 2 in that order. If you take in the order x 2 x 1 x 0 then you will have f x 2 plus this divided difference into x minus x 2 plus this divided difference into x minus x 2 x minus x 1. It is going to be the same polynomial. It is just that this will be forward formula and this will be backward formula, but the interpolating polynomial it is going to be the same. So, now let us look at an example. So, suppose x is taking values 0 1 2. So, this is x 0 x 1 x 2 the corresponding values of f x they are given to be 1 4 and 15. So, we will first calculate the divided difference 4 minus 1 divided by 1 minus 0 that will give us 3 15 minus 4 divided by 2 minus 1. So, that will give us 11 then 11 minus 3 divided by 2 minus 0. So, that is going to give us 4 then our p 2 x is going to be equal to 1 f x 0 plus 3 into x minus 0. This is f of x 0 x 1 into x minus x 0 plus 4 into x minus 1 into x minus 0. So, this is our p 2 x that is f x 0 plus f of x 0 x 1 into x minus x 0 plus f of x 0 x 1 x 2 into x minus x 0 x minus x 1. It is also going to be equal to if I write the backward formula it will be 15 that is value of f at x 2 plus 11 into x minus x 2 that is x minus 2 plus 4 into x minus 2 and x minus 1. So, x minus 2 x minus 2 x minus 2 x minus 1. You can check that both these they give you the same polynomial. It is the same interpolating polynomial only once I take my interpolation points in the order x 0 x 1 x 2 and in other I take as x 2 x 1 x 0. So, we have calculated p 2 x 0 plus 4 into x minus 1. Now, suppose you are also given the value at 3 to be 40. So, now what we will do is we will complete the divided difference table. So, now first the divided difference based on 2 and 3. So, that will be 40 minus 15 that is going to be 25 divided by 3 minus 2. So, this I am adding extra then 20 minus 5 minus 11 that is going to be 14 divided by 2. So, that will be 7 and then 7 minus 4 divided by 3 minus 0. So, that is going to be 1. So, we added one extra interpolation points and these are the entities which we calculated. And then our p 3 x will be equal to p 2 x and then p 2 x will be equal to p 2 x plus this nu divided difference 1 and then multiplied by x minus x 0 x minus x 1 and x minus x 2. So, 2 p 2 x you add this term and then you get interpolating polynomial. If you were using Lagrange form then you calculate the Lagrange polynomials corresponding to 0 1 2 and then you have to calculate completely again the Lagrange polynomials corresponding to 0 1 2 3. So, this is how the building of the polynomial it helps. Now, we are going to look at a general this thing I for the sake of simplicity I looked at 3 points, but if you have got x 0 x 1 x n n plus 1 points then these are the function values given to us. The first column contains the divided differences based on two points then divided difference based on three points and the last column will contain the divided difference based on n plus 1 point. And then p n x will be equal to f x 0 plus f of x 0 x 1 into x minus x 0 plus f of x 0 x 1 x n into x minus x 0 x minus x n minus 1. Or you can take the points in the other order and then you will have f x n plus f of x n minus 1 x n into x minus x n plus f of x 0 x 1 x n and your points are in the order x n x n minus 1 up to x 1 you have to go. So, that is going to be the background formula and in compact form you can write it as summation r goes from 0 to n x minus x 0 x minus r minus 1 and the divided difference based on x 0 x 1 x r. Remember always if you are going here up to x r you are multiplying up to x minus x r minus 1. Here in the backward formula it will be f of x s x s plus 1 x n or if you want x n x n minus 1 and then go up to s and then you multiply by x minus x n x minus x n minus 1 x minus x s plus 1. So, this is a forward formula and this is a backward formula they give you the same polynomial but then the reason we write this is because we want to prove next the Leibniz formula for the divided difference. So, that is why I wanted to write it in this form. So, now let me recall the Leibniz rule for the derivatives f into g see we have we are considering various properties of the divided difference. We saw what is the divided difference of alpha f plus g. So, that is the linearity. Now, suppose you have got functions f and g you take their product. What can one say about the product divided difference of the product? There is a relation between divided difference and the derivatives. If your points are identical then the divided difference based on x 0 repeated n plus 1 times that is nothing but f n x 0 divided by n factorial. And for the derivative of the derivatives we have got product rule. So, whether such a product rule exists for the divided difference and the answer is yes and that is where we will need the forward formula and the backward formula. So, let me recall the divided Leibniz rule for derivatives if you consider two functions f into g it is nth derivative at point x it is given by summation r going from 0 to n n factorial divided by r factorial n minus r factorial r th derivative of f at x plus multiplied by n minus r th derivative at x. So, f r x into g n minus r x. So, now, let me fix x to be equal to x 0 and the same formula I write as f n minus r x. So, f into g n th derivative at x 0 divided by n factorial this n factorial I take it on the left hand side. This is going to be equal to summation r going from 0 to n f r x 0 divided by r factorial and g n minus r minus r minus r minus r minus r minus r minus r minus r minus r x 0 divided by n minus r factorial I associate r factorial with f r and n minus r factorial with g n minus r. Now, the left hand side is nothing but divided difference of f of g f into g x 0 repeated n plus 1 times is equal to n minus r minus r minus r plus 1 times equal to summation r going from 0 to n divided difference of f based on x 0 repeated r plus 1 times and g divided difference of x 0 repeated n minus r plus 1 times. So, Lebanese rule for the derivatives I am just rewriting in a different manner that it is f into g the divided difference based on x 0 repeated n plus 1 times which is equal to summation r goes from 0 to n divided difference of f when x 0 is repeated r plus 1 times and divided difference of g when x 0 is repeated n minus r plus 1 time. Now, what we want to do is instead of x 0 repeated n plus 1 times. Suppose, I have got n plus 1 distinct points x 0 x 1 x n then whether we have this divided difference is equal to f and then here x 0 x 1 x r and then here it will be x r x r plus 1 x n. So, that is 1 wants to see whether such a thing is possible the question is whether f into g it is divided difference based on x 0 x 1 up to x n whether it is equal to summation r goes from 0 to n f of x 0 x 1 up to x r and g x r x r plus 1 up to x n these are r plus 1 points these are n minus r plus 1 points. So, instead of identical points whether the formula is true for the distinct points. So, this is question such a formula for the divided difference is valid. Now, the answer is yes. So, once again what we will do is our divided difference is coefficient of x raise to n in the interpolating polynomial. We have got f and g to be two functions. So, we will look at their interpolating polynomials. So, suppose p n is interpolating polynomial of f interpolating at x 0 x 1 x n for g suppose you have got another polynomial q n which interpolates the given function at x 0 x 1 x n. Now, if I look at product f into g. So, similarly I will look at the product p n x into q n x. Now, p n at x j is equal to f x j q n at x j is equal to g of x j. So, this polynomial p n into q n it will interpolate our function f into g. So, we have got product f into g at x j is equal to f x j into g x j f x j is equal to p n x j g of x j is equal to q n of x j. So, this is the result of the interpolation after this p n into q n will be a polynomial which will interpolate the product function, but then we do not want just a polynomial which interpolates, but we are interested in the degree p n is a polynomial of degree less than or equal to n g n q n is a polynomial of degree less than or equal to n. When I take its product it will be a polynomial of degree less than or equal to 2 n whereas, for the divided difference of f into g I will need a polynomial of degree less than or equal to n. So, we will see next time how to do this. So, the next time we are going to first prove the Lebanese rule for the divided difference and then we will consider the error in the interpolating polynomial. I had said earlier that the divided difference is also important in getting the error formula. This we are going to do next time. Thank you.