Professional Documents
Culture Documents
9 Key To Numerical Differentiation
9 Key To Numerical Differentiation
Laboratory Exercise 9
Numerical Differentiation
ANSWER KEY
Score:
10
10
Do as indicated.
1. Derive a (a) four-point forward and a (b) four-point backward formula both of order three for f 0
together with their error terms. To ensure uniformity in our formulas, set 18 to be the multiplier to
f (x + h) and f (x h).
Solution:
(a) Note that
h3
h4
h2 00
f (x) + f 000 (x) + f iv (x) + ...
2
6
24
2
3
4h
8h
16h4 iv
f (x + 2h) = f (x) + 2hf 0 (x) +
f 00 (x) +
f 000 (x) +
f (x) + ...
2
6
24
27h3 000
81h4 iv
9h2 00
f (x) +
f (x) +
f (x) + ...
f (x + 3h) = f (x) + 3hf 0 (x) +
2
6
24
f (x + h) = f (x) + hf 0 (x) +
36 4 iv
h f (), (x, x + 3h)
24
11f (x) + 18f (x + h) 9f (x + 2h) + 2f (x + 3h) h3 iv
= f 0 (x) =
f ()
6h
4
11f (x) + 18f (x + h) 9f (x + 2h) + 2f (x + 3h)
0
+ O(h3 ).
= f (x) =
6h
3pts for formula, 1pt for error term
(b) Similarly,
h2 00
h3
h4
f (x) f 000 (x) + f iv (x) + ...
2
6
24
3
2
8h
16h4 iv
4h
f 00 (x)
f 000 (x) +
f (x) + ...
f (x 2h) = f (x) 2hf 0 (x) +
2
6
24
9h2 00
27h3 000
81h4 iv
f (x 3h) = f (x) 3hf 0 (x) +
f (x)
f (x) +
f (x) + ...
2
6
24
f (x h) = f (x) hf 0 (x) +
= f 0 (x) =
5
2. Determine an upper
bound
for the error incurred when the formulas were applied to f (x) = x sin x
5
3. Use the formulas you got from #1 to complete the table below. Note that the data was obtained
from the function f (x) = x5 sin x.
1pt
Extra Credit: Derive a three-point centered fromula of order two for f 00 together with its error term.
f (x + h) 2f (x) + f (x h) h2 iv
Answer: f 00 (x) =
f (), (x h, x + h).
h2
12
2pts all or nothing
***end of exercise***