 Hi, we have finished our discussion on polynomial interpolation. In this lecture, we will solve some tutorial problems, especially these problems are important from the point of view of quadrature rules which we will be studying in the next chapter. Let us consider this problem as our first problem. We are given n plus 1 distinct nodes and we have the Lagrange polynomials corresponding to each node. We can show that the sum of all these Lagrange polynomials at any point x in r will take the value 1. So, that is the problem. This is an interesting and also very important problem. Let us see how to show this. Recall that once we are given a set of n plus 1 nodes, we can write the interpolating polynomial of a given function f at these n plus 1 nodes. It is given by this formula. It is written in the form of the Lagrange interpolating polynomial. So, in this, what you do is you just want to have this expression. In the polynomial representation, you can see that you have the representation with coefficients as f of x k. So, if you can make this term to be equal to 1, then at least the left hand side in our question is precisely what is given here with f of x k equal to 1. For that reason, what we will do is in particular we will take the function f of x equal to 1 for all x in the interval a to b. In fact, you do not need to restrict yourself to any interval a to b. We can in fact, generalize it to any r here. Even here you can take any nodes in r. It does not matter. Then you can see that for this particular function, this expression is written as k equal to 0 to n l k of x. Now, what happens to the left hand side? Let us see. The left hand side is the polynomial interpolating the function f of x equal to 1. What is this function f of x equal to 1? This is precisely the polynomial of degree 0, which is a particular case of a polynomial of degree less than or equal to n. What is this polynomial? It is a polynomial of degree less than or equal to n again. It is interpolating the function f, which is again a polynomial of degree less than or equal to n. Therefore, by uniqueness we can see that the interpolating polynomial p n of x is equal to f of x, because this is also a polynomial of degree less than equal to n and this is also a polynomial of degree less than or equal to n. Therefore, by uniqueness they have to coincide. If you recall, in our very first lecture on interpolating polynomials, we have proved a theorem on existence and uniqueness. From that we can see that p n of x is a unique interpolating polynomial at the given nodes for the given function f. Now, in this particular case f also happens to be a polynomial of degree less than or equal to n. Therefore, p n of x will coincide with f of x for all x. In fact, you can say for all x in r and thus you can see that the left hand side is precisely equal to 1. This is what we want to show in our problem. Therefore, you choose any n plus 1 nodes and if you sum all the corresponding Lagrange polynomials at any real number x, then you will land up by getting the value 1 only. So, that is an interesting and also important result. Let us pause on to our next problem. Suppose you have a function f which is a c n plus 1 function that is the function f is n plus 1 times continuously differentiable on an interval a b and we are also given n plus 1 nodes in the interval a b and they are distinct. Now, what we are doing is we are choosing 1 point x in the open interval a comma b which is different from the nodes that you have already chosen. Therefore, you now have n plus 1 distinct nodes plus a real number x in the interval a comma b which is different from all these nodes. Therefore, you have n plus 2 distinct points in the interval a comma b. Now, we want to show that if you make the divided difference of the function f at these n plus 2 nodes, then you can find a xi corresponding to that x that is why we have the notation xi x such that the n plus first derivative of f evaluated at xi x divided by n plus 1 factorial is precisely the divided difference of f at these n plus 2 nodes. So, this is what we want to show let us see how to show this result. Remember we have now given n plus 1 nodes x naught x 1 up to x n and then we have added one more point x into our data set. By that we have n plus 2 distinct nodes and therefore we can construct a polynomial interpolating the function f at these n plus 2 nodes and it will be a polynomial of degree less than or equal to n plus 1. Now, since this polynomial is interpolating the function f with respect to these nodes remember the nodes also include the point x. Therefore, the interpolation condition with respect to x as a node will tell us that f of x is equal to p n plus 1 of x. Let us keep this in mind and go ahead and see what happens. Recall that p n plus 1 can be written in the Newton's form of interpolating polynomial and it is given by the polynomial of degree less than or equal to n plus this extra term. So, this is how Newton's form of interpolating polynomial is written. It is written as the one lower order polynomial plus an extra term and that extra term is precisely given like this and since I am already using the notation x as one of the nodes. So, I have used t as the variable in this polynomial. So, just keep in mind that t is the variable, but x is one of the fixed nodes. So, this is notationally little bit different from what we have used in our chapter throughout. This is because we have fixed x as one of the nodes in this interpolating polynomial. Now, what you do is take t is equal to x and see what happens. If you take t is equal to x you will have x here x here and all this will be x. But we know that the point x is one of the nodes used in constructing p n plus one of t. Therefore, this is in fact is equal to f of x right that is what we have already observed in our first step. Therefore, you can put this value here and get f of x is equal to p n of x plus this extra term where all this t is in our previous expression now is replaced by x right. Now, I will take this to the left hand side and write f of x minus p n of x equal to the remaining term on the right hand side. Now, you can try to see what this is. You can see that this is nothing, but the mathematical error in the interpolating polynomial p n evaluated at the point x right. In one of our previous lectures we have got an expression for this mathematical error. What is that? Let us recall that the expression for the mathematical error is given by this of course, we have to assume that f is a c 1 function in order to use this formula for the mathematical error. If you recall we have already put the assumption in our problem. Therefore, we can use this theorem and replace the mathematical error on the left hand side by this expression right from our theorem which we have already proved in our theory class. Therefore, I will remove the mathematical error on the left hand side from my previous expression and plug in the expression derived in that theorem and that gives me this equation. Now, you can see that this term is precisely this term on the right hand side. Therefore, you can cancel this to y because we have chosen our x in such a way that x is not equal to any of this nodes that we have considered. Therefore, this term is not equal to 0 and similarly this is also not equal to 0. That is why we are cancelling and concluding that the divided difference of f evaluated at these n plus 2 nodes is precisely equal to this expression f n plus first derivative evaluated at xi x divided by n plus 1 factorial. This is also an important result. We often use this in proving the errors for certain quadrature formulas in our next chapter. Therefore, we have to remember this result. With this, let us pause on to the next problem. In this problem, we again have f to be n times continuously differentiable function on the interval a comma b that is to say that f belongs to c n of a comma b. Now, for any x in the interval a b, we want to show that the nth order divided difference f, but here now we have a slightly new situation that all the arguments in the divided difference are same and it is given by f nth derivative evaluated at x divided by n factorial. So, this is something new to us because so far whatever problem we worked, we always assumed that the nodes are distinct. But here we have all the nodes have same value x. Suppose you have nodes say x naught, x 1, x 2 and x 1 again. Then you can see that there are two nodes which are repeated. Now, can be say that the divided difference for this set of nodes where two nodes are repeated is well defined. That is the question because there is a serious problem here. You may write this as f of x 1 comma x naught comma x 2 comma x 1. If you recall, we have proved that the divided difference formula is symmetric with respect to any permutation of the nodes. Therefore, I can shift x 1 to this position and write the nodes in this order and then apply the divided difference. The value that I obtain from here will be the same as the value obtained from here also. This is what the symmetric property of the divided difference tells us. Now, let me write the formula for the divided difference with the nodes arranged in this way. How will you write that? It is precisely f of x naught comma x 2 comma x 1 minus f of x 1 comma x naught comma x 2 divided by x 1 minus x 1. That is f of x the last one minus the first one. Now, you can see that the denominator is equal to 0 and that gives us a big question whether this divided difference is well defined or not. Therefore, any nodes are repeated then we have a serious question of whether the divided difference corresponding to that set of nodes is well defined or not. So far, we never encountered this problem because we always assume that the nodes are distinct. In fact, while constructing interpolating polynomials, we actually need distinct nodes. We do not need to consider any two nodes or more than two nodes repeat. That will not make sense as far as the construction of the interpolating polynomials are concerned. But, such situations will occur when we were trying to find the errors for quadrature formulas in the next chapter. Therefore, we have to also carefully understand how this divided differences will be defined when two or more nodes are repeated. So, this can be done. Then, using a formula called Hermit-Ginocchi formula, once we understand the Hermit-Ginocchi formula, we can say that the divided differences are in fact defined even if two or more nodes are repeated. So, let us quickly understand how this Hermit-Ginocchi formula is given for divided differences and then we will come back to this problem and try to prove this result. Let us take a small deviation and understand this Hermit-Ginocchi formula and then we will come back to our problem. What Hermit-Ginocchi formula says is that suppose you have n plus 1 distinct nodes, remember we will take all these nodes to be defined distinct in order to prove this formula. Once you prove the formula, you can observe that that formula even holds for repeated nodes. That is the idea behind this. Therefore, to derive the formula, you need to have distinct nodes. For that reason, we will assume that the nodes are distinct and f is a c n function on the interval a, b. Once you have these two conditions, then your divided difference which you know how to obtain using the formula that we have so far used. Now, the Ginocchi formula says that the same divided difference can also be obtained using this formula which involves this multiple integral. So, here t 1, t 2 up to t n are the variables used in this integral and they appear in the integrand like this and the integrand is the nth derivative of the function f. That is why we have assumed that f is a c n function in the interval a, b. Therefore, this makes sense and in fact, the integrand is continuous. What is this set on which we are taking this integral? Let us try to understand this set. The set tau n is given like this. It is the set of all n tipples such that all t i's are greater than or equal to 0 and they sum to sum number which is less than or equal to 1. Let us try to understand how this set looks like. For instance, if n is equal to 1, you have tau 1 is equal to set of all. Only one number will be there t 1 such that t 1 is greater than or equal to 0 and from the summation you can see that t 1 is less than or equal to 1. This is precisely the closed interval 0 to 1. Let us see how this set looks like if n is equal to 2. For n is equal to 2, tau 2 is equal to the set of all tipples t 1 comma t 2 such that t 1 is greater than or equal to 0. So, both are positive and t 1 plus t 2 is less than or equal to 1. How will that look like? Let us try to visualize it in the t 1 t 2 plane. So, both t 1 and t 2 are greater than or equal to 0. That tells us that we have to sit in the first quadrant of the plane t 1 t 2 and then you also have one more additional information that t 1 plus t 2 is less than or equal to 1. That is when t 1 is equal to 0, you can have up to t 2 is equal to 1. Similarly, when t 2 equal to 0, you can at most have t 1 is equal to 1. So, this set will be the set bounded by these 3 lines. So, this is the set tau 2 which is nothing but the region bounded by these lines. So, we now understood how t 1 t 2 up to t n comes and the integral is also with respect to these variables. In addition to these n variables, we also have one more variable t naught and that is given by this expression. So, now I hope you understood the formula. The theorem says that the divided difference of order n which we know how to compute by this time can also be obtained by this formula. That is what it says. Now, look at this formula. You can clearly see that you do not have any problem that you faced with the previous form of the formula. So, if you recall in the previous form of the formula, the divided difference seems to be having problem when 2 or more nodes are repeated. But in this form that is in the Ginochi form, you can see that even if 2 or more nodes are repeated, you still can have a clear meaning for this integral. So, that is what the advantage of Hermit Ginochi formula. Let us not prove this formula in the general case, but let us try to have a feeling of it by seeing how the proof goes when n is equal to 1. Remember for n is equal to 1, tau 1 is simply the closed interval 0 to 1 and t naught is given by 1 minus t 1. For n is equal to 1, you can see that you have f of x naught comma x 1 and the right hand side is correspondingly written as integral 0 to 1 f dash of x naught t naught plus x 1 t 1 into dt 1. Let us take the right hand side and see how we can obtain the divided difference from this formula. For that, let us take the right hand side with n is equal to 1 and that is given by this and remember we have t naught equal to 1 minus t 1. Let us replace t naught by 1 minus t 1 and now you can slightly adjust this argument and write it as x naught plus you take t 1 and combine it with the second term and write t 1 into x 1 minus x naught. Now, you are integrating it over the interval 0 to 1 and that can be directly integrated to get this expression. You are integrating with respect to t 1. Remember that therefore the integral can be written like this evaluated at these two points. Now, how will they come? Well, this limits precisely gives us f of x 1 minus f of x naught and then we have divided by x 1 minus x naught and if you recall this is precisely the first order divided difference of the function f at the points x naught and x 1. Therefore, we can easily prove the Ginochi formula for n is equal to 1 and we have seen that this formula is precisely the divided difference when n is equal to 1. You can similarly prove it for any n using an induction argument, but we will skip this proof for our course and we will now go back to our problem that we started with. Recall that we want to prove that the divided difference of f of order n where all the nodes are repeated can be written in this form. So, how to prove that? Well, what you do is you take the left hand side and you rewrite like this. You add h to the second node, 2 h to the third node and so on and then take limit h tends to 0. Now, you see you have all the distinct nodes. Therefore, you can go back to the Hermit Ginochi formula. This can be written in the Hermit Ginochi form with the limit h tends to 0. Remember in the Hermit Ginochi formula we have t naught is equal to 1 minus sigma i equal to 1 to n t i. So, we will just plug in this expression into t naught and we can write it as limit h tends to 0. This multiple integral of nth derivative of f evaluated at this point where t naught is now replaced by this expression and this argument can be rewritten in this form. I leave it to you to see it is a simple calculation. Once you rewrite it in this form, now what you do is recall that we have assumed that f is a c n function. It means the nth derivative of f is a continuous function and tau n is a bounded set. Therefore, you can write this limit as integral tau n f n of x d t 1 up to d t n. What I am doing is I am taking this limit inside. You can do that I leave it to you to see why it is because f n is continuous and tau n is bounded. Therefore, you can take the limit inside and further since f n is continuous you can take the limit further inside this bracket and therefore, you can get f n of x and the integral is taken over this tau n. Now, you see this term is independent of all these t i's. Therefore, you can pull this out and write f n of x into integral d t 1 up to d t n. Now, you see this is the volume integral and what is the volume of tau n? You can see that tau n is a simplex in r n and its volume is given by 1 by n factorial. So, this result is familiar to us from our multivariable calculus course and therefore, you can see that the nth order divided difference with repeated nodes actually is equal to the nth derivative of f evaluated at x into 1 by n factorial. So, that is what is given here f n of x divided by n factorial. So, this completes the proof of problem number 3. Let us go on with problem number 4. In this problem we have n plus 1 distinct nodes again given in an interval a b and we are picking up one more point in a b which is different from all these nodes. Then the n plus second order divided difference of the function f with nodes as x naught x 1 up to x n and in addition to these n plus 1 nodes you also have two more nodes which are repeated now ok. Now, here you see you have only two nodes repeated and that can be written as d by dx of the divided difference of f at the nodes x naught x 1 up to x n and only 1 x ok. So, if you have two nodes repeated then you can reduce one node by introducing one derivative of the divided difference of that function. Remember this is now viewed as a function of x. In fact, from the Ginochi formula you can also show that this function that is the function x 2 f of x naught x 1 up to x n comma x. This is a continuous function you can prove this result using Hermit Ginochi formula, but the proof of this is outside the scope of this course. Therefore, we will not prove this result, but it is a very important result. Note that the position of the node x need not be at the last position it can stay anywhere in this nodes ok because the divided difference is symmetric therefore, it does not matter where you place this nodes. Even in this formula you may have f of x naught x comma x 1 comma x n comma x. This can also be written in the same way again this x on the right hand side can be placed anywhere among this nodes ok. So, the position need not be like this that is what I am trying to say this is clear from this symmetric property of the divided difference ok. So, you can place this nodes anywhere you want that is what is very important here. We are just placing the nodes one after the other here ok and also here we are placing at end it is not necessary that they have to be placed like this they can be anywhere. If any two nodes are repeated on the left hand side then you can cut one node and introduce this derivative. For instance suppose if I have f of 1 comma 2 comma 3 comma 2 comma 4 then that can be written as d by d x of f of 1 comma either you can just remove this or remove this for instance I will remove this 3 comma x comma 4 you can do that and then evaluate this derivative at the point x is equal to 2. So, this repeated nodes can be anywhere you want and similarly you can also generalize it to 3 nodes repeated 4 nodes repeated and so on ok. So, how to prove this the proof is not very difficult it just follows from the simple calculus ideas, but for that first you remember that using hermit Ginochi formula you can show that this function that is x going to the divided difference of f at these nodes is a well defined function is a well defined function remember from the direct formula it is not very clear whether it is well defined or not if two nodes are repeated. But through hermit Ginochi formula you can see that it is a well defined function and it is also a continuous function. Now what you do is you take the left hand side and just write it as x comma x plus h something what we did in our last problem the same idea you do and now you take h tending to 0 right. Now what I will do is by symmetric property of the divided difference I will just shift this node x to the first position I am not doing anything I am just shifting this node first position thanks to the symmetric property then what we will do is remember all these nodes are distinct therefore, you can use the classical definition of the divided difference itself and write this formula and then you already have h tending to 0 right. Now I will again shift this x to the last position and write the same formula in this form remember by shifting one node anywhere within this nodes is not going to change the value of that divided difference right. Again the symmetric property of divided difference is used to write this divided difference in this form. Now let us see what happens if you recall this is precisely the derivative of the function capital F right. Now remember we are viewing this as a function f of x then this is nothing but f of x plus h and this is the function f of x divided by h and that is precisely f dash of x right and if you recall capital F of x is precisely defined as the divided difference of the function f evaluated at these nodes ok. So, that completes the proof of this problem these are some of the important problems regarding divided difference formula what we did is from our theory part we had a formula for divided difference and that formula is very nice as far as the nodes are distinct. But in applications we also come across the situations where certain nodes may be repeated for that we need to have a different form for the divided difference formula. So, we have introduced hermit ginochi formula for this and we have solved some important problems using hermit ginochi formula with this. Thank you for your attention.