5. (20 points) (a) Write a function eval_central_diff(f, a,b,n) that evaluates the derivative of f defined b-a = on [a,
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
5. (20 points) (a) Write a function eval_central_diff(f, a,b,n) that evaluates the derivative of f defined b-a = on [a,
5. (20 points) (a) Write a function eval_central_diff(f, a,b,n) that evaluates the derivative of f defined b-a = on [a, b] using central differences at the point x; = a + ih for i = 1, ..., n − 1 where h and returns: n x_diff central_diff = All partition points where the numerical derivatives are evaluated the value of the numerical derivative evaluated at each point of x_diff (b) Use the function eval_central_diff to evaluate the numerical derivative of the function f (x) sin x² on the interval [0, 27] with n = 10000. The exact derivative is of course df = 2x cos x². Find the absolute value of the maximum difference between the numerical derivative and exact derivative evaluated at the points x_diff.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!