in this particular segment we're going to take a
quadratic spline interpolation method example and see that how it works out
to be able to solve one so here's an example given to us go
ahead and read it and what we're asked to find out is that
we are given the intra quadratic spline interpolants
which are going through those these five consecutive data points so
you have five data points will be four splines and the
first line has been chosen to be linear while the other three
are quadratic and we are asked to find out what the value of c is
in this third spline which is going through the points
4 and 6. so one of the things which we can do is to
be able to figure out how we're going to find the value of c
by having to set up certain equations based on
the understanding that each of these splines are going through two
consecutive data points and that the first derivative of this lines
is the same at the common points to the to these to these splines
so what we can do is we can say that at x equal to 4
that the slope of the spline which is the second
line because that's line and the third spline have the common point x equal to
that the slope of the second spline at x equal to 4
is going to be same as the slope of the third spline because that also
goes through 4 and so at x equal to 4 the two splines
will have the same same slope what is this what does that
give us so what that gives us is that
minus 4x plus 14 that is the derivative of the second spline
at x equal to 4 will be same as the derivative of the third spline which is
2bx plus c but again keep in mind that the
two splines are same at the common point which is x equal to
four so this is the common point which i am very
talking about so the slope of this is same as slope of
this at this common point x equal to 4
so from here we get minus 4 times 4 plus 14
is equal to b times 4 plus c that is minus 2 is equal to 8b
plus c so that's my first equation i still have to
at least find another equation to be able to find out what the value of
c is and what i'm going to do for that is that i'm going to say that hey this
second spline sorry third spline and the fourth spline
have a common data point x equals six what that means that the
slope of this third spline has to be same as the slope
of the fourth line at x equal to six so that means that the
derivative of b x squared plus c
x plus d at x equal to 6 has to be same as the derivative of
the fourth spline
at x equal to 6. let's go and find out what the
what this is and what this is what we're going to find out is that 50x
minus 303 is the value of the derivative of the fourth
spline at x equals 6 and then 2b x plus c
is the derivative of the third spline and we have to find that at x equal to
6. so what we get is we have 50 times 6
minus 303 you go 2b times 6 plus c and i get
minus 3 is equal to 12b plus c so that gives me the second
equation and if you remember the first equation
also had only b and c as the unknowns so i think i'm
done with finding the equations which i need in order to
find the value of c
so my first equation which i just found out was a b
plus c is equal to minus two plus h one equation number two is 12 b
plus c is equal to minus three it's equation two
so if i solve these two equation two unknowns i'll get b is equal to
minus 0.25 and i get c equal to 0. and since we're looking for
the value of c that's what it is and that's the end of
this segment
you