 In the previous lecture, we have seen that the interpolating polynomials may give poor approximation if we have too many node points. Especially if the node points are equally spaced, we may observe a visible oscillation in the graph of the interpolating polynomial near the boundaries of the interval of interest. One way to improve the approximation is to go for piecewise polynomial interpolations. We have learnt piecewise polynomial interpolations in our previous lecture and we have seen that there is still a drawback in this approach. What is the drawback? Well, the disadvantage is that piecewise polynomial interpolations using Lagrange's or Newton's formula can be non-differentiable at the node points. We can overcome this difficulty of loss of smoothness by imposing more smoothness conditions on the interpolant at the node points. There are at least two ways exist to construct piecewise polynomial interpolations with more smoothness at the node points. One approach is to use piecewise hermit interpolation and another one is splain interpolation. In this lecture, we will learn the hermit interpolation and postpone the discussion on splain interpolation to the following lecture. Let us first define the problem of our interest. We are given n distinct nodes x naught, x 1 up to x n and we also assume that the given function is sufficiently smooth. Well, before defining our problem, let us recall what we did so far in polynomial interpolations. We seek a polynomial of degree less than or equal to n such that the polynomial value at the node points coincides with the value of the functions at the corresponding node points. This is the interpolation condition that we have demanded on our interpolating polynomial and we got a unique polynomial of degree less than or equal to n when we are given n plus 1 distinct nodes. Now, in order to get more smoothness at the node points, we will have to demand more smoothness at the node points. For this reason, we will assume that f is sufficiently smooth and we will look for a polynomial h of x such that the polynomial value at each node point x j coincides with the function value at x j that is in this expression. I am talking about when you take k equal to 0 that will look something like this and in addition to this interpolation condition, we now also demand that our polynomials derivative of certain order that is let us denote it by m j for each j and we will demand the value of the derivative of the polynomial should coincide with the value of the corresponding derivative of the given function at the node point x j. So, this is what we will demand and at every node point, we may have different order of smoothness included in this condition. This is a general problem that we pose and we will ask the question whether we can find such a polynomial for a given set of n plus 1 nodes. Of course, the polynomial has to be of certain degree we will come to that point little later and such a polynomial is generally called the osculatory interpolation or it is also referred to as the general hermit interpolation. Let us see an example which is familiar to us the Taylor's polynomial. Let f be a c 1 function on the interval a b then we know that the Taylor's polynomial of degree 1 about some point x naught in a b is given by t 1 of x is equal to f of x naught plus f dash of x naught into x minus x naught. Now, let us take x is equal to x naught and see what happens. You can see that if we take x equal to x naught then t 1 of x naught is equal to f of x naught and in fact, we can also see that t 1 dash of x naught is equal to f dash of x naught. Now, let us compare this property with the definition of osculatory interpolation that we have defined in the previous slide. In the case of Taylor's polynomial of degree 1, we have only one node that is x naught and in this polynomial that is in the Taylor's polynomial of degree 1, we have taken m naught is equal to 1 and therefore, our condition now has to be h of x naught is equal to f of x naught that corresponds to k equal to 0 and h dash of x naught is equal to f dash of x naught. So, this is what we have obtained from the Taylor's polynomial of degree 1. Therefore, Taylor's polynomial of degree 1 is an example for the osculatory interpolation at one single node x naught with order 1 at that node right. We can in fact, increase the smoothness condition and the node x naught by one more for this we need to assume that the function f is a c 2 function on the interval a b then we can see that the Taylor's polynomial of degree 2 about the point x naught in the interval a b is given like this. Now, the question is this an osculatory interpolation at the point x naught if so, what is the order? Let us see it is not very difficult for us to see that if we take x equal to x naught in this expression then t 2 of x naught is equal to f of x naught then you differentiate t 2 once with respect to x and then put x equal to x naught you can see that t 2 dash of x naught is equal to f dash of x naught. Similarly, you differentiate t 2 twice with respect to x and then substitute x equal to x naught you can see that t 2 double dash of x naught is equal to f double dash of x naught. Therefore, you can again go back to the definition of osculatory interpolations and see that t 2 is an osculatory interpolation for the function f with single node x naught with order 2 at x naught that is m naught is equal to 2 as per the notations introduced in our definition of osculatory interpolations. Well, in our course we will restrict ourselves to a particular case of the osculatory interpolation and we refer this particular case as the hermit interpolation what is this particular case? Well, given a c 1 function defined on an interval a b let us consider n plus 1 node points in an interval a b. Now, the problem is to find a polynomial h of x well I will not always say this suffix 2 n plus 1 I will just say h of x this polynomial h of x is of degree less than or equal to 2 n plus 1 such that h of x j is equal to f of x j that is the interpolation condition of order 0 and then we will also impose the interpolation condition of order 1 that is h dash of x j is equal to f dash of x j and this should happen at all the given node points. Can you see why we demand the degree of the polynomial h to be less than or equal to 2 n plus 1 s? You can see that there are n plus 1 conditions from the function value and another n plus 1 conditions from the derivative of f. Therefore, totally we have 2 n plus 2 conditions right. Therefore, you have to have the degree of the polynomial h as 2 n plus 1 because in order to achieve this 2 n plus 2 conditions we have to have the degree of the polynomial as something like a naught plus a 1 x plus a 2 x square plus up to that many terms that results in 2 n plus 2 unknowns right. For that you need the degree of the polynomial to be 2 n plus 1 so that you have 2 n plus 2 unknowns a naught a 1 a 2 up to a 2 n plus 1 that is why we need the degree of the polynomial to be something less than or equal to 2 n plus 1. Recall that this kind of condition is not something new to us the same idea was also adopted when we were constructing the polynomial interpolation in our previous lectures right. The same idea now, but we have some extra conditions that forced us to increase the degree of the polynomial right. There is nothing new in this idea note that we are only demanding order 1 here right at each node. Therefore, if you compare the definition of escalating interpolation in our previous slide what we are doing here is we are taking m j is equal to 1 for all j equal to 0 1 2 up to n right at every node we are only demanding the smoothness of order 1. In that way this problem is a particular problem of finding escalatory interpolation in general, but in our course we will call this particular problem as hermit interpolation. Now, the question is whether hermit interpolating polynomial exists for a given set of data right. Well first let us see how the data set should look like. Recall that when we were constructing polynomial interpolation using Lagrange and Newton's form we had only 2 coordinates x and y right, but we need one more extra coordinate now to construct the hermit interpolation that corresponds to the value of the derivative of the given function. Well here I have only given the value of the function as y naught y 1 up to y n and the values of the derivative of the function as z naught z 1 z 2 up to z n because these values may not come from some function in general they may come from any other source something like they may come from some experiments or so on. For that reason I have just posed the data set in a general notation. Well once we provide this data set then our theorem says that we can construct a unique hermit interpolating polynomial h of degree less than or equal to 2 n plus 1 with the required interpolation conditions as given here which we have shown in our previous slide itself. Now I am just using a different notation here instead of f of x j I am just using y j and instead of f dash of x j I am using the notation z j. In fact the theorem also gives us the explicit form of the interpolating polynomial and this explicit form is given like this the first term is the linear combination of h i's where h i's are given like this and you can see that h i's involve square of the Lagrange polynomials recall that l i of x is equal is the ith Lagrange polynomial you should go back to our previous lectures and recall how these Lagrange polynomials are defined. Now h i's are defined in terms of the square of Lagrange polynomials and also it involves the first order derivative of the Lagrange polynomial and you can see that the first term is written as the linear combination of x i's involving the function value y i's. The second term is written as the linear combination of h i tilde and also it involves the value of f dash at the nodes denoted by z i's here h i tilde of x is given by this formula again you can observe that h i tilde of x the square of Lagrange polynomial is involved in the definition of h i tilde also well in this way the Hermit interpolation is written in terms of Lagrange polynomials we can also write Hermit interpolation using Newton's divided difference we will not cover this in our course but interested students can learn how to write Hermit interpolation in terms of Newton's divided differences from many books for instance you can see burden and phase for more details well let us prove this theorem it is not very difficult to observe that h is a polynomial of degree less than or equal to 2 n plus 1 why is it so well you can see that each h i's and also h i tilde's or polynomials of degree 2 n plus 1 why because l i's or polynomials of degree n right and now you are squaring them therefore l i square is a polynomial of degree 2 n and you have one more degree coming from here therefore h i is a polynomial of degree something 2 n plus 1 ok similarly here also you can see that l i's or polynomials of degree n and since you are squaring this will be a polynomial of degree 2 n and then you have one more degree coming from here that will clearly tells us that h is a polynomial of degree less than or equal to 2 n plus 1 now our aim is to further show that the expression given like this is indeed the Hermit polynomial for that we have to show that the polynomial defined in our slide satisfies these two conditions at each node point let us see how to prove this let us take the first interpolation condition of 0th order that is h of x j is equal to y j for j equal to 0 1 up to n let see how to prove this recall in one of our previous lectures we have to this important property of the Lagrange polynomial right let us use this property to prove this interpolation condition how to do that well you can use this property of the Lagrange polynomial directly into the definition of h i and h i tilde and you can see that h i of x j also satisfies the same property as the Lagrange polynomial and also you can see that h i tilde of x j is equal to 0 for each j now going back to the expression of h that we have proposed in our statement you can see that h of x j is equal to summation i equal to 0 to n y i h i of x j and you can see that h i of x j is equal to 1 only when i is equal to j all other terms will vanish in this sum leaving only y j and what happens to the second term well the second term will vanish fully right therefore our first interpolation condition is satisfied by the h that we have defined in the statement of our theorem therefore the interpolation conditions of order 0 and 0 is proved now let us move on to prove the interpolation condition of order 1 for this let us first differentiate the given expression of h with respect to x to get this expression there is first understand how h i dash and h i tilde dash are obtained well just differentiate h i with respect to x we get this expression you can see that keeping this and differentiating this gives us the first term and similarly keeping this term and differentiating the second one gives us this term right well let us not disturb this part because this is not required in our proof therefore we will not try to compute this we will keep it as it is and see what happens to this expression when we put x is equal to x j you can see that when you put x equal to x j then this term vanishes for all i not equal to j right for i is equal to j you will have minus 2 l i dash of x i right because this term will become 1 in that case and let us see what happens to the second term again the second term will vanish for all i not equal to j here also it vanishes for all i not equal to j and what happens when we put i is equal to j then again this part of the term will vanish and because you have j here and i here when j equal to i this term vanishes and you will have only the contribution coming from the first term which will be plus 2 into l i of x i which will be 1 into l i dash of x i right. So, your first term is minus 2 l i dash of x i the second term is plus 2 l i dash of x i they will get cancelled and you will have 0. Therefore, you can see that the first term of h dash now becomes 0 and we are left out only with the second term. Now, let us see what happens to h i tilde dash of x j for that first we have to differentiate h i tilde with respect to x whose expression is given like this when you differentiate it you get this expression again in this we have to put x equal to x j and let us see what happens when we put x equal to x j we get this expression you can see that this is equal to 1 if i is equal to j and it vanishes for all i not equal to j and then what happens to the second term well for i not equal to j this part will vanish when i is equal to j this will not vanish, but this will make this second term to vanish right. Therefore, as a whole the second term will vanish for all j equal to 0 1 up to n whereas, from the first term you will have h i dash tilde of x j equal to 1 if i is equal to j and 0 if i not equal to j from here you can see that h dash of x j is equal to z j and that proves the second level of interpolation conditions also right thus we have proved the existence of the hermit interpolating polynomial for a given data set and the formula is also given to us explicitly. Now, let us prove the uniqueness of the hermit interpolating polynomial for a given data set if possible we will assume that there exists another polynomial of degree less than or equal to 2 n plus 1 with the same condition and let us see what happens remember we already constructed a polynomial in this form and now what we are doing is we are assuming that there is another polynomial with the same property. Now, what we have to show we have to show that the polynomial that we constructed should be the same as the polynomial that comes from somewhere right. So, that is what we want to show if you show that then it means that this is the only form that you can have for the hermit interpolation. Let us define r of x as the difference between these two polynomials therefore, in order to prove that these polynomials are equal for all x we have to prove that r of x equal to 0 for all x right to do this let us first observe the following properties of r of x first is that since both h and script h are polynomials of degree less than or equal to 2 n plus 1 you can see that r of x is also a polynomial of degree less than or equal to 2 n plus 1 right. Second thing is since r is a polynomial of degree less than equal to 2 n plus 1 r dash of x will be a polynomial of degree less than or equal to 2 n also from the first set of interpolation conditions we can see that r of x has n plus 1 distinct roots which are precisely the distinct node points from our given data set right this is because at any node point x j r of x j is equal to h of x j minus script h of x j right. But we know that h of x j is equal to y j and script h of x j is also equal to y j therefore, they get cancelled and you will have r of x j is equal to 0 and this happens for each j equal to 0 1 2 up to n therefore, r has n plus 1 distinct roots also you can see that r dash has n plus 1 distinct roots y again you differentiate r with respect to x that will be h dash of x minus script h dash of x again when you put x equal to x j you have the second set of interpolation conditions that will make r dash of x j also equal to 0 therefore, the polynomial r dash of x will also have n plus 1 distinct roots. Now, let us take this condition that is r of x has n plus 1 distinct roots and we will use the roles theorem that implies that r dash of x will have at least n distinct roots. That is in between two node points say x j and x j plus 1 say r is something like this then you can always find a point in between x j and x j plus 1 let us call this as xi j at which r dash of xi j will be equal to 0. It means all this n roots which you found from the roles theorem are different from the n plus 1 distinct roots which we have already from our data set. These xi j's may not coincide with the node points that we have in that way r dash of x already has n plus 1 distinct roots plus now you have n distinct roots therefore, r dash of x will have 2 n plus 1 distinct roots that is what I am saying here r of x has n plus 1 distinct roots implies r dash has at least n distinct roots difference on the node points how well using the roles theorem and once you have this you can see that r dash of x has 2 n plus 1 distinct roots what is the problem with that well r dash of x is a polynomial of degree less than or equal to 2 n, but now it has 2 n plus 1 distinct roots that implies that r dash of x is a 0 polynomial that implies that r of x is a constant polynomial, but we know that r of x has n plus 1 distinct roots. In fact, if you know that r of x has 1 root that is enough to say that this constant polynomial is equal to 0 thus we have proved that the polynomial r of x defined as h of x minus script h of x is indeed a 0 polynomial that implies that h of x is equal to script h of x for all x in r and this proves the uniqueness of the Hermite interpolation. Let us take an example and construct the Hermite polynomial for this given data set remember we have 2 distinct nodes x naught and x 1 right which implies that we have n is equal to 1 and therefore the degree of the Hermite polynomial is 2 n plus 1 which is equal to 3 right that is we have to construct the cubic Hermite interpolating polynomial from the given data set. Let us recall the formula for h 3 from our theorem h 3 is given like this where now we have n is equal to 1 and h i's and h i tilde are given as they are in the theorem right to compute the cubic Hermite interpolating polynomial. We first have to find h i and h i tilde and then we can write them in this form right remember in order to find h j and h j tilde first we have to find the Lagrange polynomials therefore we will start with computing the Lagrange polynomials as a first step we will compute l naught of x remember this is your x naught and this is your x 1. Therefore, l naught of x which is equal to x minus x 1 divided by x naught minus x 1 is given like this similarly l 1 of x which is equal to x minus x naught divided by x 1 minus x naught is given like this. Now we have to construct the cubic Hermite polynomial from this data set let us recall the formula for h i of x which is given like this where i is equal to 0 and 1 for i equal to 0 h naught of x is written in terms of l naught which is given like this and for i equal to 1 h 1 of x is written in terms of l 1 of x which is given like this remember we have to also differentiate the Lagrange polynomials in order to substitute here right. Let us see how to get h naught of x h naught of x is equal to 1 minus 2 into x minus x naught therefore you have x plus 2 and then you have l naught dash of minus 2 you can obtain that from here and you can write it here and finally this term will become like this into l naught square of x. Similarly, you can get the expression for h 1 of x also and that is given by this right once we have this let us now go to find h i tilde how h i tilde is given recall the formula for h i tilde is this and again for h naught tilde we have to use l naught of x and similarly for h 1 tilde you have to use l 1 of x and for h naught tilde of x we obtain the formula like this and h 1 tilde of x is obtained like this. Now, we have h naught h 1 h naught tilde and h 1 tilde therefore we can now go to write the cubic hermit interpolation polynomial remember the formula is given like this right you have y naught h naught plus y 1 h 1 plus z naught h naught tilde plus z 1 h 1 tilde what is y naught this is y naught this is y 1 this is z naught and this is z 1. So, you have to substitute this values and you can leave it in this form or if you wish you can also simplify it to see that it is indeed a polynomial of degree less than or equal to 3. Let us visualize h 3 and in fact this data are taken from the sine function with the x values are taken in radians here the black solid line represents the graph of the sine function this one and the red solid line this one is the graph of the hermit polynomial h 3 that we have constructed just now. Note that from the given nodes x naught and x 1 with only the function values we will get the interpolating polynomial of degree less than or equal to 1 from the Lagrange form or Newton's form right, but here with two node points we got a cubic interpolating polynomial of course we have to also provide the information of the value of the derivative of the function that is the cost we are paying here, but we are getting a higher degree polynomial with just two nodes this is what we observe here you can see that at the node points the function value and the polynomial value are coinciding this is the first set of interpolation conditions and also you can see that at the node points the slope of the polynomial and also the slope of the function are coinciding this is the second level of the interpolation condition which is clearly visible in this graph right well as a next example let us consider three nodes and the corresponding function values and the values of the derivative again I have taken these values from the sine function with two digit rounding note that with this data set we can obtain the fifth degree hermit interpolating polynomial, but my interest is to obtain the piece wise cubic hermit interpolation for this let us first give the data set in two pieces the first piece has two nodes x naught and x 1 and the corresponding function values and the derivative values right this will give us the corresponding cubic hermit polynomial interpolation remember we have constructed this polynomial in our previous example, but now we will denote it by h 3 comma 1 of x because this is the polynomial that is coming from the first piece of the given data right now let us take the second part of the data set that is the nodes 2 and 4 and their corresponding values of the function and the derivatives again we can construct the cubic hermit interpolation in a similar way as we did in the last example and let us denote this hermit interpolating polynomial by h 3 2 of x because this polynomial is coming from the second piece of our data set now we will join these two to get the piece wise cubic hermit interpolation remember with the same node points with only the function values we can also obtain quadratic interpolating polynomial in the Lagrangian or Newton form or we can also find piece wise linear polynomial interpolation right you can see that the piece wise linear interpolating polynomials with the same data set can be given like this here p 1 1 of x is the linear interpolating polynomial written in the Lagrangian form coming from the first piece of the data set and p 1 2 of x is the linear interpolating polynomial again written in the Lagrangian form coming from the second piece of the given data set remember here we are only using the function values, but not the derivative values to construct the Lagrangian polynomials right the derivative values are used only for the hermit polynomials again combining these two piece of linear polynomials we can obtain the piece wise linear polynomial for the given data set and we also can obtain piece wise cubic hermit interpolating polynomial for the given data set let us try to show you see graphically how they look like the blue solid line represents the piece wise linear polynomial interpolation as expected we can see that there is a sharp edge at the interior node of the linear piece wise polynomial interpolation as remarked at the beginning of this lecture and also in our previous lecture the piece wise linear polynomial interpolation is not differentiable at the interior node point right whereas you can see that the cubic hermit interpolation is coinciding with the slope of the function at the node points that is at minus 2 here as well as at the node point 2 here and similarly the second piece that is h 3 comma 2 is again coinciding with the slope of the sine function at the point x equal to 2 and that makes the piece wise cubic hermit interpolation to be at least c 1 at the point x equal to 2 that is the interior node point whereas as I told the piece wise linear interpolation has a sharp edge here right so that is the main advantage of the hermit interpolation when we go to construct piece wise hermit interpolation we will gain one order of smoothness at the interior nodes whereas this is not the case with the piece wise interpolation coming from the Lagrangian or Newton form of interpolation as we remarked at the beginning of this lecture there is another way to construct piece wise polynomial interpolation with more smoothness condition at the node point called this plane interpolation we will discuss plane interpolation in our next lecture thank you for your attention.