 Hi, in this lecture we will start a new chapter on Interpolation. We will be studying polynomial interpolations. In this lecture we will prove that there exists a unique polynomial interpolation for a given set of data. We will start our discussion with a small introduction to polynomial interpolation and also we will see where it is useful. Let us consider the function f of x equal to sin x. The graph of the function sin x is given in the solid blue line. The x axis denotes the angle in radiance and y axis gives the sin value at x. Just imagine that we do not know what is the function given to us, but we only know a set of x values along with the value of the function at these points. Now, the question is can I find a function say more precisely we are interested in a polynomial. The question is can we find a polynomial such that p of x i is equal to y i, where x i's are these points and y i's are the corresponding values given in this table. We will call this table as data set and we are interested in finding a polynomial such that it passes through all these points. That is something like this that is our interest and what we are going to do with this is suppose we want to find the value of the function at some point x say x is equal to say 3.5. We want to find the value of this function say it is this value, but since we do not know this function of course, we will not be able to evaluate using the exact function rather if we find such a polynomial then we can actually get the value of the polynomial and take that as the value that we want that is you can evaluate the value at minus 3.5 say we are interested in the value at minus 3.5 then you can just evaluate this. Therefore, we are actually interested in finding the value sin minus 3.5 since we do not know this function therefore, we cannot find this value rather we constructed the polynomial that passes through this data points and then we will find the value of that polynomial and consider this as an approximation to what actually we want. In this process what we are losing as a error is the distance between these two points right. Well in this case you can see that the approximation is not that good because p of minus 3.5 is quite far away from the exact value rather what I will do now is I will introduce little more points into my data set that is I am inserting more points into my data set and now I will ask the same question can I find a polynomial p of x let us call this as now q of x that passes through all these points that is q of x i will be equal to y i and graphically we are expecting this polynomial to pass through all the given data points right. So, you can see that such a polynomial is shown in the green solid line and you can see that this green solid line passes through all the points right. So, it passes through all the points that we have taken as data in our table and this is actually polynomial that comes out of this data set. Now if I ask can I find the value of the function at the point minus 3.5 well of course, we cannot find this value from the exact function because we do not know what is that function rather we can now use q of x to find that value at least graphically you can see that q of x is giving us a good approximation to the exact value that we want. So, from here what we see that if you are given a data set then we would like to find a polynomial that satisfies the data set graphically the polynomials graph should pass through all the points that are given in the data set that is what we want. Why we want to construct such a polynomial well often in practical applications we have some data, but sometimes we miss certain data in the given data set due to some problems. For instance suppose you have a model in which you have to give certain inputs that are generated from an experiment. For instance you have to run an experiment and get the data for every often are in one day and that set of 48 data should be plugged into a model say. Now you go to perform the experiment and every often are you will take the reading from the experiment and the next day you will collect that 48 set of data and give to your model this is what you are doing and suppose in between something happened and you were not able to take the reading for certain data like for instance at 1 o clock you went for lunch and you forgot to take the reading from your experiment. The experiment is running, but you missed to take the experiment data at 1 o clock say. Then at the end of the day you will be having 47 data where x coordinate is the time and y coordinate is the observation that you had from the experiment. Now in between at 1 o clock you missed the reading and therefore this is not a complete data set that can be plugged into your model for further analysis. Now what you will do? Well you can probably guess something randomly and feed that as the value at 1 o clock, but if it is ok then you can go for generating a polynomial that satisfies the given 47 data sets and then take the value of that polynomial well that will also be not exactly what you would have observed in the experiment. What you lost is definitely lost, but constructing the polynomial and taking the value from that polynomial may be mathematically justified way of choosing or guessing. See that is the only advantage of going for such tools with that let us pose some question. Suppose we are given a data set like this in this the x coordinate is generally called nodes and we always take these nodes as distinct nodes that is each x i is not equal to x j for every i and j lying between 0 to n at least for the construction of interpolating polynomial we will consider all the nodes as distinct nodes and we are also given corresponding values. This values may be generated from a function like how we did in our previous example or these values may be coming from some other source something like these are coming as observations from some experiments. Now the question is can we find a polynomial whose graph pauses through these points right such a polynomial is called the interpolating polynomial. Let us give the definition more precisely we are looking for a function which is a polynomial of degree less than or equal to n what is this n well you are given a set of data where there are n plus 1 nodes you see you can see that the nodes index starts from 0 and goes up to n. Therefore, there are n plus 1 nodes if you are given n plus 1 nodes then you want a polynomial with degree n suppose you are given 10 nodes then you want a polynomial of degree 1 less that is 9 ok. So, this you should remember always we will index the nodes from 0 1 2 and so on up to 9 therefore, you are given 10 set of nodes and therefore, its corresponding interpolating polynomial will be p 9. So, that you have to remember the next thing is what is called the interpolation condition it means p n of x i should be equal to y i for each i equal to 0 to n. So, if a polynomial is obtained for a given data set that satisfies these two condition then we will call that polynomial as the interpolating polynomial. I hope you understood what is mean by interpolating polynomial. Let us go to ask the next question suppose I am given a data set like this can I always get a interpolating polynomial that is the first question and also it is often in applications we would like to have methods that finally, gives us a unique output. This is because if our method gives many outputs even though the method is very good we will have the confusion of which output we should choose in order to fulfill our requirements right. Therefore, it is always comfortable for us to work with those methods that give unique output. Therefore, often in numerical analysis we will also look for methods that give unique solution in that way the interest for us also to see whether the interpolating polynomial for a given set of data is unique. In fact, in this theorem we have positive answer for both these questions the theorem says that you give me a set of data remember you are giving a set of data and that data is fixed. Now, for that data I can always find an interpolating polynomial and more over that interpolating polynomial will be unique that is what the theorem says. It means for this particular data I cannot get two different polynomials say P n of x and Q n of x. Say for instance I use a method and find P n of x and you use another method to construct the interpolating polynomial which you denoted by Q n of x. The theorem says that we both will have the same interpolating polynomial we cannot have two different interpolating polynomial even if we use two different methods to construct such a polynomial that is what the theorem says. Let us try to prove this theorem consider the given set of data. Now, what we want to do is to see that there exist an interpolating polynomial remember the interpolating polynomial is basically a polynomial with degree less than or equal to n right. So, therefore, we will assume that our interpolating polynomial is of this form remember we can write any polynomial of degree less than or equal to n in this form where we have to only find this coefficients a naught a 1 a 2 up to a n right. If we manage to find this coefficients it means we do have such a polynomial that is the understanding and remember that we have this interpolation conditions that is we want to find such a polynomial such that it satisfies these conditions. Now, itself you can see how the proof goes on you see you have some unknowns how many unknowns are there there are n plus 1 unknowns right n plus 1 unknowns are there. And how many conditions are there there are again n plus 1 conditions right these are the interpolation conditions. Now, we will impose this n plus 1 conditions into this general form and see what happens well we will get a system of equations right. You take x naught that is the first point in our data set and plug into this expression what you will get P n of x naught should be equal to y naught right. What is P n of x naught well you put x equal to x naught in this expression that is what uses the first equation. You can see a naught plus x naught a 1 plus x naught square a 2 and so on up to x naught to the power of n a n equal to y naught. Similarly, you put P n of x 1 that is you put x 1 on the right hand side of this equation and that should be equal to y 1 and that gives you the second equation. Similarly, you use all the interpolation conditions each condition gives you one equation in this system. And therefore, you have n plus 1 equations remember x naught x 1 up to x n are known to us. Therefore, all these quantities are known quantities to us right. What are all unknowns here well unknowns are precisely the coefficients of this polynomial a naught a 1 up to a n and they are appearing here with power 1 right. Therefore, this is in fact, a linear system of equations and therefore, we can write this linear system in the form v into a equal to y where a is unknown y is the right hand side vector which is known to us through the data set that is given to us right. And what is the coefficient matrix v well coefficient matrix v is given like this where x naught x 1 x 2 up to x n are also known to us from the given data set. And this matrix v is generally called the van der maan matrix. Now, our problem of proving the existence and uniqueness of the interpolating polynomial of a given data set is reduced to seeing whether this system has a unique solution or not. Now, from your linear algebra course you know that a linear system has a unique solution if and only if the coefficient matrix is invertible. Therefore, our proof is complete if we prove that the van der maan matrix is invertible right. Let us see how to prove that v is invertible for us we will just write the matrix v in the form v naught v 1 v 2 up to v n where v i is a column vector with coordinates as x naught to the power of i x 1 to the power of i and so on up to x n to the power of i that is this is v naught this is v 1 and so on up to this is your v n. We are just writing this matrix with this notation that is all we have not done anything. Now, we want to prove that this matrix is invertible that is equivalent to proving that all this column vectors are linearly independent right. How are we going to prove that all this vectors v i's are linearly independent well let us write this equation this is the vector equation which is obtained by writing the linear combinations of v i's right and you just equate that to 0 it gives you a linear system again right homogeneous linear system with solutions as c naught c 1 up to c n and in order to prove that v i's are linearly independent we have to show that this system has the 0 solution that is c naught equal to c 1 equal to and so on up to c n all these scalars should be equal to 0 right. So, let us see how to prove this let us take this system and write the kth equation of this system. So, we are taking this system and we are writing the kth equation of this system. So, that is precisely given by this where k varies from 0 to n. So, for each k you have one such equation you can see that the left hand side is a polynomial in x evaluated at x k right that shows that this polynomial equation has n plus 1 distinct roots what are they they are x naught x 1 up to x n right because for each x k this system says that this polynomial equation holds at x equal to x k right. So, that is what is meant by this system and that implies that this polynomial has n plus 1 distinct roots remember we have considered our nodes in the data set as distinct nodes therefore, all these x i's are distinct. Now, you see we have the polynomial with degree n and it has n plus 1 roots what it means it means this is a 0 polynomial. So, this is possible only with 0 polynomial and that means that all this coefficient c i's are equal to 0. So, this shows that all this v i's are linearly independent and that shows that the matrix v is invertible that means that your linear system has unique solution what is that solution the solution is precisely the vector a which is equal to a naught a 1 up to a n right they are precisely the coefficients of this polynomial and since this system is obtained by imposing the interpolation condition you see that such a polynomial of degree less than or equal to n do exist and it satisfies all this n plus 1 interpolation conditions it means the interpolation polynomial exists and unique for the given data set. So, this completes the proof of our existence and uniqueness theorem for interpolating polynomials. Let us give an example to understand the importance and the limitation of the polynomial interpolation. So, interpolation polynomial is a nice tool for approximating a given data set, but it has its own limitations. Let us try to understand what is the importance and limitations well you may be understanding the importance from the our previous discussion. Let us just try to put forth once again suppose we are given this data set and we ask this question give me the exact expression of the function from where I have generated this data that is my first question and the second question is well you also give me the value of the function f at the point 0.75 that is in between these two node points I want to pick up one point I want to find the value of the function at that point well what is the answer for the first question it is simply impossible for us to trace back what was that function f from where we got this data right why because we can get infinitely many such functions. Therefore, how do we know from which function we have generated this data unless we come forward and reveal that secret right. So, this is simply impossible and therefore, the answer for the first question is just not possible. Therefore, if you have only certain data sets you there is no possibility that you can retrieve the function or it is not possible for us to exactly find the value of the function at some point where the data is not given to us right it is simply impossible suppose you have a situation like what we have just considered in our initial example suppose you have a situation where you missed certain data, but you very badly need it then what you can do well one thing is you can simply guess it for instance you may simply have a wild guess of this as say 0.15 or something like that right, but what is the guarantee that there is any logic that this function is going to take this value. So, at least mathematically we have a rigorous way of guessing this value again I am telling you this is again as good as guessing only, but only better situation is that there is a mathematical justification of guessing this value that is through the interpolating polynomial well what you can do is you can go for interpolating polynomial construct the polynomial for this data and then take that polynomial say you have 3 node points right. Therefore, from here you can get the degree 1 less that is a quadratic polynomial you can get and now once you get the quadratic polynomial you can go to find the value of that quadratic polynomial and be happy with it by believing that it is approximately equal to f of 0.75. So, that is life and this is what we can do at the best as long as this tool is concerned that is the interpolating polynomial otherwise you have only one choice that is to just wildly guess what is the value of this function at 0.75 right. Let us do this the interpolating polynomial for the given data set is given like this well I am not going to tell you how I constructed it later in the next lecture we will see two ways for constructing this polynomial in this example we are only interested in understanding the importance and the limitation of this tool. The construction of such polynomials we will discuss in the next class therefore, I will just post what is this quadratic polynomial that interpolates the given data and it is given like this once you have this you can go to find the value of the quadratic polynomial at the point 0.75 and it is given like this. Once you get this let me reveal the function from where I have generated this data set the function that I have considered is sin pi by 2 into e power x. Now, let us take the value of this function at 0.75 and see how good our p 2's approximation is when compared to the exact value well the function value is given by minus 0.1827504 and what is the relative error in p 2 of 0.75 that is the approximation that we obtained when compared to the exact value well the relative error if you recall it is computed using this formula and that is given by this that is quite upsetting because we have around approximately 61 percent error in our approximate value when compared to the exact value. Does it mean that this polynomial interpolation tool is a bad tool well let us see graphically how this function f and p 2 are well the graph of the function f of x is given in the gray color solid line and the graph of the polynomial p 2 of x that we constructed using interpolation conditions is given in the dashed blue line and I have used this points as the nodes and the corresponding value of the function f. Now, you can see that we wanted the value at 0.75 right it means we wanted this value, but we got this value as the approximation what is the error involved the error involved is the difference between these two points right. You can see that the function graph is coming very nicely, but there is a point of inflection starting from somewhere here and because of that the graph of the function f started deviating much from the polynomial right. Of course, it is unfair for us to expect our interpolating polynomial to sense this sudden change of the curvature in the curve and adopt to that right because we are only giving these three nodes and the corresponding values. Therefore, it is unfair for us to expect the interpolating polynomial to sense all this kind of properties of the function and try to get a better approximation. Now, how will you get the better approximation well the natural thing is give more information for instance you give one more node and the corresponding value of the function then you can see that the green line now is the cubic polynomial that interpolates the points this this and now the new point this and the this point. So, now I am giving four points therefore, I can get a cubic polynomial and now you see the cubic polynomial will give you this as the approximation right that looks for better than what we got from the quadratic polynomial. Of course, naturally this side we got a bad approximation, but suppose if you give one more node here and get p 4 out of that that will be obviously better than what we got from p 3 and so on right. In fact, you can see the relative error involved in p 3 of 0.75 that is approximately 15 percent error we had well this is also not good, but when compared to the quadratic polynomial the approximation is little better in the case of the cubic polynomial interpolation. Like this from this example we can see the limitations of the interpolating polynomial that is if you want a better approximation you have to give more information about the function that is quite natural right. So, this is not something bad that is expected if you give more information it means you are going for higher degree polynomials. So, higher degree polynomials at least by the first look seems to be getting better approximation to our function than the lower degree polynomials right, but this is not always true you will see later in our discussion that arithmetic error can spoil the approximation if you keep on increasing the degree of the polynomial. In the coming class we will give a better two ways of constructing interpolating polynomial remember in this class we only discuss the existence and uniqueness of the polynomial interpolation we never constructed this polynomial explicitly right. You remember it is very difficult for us to solve the wanderman system to get the polynomial because that will be quite costly to do also computationally it is not a preferred way of doing we have some better way of constructing the interpolating polynomial. There are in fact two ways one is Lagrange form of interpolating polynomial and another is Newton's way of interpolating polynomial. In the next class we will introduce these two form of interpolating polynomials they give a nice formula for this polynomials for a given data set and then in the coming class we will also learn how to do the error analysis for the interpolating polynomial with this let us stop this lecture thank you for your attention.