subject

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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:00
The following function returns a string of length n whose characters are all 'x'. give the order of growth (as a function of n) of the running time. recall that concatenating two strings in java takes time proportional to the sum of their lengths. public static string f(int n) { if (n == 0) return ""; if (n == 1) return "x"; return f(n/2) + f(n - n/2); } options: a) constant b) logarithmic c) linear d) linearithmic e)quadratic f)cubic g) exponential
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
After you present a proposal, the committee starts asking you questions, some beyond the strict focus of your proposal. they ask questions about implications in other fields and knowledge about other fields. you are asked to redo your proposal. what is most likely missing? breadth of material depth of material clarity of material details of material
Answers: 1
question
Computers and Technology, 24.06.2019 07:40
What type of multimedia are live news feeds? live news feeds are examples of multimedia.
Answers: 2
question
Computers and Technology, 24.06.2019 21:00
When replacing a thermostat or water pump, coolant drained from the cooling system should be
Answers: 1
You know the right answer?
The objective of this problem is to compare second-order accurate forward, backward, and centered fi...
Questions