Numerical Differentiation: Second Derivative of a Continuous Function: Example

In this segment, we'll take an example of how do we numerically differentiate a function to find the second derivative of it. So here is the example which we are asked to do. We’re supposed to use the Center Divided Difference formula for finding the second derivative of the function. The function is here, the step size is given here, we're supposed to find the second derivative of 2, then we're also supposed to find the true value and also the true error just to get a sense of how good or how accurate our formula is so let's go ahead and do that. So, the formula for the second derivative of the function is approximately given as this quantity, if we use the Central Divided Difference scheme. So based on what we are asked, x is 2, the step size is 0.64, so let’s go ahead and substitute these values and see what happens. So, the second derivative of the function at 2 will be given by calculating the value of the function at these points as given here. So, what that means is we have to calculate the value of the function at 2.64, we have to calculate the value of the function at 2, and we have the calculate and 1.36. And that's what's going to give us the second derivative of the function. So, since our function is 7x to the power 4, we make that substitution. And this value here turns out to be equal to 341.7344. Let's go and see what the exact value is, of the second derivative of the function at 2.

Our function is given as 7 x to the power 4, so the first derivative of the function will be 7 times 4 x to the power 4 minus 1 that is 28 x cubed. We take one more derivative here to find the second derivative, so we get 28 times 3, times x to the power 3 minus 1, so that gives us gives us 84 x squared. So, what that simply implies is that the exact value of the derivative of the function at 2 will be 84 times 2 squared, which is I think about 336. If we want to find the true error, that would be the exact value minus the approximate value. The exact value is 336. Now what is the approximate value which we just obtained? We obtained 341.7344. So, if we subtract the two quantities, we get -5.7344. That's the true error. And that's the end of this segment