Question: 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

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


-2x f(x) = e=2


(a) Use calculus to determine the correct value of the derivative at x = 2.

(b) To evaluate the centered finite-difference approximations, start with x = 0.5. Thus, for the first evaluation, the x values for the centered difference approximation will be x = 2 ± 0.5 or x = 1.5 and 2.5. Then, decrease in increments of 0.01 down to a minimum value of ∆x = 0.01.

(c) Repeat part (b) for the second-order forward and backward 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.

-2x f(x) = e=2

Step by Step Solution

3.35 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Finite Difference Approximation of slope For fxexp2xx fx2exp2x1 Centered diff dfdxfi1fi12... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

45-M-N-A-D-I (58).docx

120 KBs Word File

Students Have Also Explored These Related Numerical Analysis Questions!