Computers and Technology

The objective of this problem is to compare second-order accurate forward, backward, and centered finite-difference approximations of the first derivative of a function to the actual value of the derivative. this will be done for
f (x) = e−2x − x
(a) use calculus to determine the correct value of the de­rivative at x = 2.
(b) develop an m-file function to evaluate the centered finite-difference approximations, starting with x = 0.5. thus, for the first evaluation, the x values for the cen­tered difference approximation will be x = 2 ± 0.5 or x = 1.5 and 2.5. then, decrease in increments of 0.1 down to a minimum value of δx = 0.01.
(c) repeat part (b) for the second-order forward and back­ward differences. (note that these can be done at the same time that the centered difference is computed in the loop.)
(d) plot the results of (b) and (c) versus x. include the exact result on the plot for comparison.

answer
Answers: 1

Similar questions

Do you know the correct answer?
The objective of this problem is to compare second-order accurate forward, backward, and centered fi...

Questions in other subjects:

Konu
Mathematics, 21.05.2021 04:10
Konu
Social Studies, 21.05.2021 04:10
Konu
Mathematics, 21.05.2021 04:10