 Today, we are first going to prove Leibniz formula for a divided differences and then afterwards we will consider error in the interpolating polynomial and choice of interpolation points such that one part of the error it is minimized. So, there is a Leibniz formula for the derivatives and there is a relation between divided difference and the derivative values. So, what we do is we look at the Leibniz formula for the derivatives, write it in terms of the divided difference based on points which are repeated and then try to write an analogous formula and then give its probe. So, the Leibniz formula for derivatives is given by if you have two functions f and g which are n times differentiable. So, the derivative of f into g at x 0 is given by summation r goes from 0 to n, n factorial divided by r factorial into n minus r factorial and then r th derivative of f evaluated at x 0 and n minus r th derivative of g evaluated at x 0. So, the derivative of f into g is given in terms of the derivatives of f and derivatives of g involving the derivatives of order up to order n. The definition of divided difference f based on x 0 which is repeated n plus 1 times that is f n x 0 divided by n factorial. So, divide by n factorial so that the left hand side will be divided difference of f into g based on x 0 repeated n plus 1 times. Now, this will be equal to summation r goes from 0 to n, we have divided by n factorial associate r factorial with f r x 0. So, that will be divided difference of f based on x 0 repeated r plus 1 times and associate n minus r factorial with g n minus r x 0. So, that will be divided difference of g based on x 0 repeated in minus r plus 1 times. Now, what we do is here the points were repeated. So, whether I can have a formula of the type x 0 x 1 x n. So, now these are n plus 1 distinct points. Here you had n plus 1 coincident with n plus 1 and these are n plus 1 distinct points. Here you had n plus 1 coincident point. So, whether this is equal to summation r goes from 0 to n. Now, first r plus 1 points so that will be x 0 x 1 x r and last n minus r plus 1 points that will be g x r x r plus 1 up to f x n. So, the question is whether this is true and the answer is yes and that is going to be the Lebanese formula for the divided differences. So, what we are going to do is we are going to look at p n to be interpolating polynomial for function f evaluating interpolating at the points x 0 x 1 x n. Then we will look at another polynomial q n which interpolates g at the same n plus 1 points. Such polynomials they are unique take their product. Since p n interpolates f q n interpolates g p n into q n will interpolate the product function f into g. The definition of divided difference is look at coefficient of x raise to n in the unique interpolating polynomial. So, now, this p n into q n it is going to be an interpolating polynomial of our function f into g, but p n into q n will be a polynomial of degree less than or equal to 2 n. So, this p n into q n we will split into two parts and from that we will extract a polynomial of degree less than or equal to n which interpolates the product function f into g. And once we do that then we will relate the divided difference of f into g with divided differences of f and of g. So, here is a polynomial p n of degree less than or equal to n such that p n x j is equal to f x j. It is the unique polynomial which interpolates our given function f at points x 0 x 1 x n. Now, in the Newton form this polynomial is given by value of f at x 0 plus divided difference based on x 0 and x 1 into x minus x 0. And the last term is going to be here it should be plus dot dot dot there will be some more terms plus f of x 0 x 1 x n x minus x 0 x minus x n minus 1. When you are taking the divided difference up to n then you are multiplying by x minus x 0 x minus x n minus 1 this is the Newton form of the interpolating polynomial p n. We can write it in compact form as summation r goes from 0 to n divided difference based on x 0 x 1 x r multiplied by x minus x 0 into x minus x r minus 1. Here you go up to x r and here you go only up to x r minus 1. So, this is the interpolating polynomial of our function f. Now, we will look at similar polynomial for function g. So, q n is the unique interpolating polynomial interpolating g at x 0 x 1 x n. The interpolating polynomial is determined by the interpolation points the order of the interpolation points does not matter. So, for q n x we will use the backward formula that means we write it as q n x is equal to g of x n plus divided difference of g based on x n x n minus 1 x minus x n. And the last term will be g divided difference of g based on x n x n minus 1 x 0 multiplied by x minus x n into x minus x 1. So, this is the interpolation point. So, here you go up to x 0 then here you stop at x 1. So, the points which we are taking they are the interpolation points taken in the reverse order you have x n x n minus 1 up to x 0. What we had done was when we looked at function f then the interpolation points we took in the order x 0 x 1 x 2 up to x n. So, our p n x was f x 0 then the 2 points x 0 x 1 into x minus x 0 then x 0 x 1 x 2. So, f of x 0 x 1 x 2 into x minus x 0 x minus x 1. So, f of x 0 x 1 x 2 into x minus x 0 x minus x 1 and the last term is divided difference based on all these points. So, it is x 0 x 1 x n multiplied by x minus x 0 up to x minus x n minus 1. For the function g our points are going to be x n x n minus 1 x 0. So, the set is the same, but the points we are taking in the reverse order. So, q n at x will be equal to g at x n the first point plus divided difference based on x n x n minus 1 and now x minus x n. So, when we proceed in the in this form the last term is going to be x 0 x 1 x n and then you will be multiplying by x minus x n x minus x n minus 1 up to x minus x 1. So, it is x minus x n into x minus x n into x minus x 1. I could have written g the q n with the points to be taken in the order x 0 x 1 x n it is the same polynomial it is just I am here I am using the forward formula and here I am using backward formula. So, we have q n x to be equal to summation s going from 0 to n g of x n x n minus 1 x s multiplied by x minus x n and then you go up to x minus x s plus 1. Now, we are going to take product of these two polynomials. So, p n x is written in the forward fashion q n we are using the backward formula p n interpolates f q n interpolates g. So, when I take the product p n into q n of x j that will be nothing but p n at x j into q n of x j which will be equal to f x j into g x j. So, this will be equal to f into g x j. So, p n into q n interpolates x j at j is equal to 0 1 up to n the g n degree of p n q n is going to be less than or equal to 2 n. In order to talk of the divided difference we will need interpolating polynomial of degree less than or equal to n. So, look at the product of this p n into q n this is the formula for p n this is formula for q n you are taking their multiplication. So, this will be summation r goes from 0 to n summation s going from 0 to n f of x 0 x 1 x r g of x n x n minus 1 x s multiplied by x minus x 0 x minus x r minus 1 and then x minus x s plus 1 up to x minus x n r and s they take values from 0 to n. So, when you have got r is equal to n and s is equal to n you are going to have x minus x 0 up to x minus x n minus 1 that means there are going to be n brackets and here it will be x minus s or here you should take s is equal to 0 the term corresponding to r is equal to n and s is equal to 0. So, that will be x minus x 1 up to x minus x n. So, those will be also n bracket. So, that is why p n into q n will be a polynomial of degree less than or equal to 2 n it interpolates the given function f into g. We are interested in a polynomial of degree less than or equal to n interpolating the product function f into g. So, this is as I said this is a polynomial of degree less than or equal to 2 n p n into q n x j is equal to f into g x j for j is equal to 0 1 up to n. Now, this polynomial we are going to split into two parts. So, one part will be a polynomial of degree less than or equal to n. So, this interpolates the product function f into g other part will be such that it will vanish at our interpolation point. So, the summation r goes from 0 to n and s goes from 0 to n the first summation I split as summation r going from 0 to s and summation r going from s plus 1 to n. Now, the first part if you look at the first part it is going to be a polynomial of degree less than or equal to n because look here you have got x minus x 0 x minus x r minus 1 and then x minus x s plus 1 and x minus x i. So, when you have r is equal to s then that is the maximum value r can take you have here x minus x 0 x minus x s minus 1 and then here it is x minus x s plus 1 x minus x n. So, the bracket x minus x s will be missing. So, you are going to have only n brackets here and here you have got r is equal to s plus 1 to n x minus x 0 x minus x r minus 1 x minus x s plus 1 x minus x n. So, r is equal to s plus 1. So, that means it is going to be x minus x s and then you have got additional terms. So, here in the first part we have got summation r goes from 0 to s summation s goes from 0 to n some constant which is divided difference and then x minus x 0 x minus x r minus 1 and then x minus x s plus 1 x minus x n. So, here the maximum value of r is s. So, when you have got you have r to be less than or equal to s and for r is equal to s you have got x minus x 0 x minus x n by x s minus 1 x minus x s plus 1 x minus x n. So, at the most n brackets and hence if I call this as T x this T will be a polynomial of degree less than or equal to n. So, this was the first part. Now, the second part that is summation r going from s plus 1 to n summation s goes from 0 to n. Then you have got some constants beta. So, depending on say r and s and you are multiplying by x minus x 0 x minus x r minus 1 x minus x s plus 1 up to x n. So, the least value of s the least value of r is equal to s plus 1. So, the least value of r is equal to s minus x n. So, you have got at least the terms x minus x 0 x minus x s x minus x s plus 1 up to x minus x n. So, this will be there and in addition some if you are taking r is equal to s plus 1. So, what will happen for r is equal to s plus 2 you are going to have x minus x 0 x minus x s x minus x s plus 1 square and then x minus x n. So, thus these many brackets they are going to be common and if I call this as u of x then your u of x j is going to be 0 for j is equal to 0 1 up to n. So, we have p n into q n x is equal to the first part being a polynomial of degree less than or equal to n and the second part which vanishes at x j. So, u n at x j is equal to 0 for j going from 0 1 up to n and p n is 0. So, p n into q n at x j was equal to f into g x j that we have seen because p n interpolates f q n interpolates g p n into q n interpolates f into g. Now, p n into q n x j will be t n at x j plus u n at x j, but u n at x j is going to be 0. So, p n into q n x j is equal to t n x j. So, thus we have obtained a polynomial t n of degree less than or equal to n which interpolates our product function f into g at n plus 1 point. So, if I am interested in the added difference of f into g based on x 0 x 1 x n then I can look at the coefficient of x raise to n in the polynomial t x which is going to be the unique interpolating polynomial interpolating f into g at x 0 x 1 x n and then that is going to give us the formula for divided difference of f into g in terms of divided differences of f and of g. So, here is t n that is a polynomial of degree less than or equal to n it is the interpolating polynomial. So, coefficient of x raise to n in t n x if you want the coefficient of x raise to n then r should take the maximum value which is s then when r is equal to s you are going to have x minus x 0 x minus x s minus 1 x minus x s plus 1 into x minus x n and thus the coefficient of x raise to n will be given by this coefficient with r is equal to s. So, coefficient of x raise to n in t n x that is nothing but divided difference of f into g at x 0 x 1 x n which will be equal to coefficient of x raise to n in t n x that will be when r is equal to s. So, summation r going from 0 to n f of x 0 x 1 x r and g of x r x r plus 1 x n the divided difference is independent of the order. So, whether I write divided difference of g based on x n x n minus 1 x r or whether I write it as divided difference of g based on x r x r plus 1 x n then it is one and the same. So, now we have proved the Leibniz formula for divided differences. Now, next important formula which we are going to prove that is the error in the interpolating polynomial for the proving the formula for error in the interpolating polynomial. We are going to make use of the fact that using divided differences you can build polynomial in the sense that if you have a polynomial p n interpolating the given function at x 0 x 1 x n and if you add one more interpolating point x n plus 1 then whatever is p n x to that you add one more term and then that gives you the new interpolating polynomial. So, you have x 0 x 1 up to x n these are distinct points and p n at x j is equal to f at x j j going from 0 1 up to n the degree of p n is less than or equal to n. Now, we add one more point. So, you have got x 0 x 1 x n and then x n plus 1 p n plus 1 we want a polynomial of degree less than or equal to n plus 1 such that p n plus 1 x j is equal to f of x j for j is equal to 0 1 up to 0 1 up to 0 1 up to n and then additional point n plus 1. So, we have seen that p n plus 1 x is equal to p n x the earlier polynomial plus divided difference based on x 0 x 1 x n plus 1 multiplied by x minus x 0 into x minus x n. So, that is the formula for p n plus 1. Now, we are interested in the error in the interpolating polynomial. So, that means we want a formula for p n plus p n x. So, what we are going to do is p n x is interpolating at x 0 x 1 x n. So, first we will look at a point x bar which is such that x bar is distinct from x 0 x 1 x n and then consider p n plus 1 which interpolates f at x 0 x 1 x n and then x bar. So, we have got p n is interpolating polynomial. So, p n at x j is equal to f of x j j is equal to 0 1 up to n x bar is such that it is not equal to x j for j is equal to 0 1 up to n and let p n plus 1 be such that p n plus 1 x j is equal to 0 1 up to n. So, p n plus 1 x j is equal to f x j and p n plus 1 x bar is equal to f x bar. So, j is equal to 0 1 up to n. So, instead of taking x n plus 1 to be a fixed point, afterwards I want x bar to vary over the interval a b. So, that is why I am denoting it by x bar. Now, p n plus 1 x will be equal to p n x plus divided difference based on x 0 x 1 x n additional point which is x bar multiplied by x minus x 0 x minus x n. So, this is my polynomial p n plus 1 what earlier I was calling x n plus 1 I am calling it x bar. Now, we have f x bar is equal to p n plus 1 x bar. So, this will be equal to p n of x bar wherever there is x you have to write x bar plus divided difference based on x 0 x 1 x n x bar and now you have to replace x by x bar. So, it will be x bar minus x 0 x bar minus x n x bar and now you have to replace x by x bar. So, it will be x bar minus x 0 x bar minus x n. So, now what I am going to do is look at f x bar minus p n x bar that is going to be this divided difference multiplied by x bar minus x 0 x bar minus x n f x bar minus p n plus minus p n x bar. So, it will be f x bar minus p n x bar this will be equal to f of x 0 x n x bar multiplied by x bar minus x 0 into x bar minus x n f x bar minus p n x bar is equal to this divided difference multiplied by the x bar minus x 0 x bar minus x n. Now, for x bar what we wanted was x bar should not be equal to x j x bar belongs to interval a b. So, this x bar it is a dummy variable. So, instead of x bar if I write x again it is going to valid. So, I will get f x minus p n x to be equal to f of x 0 x 1 x n x. So, I will get f x minus p n x to be equal to f of x 0 x 1 x n x multiplied by x minus x 0 x minus x n when x not equal to x j for j is equal to 0 1 up to n. So, I have got the error for x not equal to x j to be equal to divided difference of f based on x 0 x 1 x n x multiplied by this product. Now, what will happen if x is equal to x j if x is equal to x j f x j minus p n x j is 0 because p n interpolates f at x j and because of this presence of x minus x 0 x minus x n this bracket also or this product also will be 0. So, both left hand side and right hand side they are 0 and hence I can say that this is going to be valid for all x belonging to interval a b. And thus we have got error to be f x minus p n x is equal to f of x 0 x 1 x n x multiplied by x minus x 0 x minus x n. So, this is the error in the interpolating polynomial it is given by this suppose your function f is sufficiently differentiable that means n plus 1 times differentiable in this case. Then what we can write this as f of x n x n plus first derivative evaluated at some point d depending on x divided by n plus 1 factorial multiplied by let me call this function as w x. So, multiplied by w x suppose your points x 0 x 1 x n instead of being distinct suppose they are coincident then what we know is. So, suppose you have got x 0 is equal to x 1 is equal to x n then we have seen that the interpolating p n polynomial p n is nothing but the truncated Taylor series. So, we have if x 0 is equal to x 1 is equal to x n then when you consider p n x that is given by f x 0 plus f of x 0 x 1 into x minus x 0 plus f of x 0 x 1 x n multiplied by x minus x 0 x minus x n minus 1. So, if these are all equal this is nothing but f x 0 plus f dash x 0 into x minus x 0 plus f of x 0 x 1 x n multiplied by x minus x 0 x minus x n minus 1. So, if these are all equal this is nothing but f x 0 plus f dash x 0 into x minus x 0 into x minus x 0 into x minus x 0 plus f n x 0 divided by n factorial x minus x 0 raise to n. So, this is the interpolating polynomial and f x is equal to f x minus p n x this just now we saw that it is f n plus 1 d x divided by n plus 1 factorial into x minus x 0 raise to n plus 1. So, the result which we have obtained for the error in the interpolating polynomial that is the generalization of Taylor's theorem. So, here is the error in the interpolating polynomial that is f is from a b to r x 0 x 1 x n these are distinct points in the interval a b p n is a polynomial of degree less than or equal to n such that p n x j is equal to f x j. Then f x minus p n x the error consists of two parts one is the divided difference multiplied by x minus x 0 x minus x 1 x minus x n. So, now, that brings us to the question of choice of the interpolating points the error f x minus p n x that is equal to the divided difference based on x 0 x 1 x n x and multiplied by the function w x which is consists of x minus x 0 x minus x 1 x minus x n. Now, the function f is given to us what is in our hands it is the choice of x 0 x 1 x n. So, the question one ask whether it is possible to choose these points x 0 x 1 x n such that the second part w x that can be minimized. So, what we want is our x 0 x 1 x n they should vary over our interval a b, but they whether it is possible to choose them. So, that the norm of w x that is minimized the infinity norm. So, we have f x minus p n x is equal to f of x 0 x 1 x n x multiplied by x minus x 0 x minus x n. So, this I am calling it to be f x minus x 1 x w x. So, the question is whether we can look at minimum of norm w infinity the minimum will be taken over x 0 x 1 x n varying over interval a b whether we can find such a minimum what can be done. So, if I look at w x w x is going to be x raise to n and then or rather it will be x raise to n plus 1 because you have got x minus x 0 x minus x 1 x minus x n. So, it is going to be x raise to n plus 1 and then whatever remains it will be a polynomial of degree less than or equal to n. So, it will be of the form a 0 plus a 1 x plus a n x raise to n. So, now minimization of norm w infinity we can say that it is same as minimization of norm of x raise to n plus 1 minus let me call this function as q n x. So, q n x it is infinity norm where q n belongs to the space of polynomials of degree less than or equal to n. So, polynomials of degree less than or equal to n. So, the minimization of this norm w infinity or the optimum choice of the interpolation points this we have reduced to best approximation to the function x raise to n plus 1 from the space of polynomials of degree less than or equal to n. Now, such a minimum exists and that minimum is going to be attained when you choose x 0 x 1 x n to be the zeros of the Chebyshev polynomial. Now, I am not going to prove this fact, but what I am going to do is I am going to define the Chebyshev polynomials and write down what are its roots. This is the error we are trying to minimize this w x it is infinity norm. So, this is the problem. So, to choose x 0 x 1 x n such that norm w infinity is minimized this w x is of the form x raise to n plus 1 minus a polynomial of degree less than or equal to n. So, it is x raise to n plus 1 minus q n x. So, the minimization of norm w infinity with the minimum taken over. So, that x 0 x 1 x n they vary over interval a b that minimization problem is same as finding the best approximation to x raise to n plus 1 from the space of polynomials of degree less than or equal to n. So, here are Chebyshev polynomials for the to start with we define the Chebyshev polynomial on interval minus 1 to 1 and if you consider a general interval a to b then what you have to do is consider a fine 1 to 1 on to map from minus 1 to 1 to interval a b and take the image of the zeros of the Chebyshev polynomial defined on minus 1 to 1. So, the Chebyshev polynomial is defined as it is on the interval minus 1 to 1. So, every point in the interval minus 1 to 1 is of the form cos theta where theta varies between 0 to pi. So, if x is equal to cos theta then we define t n x to be equal to cos n theta or you can write t n x to be equal to cos of n cos inverse x x belonging to minus 1 to 1. So, this is the Chebyshev polynomial using the trigonometric identities we can use the we can prove a recurrence relation here this plus should be minus. So, when I look at t n plus 1 x plus t n minus 1 x it is going to be by definition cos of n plus 1 theta plus cos of n minus 1 theta. Now, cos of n plus 1 theta will be cos n theta cos theta minus sin n theta sin theta similar formula for cos of n minus 1 theta. So, the sin term gets cancelled and you are left with 2 cos n theta cos theta cos n theta is t n x and cos theta is x. So, t n plus 1 x will be 2 x t n x and then you are taking here. So, this should be minus. So, minus t n minus 1 x. Now, using this recurrence relation what one can show is that t n x is going to be a polynomial of exact degree n and it is leading coefficient is going to be 2 raise to n minus 1. So, t n will be a polynomial of degree n if it is a polynomial of degree n then we know that it is going to have n roots. Now, these n roots in general when we say that a polynomial of degree n is going to be n roots. Now, these n roots in general when we say that a polynomial of degree n has n roots the roots can be repeated. In that case you have to count a root according to its multiplicity, but this Chebyshev polynomial it has n distinct roots. See, we are our minimization problem is minimizing over a distinct set of points. So, whatever solution we get using this best approximation that again should give us n distinct points and that is what happens that the t n x the Chebyshev polynomial which is of degree n we show that it has got n roots n distinct roots. So, t n plus 1 x is equal to 2 x t n x minus t n minus 1 x if you put n is equal to 0 then cos of 0 is 1. So, t 0 x is going to be constant function 1 when n is equal to 1 t 1 x will be cos theta cos theta is x. So, t 1 x will be cos theta 1 x is equal to x and then the recurrence relation t n plus 1 x is equal to 2 x t n x minus t n minus 1 x we have specified t 0 and t 1. So, now we can calculate t 2 t 3 and so on. Now, t 0 is a constant polynomial t 1 is a linear polynomial when you will look at t 2 x then you have got 2 x into x. So, that will be a polynomial of degree 2. So, by induction one can show that t n plus 1 will be a polynomial of degree n plus 1 and the leading coefficient is going to be 2 raise to n. So, it is true for n is equal to 0 to 1 and using the recurrence formula it is easy to show that the leading coefficient will be 2 raise to n. Now, we look at the roots of the Chebyshev polynomial. So, t n x is equal to cos n theta cos n theta will be 0 if n theta is equal to pi by 2 plus m pi where m can take value 0 plus or minus 1 plus or minus 2 and so on. But, all these values they will not give us distinct roots. So, the distinct roots they are given by n theta is equal to pi by 2 plus pi by 2 plus pi by 2 plus n minus 1 pi and that means theta will be equal to 1 upon n into pi by 2 plus m pi or that means 2 m plus 1 pi by 2 n for m is equal to 0 1 up to n minus 1. When m is equal to n then you get again the same root. So, the roots of t n x they are given by when theta is equal to 1 by n pi by 2 plus m pi. So, that is 2 m plus 1 pi by 2 n. Now, these can be interpreted as divide the upper part of the unit circle into n equal parts. So, that means we are taking the points to be 0 pi by n 2 pi by n n pi by n. Take the midpoints and project on to minus 1 to 1. So, you have got a unit circle look at its upper arc then this is going to be corresponding to 0 this will be n pi this will be 2 n pi and so on. You look at the midpoint you project on to minus 1 to 1 this is 0. So, this is minus 1 this is 1 you have midpoint here you draw it here you project. So, like that you are going to get the Chebyshev points or zeros of the Chebyshev polynomial and these are the ones which will minimize our norm of w. So, this is all for today's lecture and we will continue in the next lecture the study of our interpolating polynomials. I will state a result about the convergence of polynomials or other non convergence of polynomials and thank you.