in this segment we are going to take an example from
raishin will be using the quadratic spline theory which we learned to be
able to solve this particular simple example so here is the example which you
can read now we are given y versus X data however this particular data is
incomplete we are not given the value of y at X equal to 4 we're not given the
value Y X to the 6 then we are told that hey there are certain quadratic splines
which are going through consecutive data points right here and again some of the
spline information interpolated interplan mission is not given to us
finally would ask to find out what the value of C is which is one of the
constants in the third line interpolant the one which goes through 4 and 6 now
if I was going to find out what C is that means that somehow I have to figure
out what this particular slime is and somehow and that means that I have to
maybe set up three equations three unknowns for the value of B C and D I'm
not necessarily saying that hey we can solve it by using three questions Ian
knows at least we know that in that particular spine we have three unknowns
B C and D how can we figure out what what C is out of those B C and D now one
of the things which I know that this particular spline which is right here it
goes through X equal to 4 and it also goes to X equal to 6
unfortunately the values at X equal to 4 the values of Y the X equal to 4 and the
values of y at X equal to 6 are not given to us but we also know that this
particular spline the second spline does go through X equal to 4 and the last
spline the fourth line does go through X equal to 6 so we should be able to use
that information to be able to at least figure out that hey this third spline BX
squared plus CX Plus D use go through points from 4 2 which goes through
points X equal to 4 and X plus 6 what the value at X equal 4 and x equals 6 is
so if you look at the spline seconds minus f of X is equal to
x squared minus 2x squared plus 14x minus 9 the value of the function at X
equal to X equal 2 for X equal 4 which is one of the endpoints of the spline t
minus 2 times 4 squared plus 14 times 4 minus 19 and that gives me equal to 15
now what we're going to do this one the same thing with the fourth spline which
is right here and we're going to see that hey what the value of the function
is at X equal to 6 so we have f of X equal to 25 x squared minus 300 + 3 X
plus 9 28 and this one is valid between 6 & 7 and I want to find the value of
the function of 6 which is about the endpoints of the spline to 25 times 6
squared minus 300 three times 6 plus 9 28 and this number here turns out to be
equal to 10 so what they have been able to do so far is as follows we have been
able to find that the value of the function at 4 is 15 we are able to find
the value of the function at 6 is equal to 10 so what that means is that this in
this spline will be able to we can at least set up two equations one which is
telling you that the value of that spline is 15 at X equal to 4 and that
the value of the spline x equals 6 is 10 so we'll have two questions but we still
have or two questions but three unknowns because C is an unknown so let's go and
see that how can we set up this third third
equation here now Walter if you learned in our quadratic spline interpolation
theory is that the splines which have a common point but I have a common point
that the first derivative is the same that is the slope of the function at the
common point is the same because indeed a data point so this particular spline
goes to executor for this particular spline goes to X equal to 4 so whatever
is the slope of this function at X equal to 4 has to be same as a slope of this
function of X equal 4 so what does that mean that means that let's wave this up
that means that the derivative of minus 2x squared plus 14x minus 9 has to be
equal to the derivative of BX squared plus CX Plus D that the slope of the
second spline will be same as the slope of the third spine but not at every
point but at the common point which is X equal to 4 and X equal to 4 so what that
gives me is as follows gives you minus 4x plus 14 at X equal to 4 we will have
to be equal to 2 BX plus C and X equal to 4 that's after I taken the derivative
or 1 spine and the derivative of the third spline now but these two spline
and derivatives are only equal at X equal 4 this gives me minus 2 and this
gives me 2 B times 4 plus C and that gives me 8 B plus C is equal to minus 2
so so I've gotten that additional equation which I needed in order to be
able to set up my three equations three unknowns to be able to find B C and D
although I'm only interested in finding C but I do have to go through the
process of setting up these three equations three unknowns to find the
value see so let's listen up the other
equation the other question is that at X equal 2 for the third slide this press
line and the value is equal to 15 so V times 4 squared plus C times 4 plus D is
equal to 15 which gives me 16 B plus 4 C plus D is equal to 15 so that's my first
equation then we already know that I also know that the value at x equals 6
of his third spline is 10 so BX squared plus CX Plus D at X equal to 6 is equal
to 10 so that we using D times 6 squared plus C times 6 plus D is 10 and that
gives me 36 b +6 c plus D is equal 10 so that's my second equation we only have
calculated the third equation which was a B plus C is equal to minus 2 by
equating the slopes at X equal to 4 and that's my third equation so I have now
three equations three unknowns so the first equation which tells me that the
value at X equal to 4 is 15 that I'll be able to set up in the matrix form as 16
4 and 1 or the B C and D here will be 15 the second equation which tells me that
the value of the function at six at the other spline that X it was six is 10 and
that will give me 36 6 + 1 is 10 so that's the one which is telling me that
at x equals 6 the U value the most line is 10 and then I have this third
equation which is here which will be 8 here and the one here and since there's
no zero contribution so it'll be zero and then u minus 2 so now I have three
equations three unknowns I should be able to use any of the methods which I
have known so are to be able to find out what the
values of a B and C V C and D are so B turns out to you minus 0.25 C turns out
to be 0 and D turns out to be 19 and since I'm looking for C and that's my
answer and that's the end of this segment