Calculate the value of f1 and absolute errors using simple d
Calculate the value of f\'(1) and absolute errors using simple difference method at h = 1, 1/2, 1/4, 1/8, and 1/16. b. Establish if the accuracy of the results improves when Richardson\'s extrapolation method is used.
Solution
consider the function f(x) = e^x
f\'(x) = f(x+h) - f(x) / h
f\'(1) at h = 1/2
f\'(1) = f(1+1/2) - f(1) / 1/2
= e^3/2 - e^1 / 0.5
= 4.606
at h=1/4 f\'(1) = f(1+1/4) - f(1) / 1/4
= e^5/4 - e^1 / 1/4 = 36.423
at h=1/8 f\'(1) = f(1+1/8) - f(1) / 1/8
=e^9/8 - e^1 / 1/8 = 1012.445
richardson\'s extrapolation method on taking approximation
to find D(h) = f(x+h)-f(x-h) / 2h
at h= 1/ 2
D(1) = f(1+1/2) - f(1-1/2) = f(3/2) - f(1/2) = e^3/2 - e^1/2 = 8.68
D(1) = f(1+1/4) - f(1-1/4) / 2(1/4) = f(5/4) - f(3/4) / 1/2 = e^5/4 - e^3/4 / 1/2 = 64.16
D(1) = f(1+1/8) - f(1-1/8) / 2(1/8) = f(9/8) - f(7/8) / 1/4 = e^9/8 - e^7/8/ 1/4 = 978.61
accuracy of the result is improved on using richardson\'s extrapolation method
