用泰勒展开推导四阶精度导数公式
首先,我们将f(x±h)在x处泰勒展开,得到:
f(x±h) = f(x) ± hf'(x) + h²/2! f''(x) ± h³/3! f'''(x) + h⁴/4! f⁽⁴⁾(x) + o(h⁴)
然后,我们将展开式代入f(x±2h)的泰勒展开式中,得到:
f(x±2h) = f(x) ± 2hf'(x) + 4h²/2! f''(x) ± 8h³/3! f'''(x) + 16h⁴/4! f⁽⁴⁾(x) + o(h⁴)
接下来,我们将f(x-2h)、f(x-h)、f(x+h)和f(x+2h)代入f'(x)的定义式中,得到:
f'(x) = [f(x+h) - f(x-h)]/2h + o(h)
f'(x) = [f(x+2h) - f(x)]/2h + o(h)
将两式相减,得到:
f'(x) = [f(x+2h) - f(x-h)]/4h + o(h)
再将f(x-2h)、f(x-h)、f(x+h)和f(x+2h)代入f'(x)的定义式中,得到:
f'(x) = [8f(x+h) - 8f(x-h) - f(x+2h) + f(x-2h)]/12h + o(h²)
将上式左侧的f'(x)用前面的式子进行代换,得到:
[f(x-2h) - 8f(x-h) + 8f(x+h) - f(x+2h)]/12h + o(h⁴) = [8f(x+h) - 8f(x-h) - f(x+2h) + f(x-2h)]/12h + o(h²)
化简,得到:
f'(x) = [f(x-2h) - 8f(x-h) + 8f(x+h) - f(x+2h)]/12h + o(h⁴)
证毕。
原文地址: https://www.cveoy.top/t/topic/oQNE 著作权归作者所有。请勿转载和采集!