in this segment i'm going to take an example
that if somebody gives me the value of the derivative of the function by using
the forward divided difference formula with
the order of accuracy of the step size and gives me the value
of the derivative of the function at the same point but with two different
step sizes can we use that information to come up with a better estimate of the
derivative of the function so here we have an example where
somebody is giving us the derivative of the function
at 0.8 they're telling us that the value of the derivative of the function at 0.8
is so and so with the step size of 0.2 the value of
the derivative of the function at the same point but the steps of 0.1
is so so can we use the information to get a better estimate
now the way to look at this problem is that we already know
that the definition of the true error is defined as hey what is my true value
and what is my approximate value which i am getting from some numerical method
so let's suppose if i want to find out what the
true value is i can say the true value is defined as
a what is the approximate value plus what is the true error that's a
different way of looking at it but now if you look at the problem
statement i know the approximate value of my
derivative for a step size of 0.2 and for us steps
are 0.1 so i know those approximate values
that's what we mean by that but what do we know about the true error
what we know about the true error is that it is of the order of
h because this forward divided difference formula
uh which we're using uh for the for the calculation of the derivative function
the forward divided first formula which we're using is that f prime of x
is equal to f of x plus h minus f of x divided by h
so this formula is of the order of accuracy of h so that means that the
true error is approximately equal to
c times h because the true error is is of the order of h i can say that the
true error is approximately proportional to h
and then i can use some constant proportionality c here
keep in mind that this c term here bundles
all the rest of the terms which are in the error if you remember your
derivation from the taylor series of the forward divided difference scheme
uh it bundles all those terms into the single constant term
c and that's why we use the word this approximation sign here
for defining our true error so let's go and see that how this is
going to help us is that now i know that the true value
is approximately equal to the approximate
value plus c times h and the reason why i have this
approximately sign here now because the true error is not
not known exactly it's just approximately equal to c times h
so what i have is that the true value is approximately equal to
the approximate value which i get the step size is 0.2
plus c times 0.2 same thing the true value is
approximately equal to the approximate value which i give the step size of 0.1
plus c times 0.1 so what i'm doing is that i'm
writing the same expression here for two different step sizes of 0.2 and
0.1 now i already know this value which is given to me i already know what this
value is so the unknowns are c and tv so it's all about setting up
two equations to unknown so if i set up my first equation
it will look like this that t that tv is
approximately equal to 0.2 it is 0.95375 plus c times 0.2
and then the true value here for the steps are 0.1
i get 0.96851 plus c times 0.1 so if i want to
eliminate c all i have to do is to multiply
this particular quantity by 2 and subtract the two equations so
having said that if i multiply the second equation by 2 and subtract it
i get tv minus 2 t v true value is equal to
0.95375 minus 2 times 0.968
and what this gives me is that the true value
is approximately equal to 0.98327 so what this value is basically an
extrapolation that if i had a step size of 0
this is what i would get as the true value but again keep in mind this is an
approximation of the true value because we're bundling all the terms of
the true error into one single expression that the true error is
c times h and that's the end of this segment