Question: Example from lecture 10 that will be used to solve the problem below. Use Matlab to study the effect of step size on the absolute
Example from lecture 10 that will be used to solve the problem below. Use Matlab to study the effect of step size on the absolute true error resulting from using centered difference approximation to approximate the derivative, at = 0.5, of the polynomial () = 0.1 4 0.15 3 0.5 2 0.25 + 1.2 The true derivative is, () = 0.4 3 0.45 2 0.25 and, (0.5) = 0.4(0.5) 3 0.45(0.5) 2 0.5 0.25 = 0.9125 The following is a script (named derivative) that computes (numerically) the central difference derivative and generates a plot for the error as a function of step size, .

Repeat the last example of lecture10.pdf (page 20) using the forward finite-difference formula (shown below) instead of the centered finite-difference formula. Modify derivative.m as needed. f (x +h) -f(x) f' (x) A. Include the plot of absolute true error vs. step size, h. B. For approximately which values of the step size is the machine round-off error most significant? For approximately which values is the numerical method error most significant? C. Make a rough sketch of what the plot would look like if there were no machine round-off error. Repeat the last example of lecture10.pdf (page 20) using the forward finite-difference formula (shown below) instead of the centered finite-difference formula. Modify derivative.m as needed. f (x +h) -f(x) f' (x) A. Include the plot of absolute true error vs. step size, h. B. For approximately which values of the step size is the machine round-off error most significant? For approximately which values is the numerical method error most significant? C. Make a rough sketch of what the plot would look like if there were no machine round-off error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
