Question: Write and run a computer program to approximate the derivative of function f at point z defined by the equation f'(x) = lim h0

Write and run a computer program to approximate the derivative of function f at point z defined by the 

Write and run a computer program to approximate the derivative of function f at point z defined by the equation f'(x) = lim h0 Try f(x) = sin(z) at z = 0.5 and h 0.5 ha-1,ho 1, n = 1, 2,.... 30. Compute absolute errors of the approximation using the formula error = ly - f'(x), where yn is yn is an output of the program in iteration n. Plot the errors on using a log-scale, i.e., the axes of the plot should be log0 error versus log10 h. Analyze the results. Repeat the same experiment for f(x) = 1. (b) (5%) Find a way for to calculate accurate values for 1+ 2-1 x f(x): f(x+h)-f(x) h = = .sin(x) x-tan(r)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Programming Questions!