Starting from:
$30

$24

Homework 10: NUMERICAL COMPUTATION


    1. Implement the following numerical methods for approximating rst derivatives: (i) one-sided forward di erence, (ii) one-sided backward di erence, and (iii) central di erence. Consider the function

f(x) = sin(4:8    x):

Use the numerical methods to estimate the derivative at x = 0:2 using the following values for h:

h = 2 k;    k = 5; 6; : : : ; 24:

Plot the error versus h on a log-log scale. (You can compute the derivative by hand to get the truth.) For each of the three methods, what is the rate of convergence you observe?

2. Consider the    nite di erence approximation

f0(x)
1
[2f(x + h) + 3f(x)  6f(x  h) + f(x  2h)] :

6h



Using a numerical study similar to Problem 1, identify the rate of convergence for this approxi-mation. Produce a plot that justi es your computed rate. Identify the asymptotic regime in your plot.

BONUS: Construct and implement a 4th-order    nite di erence approximation of a    rst derivative.

    1. (50 points) Use a Taylor series argument to prove that your method is 4th order.

    2. (50 points) Run a numerical experiment to demonstrate that your method is 4th order.

























1

More products