Use finite difference approximations of O(h²) to compute f'(2.36) and f''(2.36)
from the data :
x = 2.36 2.37 2.38 2.39
f(x) = 0.85866 0.86289 0.86710 0.87129
x = [2.36, 2.37, 2.38, 2.39];
f =Â [0.85866, 0.86289, 0.86710, 0.87129];
h = 0.01;
fp = (-1.5*f(1) + 2*f(2) - 0.5*f(3)) / h;
fpp = (2*f(1) - 5*f(2) + 4*f(3) - f(4))/ h/h;
fprintf("f'(2.36) = %.3f; f''(2.36) = %.3f\n", fp, fpp)
Comments
Leave a comment