数值分析作业 - 数值微分
Problem 1

则误差
至少是
Problem 2

Taylor 展开
则有
解得
即
Problem 3

f[x_] = E^x;
f1[x_, h_] = (f[x - 2 h] - 4 f[x - h] + 3 f[x])/(2 h);
f2[x_, h_] = -(1/(12 h^2)) f[x - 2 h] + 4/(3 h^2) f[x - h] -
5/(2 h^2) f[x] + 4/(3 h^2) f[x + h] - 1/(12 h^2) f[x + 2 h];求一阶导数的误差:
err1 = Table[1 - N[f1[0, 10^-i], 20], {i, 1, 9}]
ListLogPlot[err1]
可以观察到误差大约满足二次收敛.
求二阶导数的误差:
err2 = Table[1 - N[f2[0, 10^-i], 40], {i, 1, 9}]
ListLogPlot[err2]
可以观察到误差大约满足四次收敛.