- 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 1 (204.85 KiB) Viewed 20 times
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,
-
- Site Admin
- Posts: 899603
- 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.