Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For this problem you want to estimate the derivative of the function = ( ) at = . See Lab 0 1 for the definition
For this problem you want to estimate the derivative of the function at
See Lab for the definition of Use both the forward difference,
and the centered difference
For the step sizes, let
with For find and save the absolute
true errors
for each difference approximation and step size.
a Find the true value by hand using the definition of given in Lab
b Plot the log of the absolute error versus the log of for both the forward and the
centered approximation on the same set of axes. Do not use Matlabs loglog command.
c Add a title, axes labels, and a legend.
d Use Matlabs Basic Fitting Tool to find the slope, for each difference approximation.
e Report the slopes you find and explain their values mathematically. Hint: If an error is
then it is proportional to while if it is it is proportional to
f Finally, experiment with to determine the optimum step size, for each difference
approximation, that best balances the truncation and the roundoff errors.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started