The assignment is for Matlab software. Need code for the
following:
A New Formula for Approximating Derivatives In addition to Forward, Backward, and Central Difference formulas learned in class, the derivative f'(x) of a function can also be approximated by the following formula f'(x) = -25f(x) + 48f(x+ h) – 36f (x + 2h) +16f(x + 3h) – 3f(x + 4h) + (ha). 12h In the following tasks, you will implement this formula in MATLAB, analyze its convergence, and determine the order a at which the approximation error decreases as h decreases. You will also compare its performance with those of Forward and Central Difference formulas.
Task 3 [10 pts]: Produce a convergence plot. Make sure to include the following items: • use loglog scale • include a reference slope showing the convergence rate (the a value) • include appropriate labels and legend Write your code below:
The assignment is for Matlab software. Need code for the following:
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am