수치 미분은 차분이나 라그랑주 보간법, 테일러 급수 등을 활용하여 구하기 어려운 함수의 도함수를 근사적으로 구하는 방법이다. 그 과정에서 Truncation Error가 발생할 수 있으며, $h \approx 0$의 차수가 커질수록 Truncation Error는 급격하게 작아진다.
Numerical Differentiation(수치 미분)은 함수의 도함수를 직접 구할 수 없을 때, 차분을 통해 미분값을 근사적으로 구하는 방법이다.
Suppose that
Forward Difference Formula
$\begin{aligned} f'(x_0) &= \frac {f(x_0 + h) - f(x_0)} {h} - \frac h 2 f''(\xi(x)) \\ &\approx \frac {f(x_0 + h) - f(x_0)} {h} \end{aligned}$
Truncation Error
$\displaystyle -\frac h 2 f''(\xi(x)) = O(h^2)$
proof
Backward Difference Formula
$\begin{aligned} f'(x_0) &= \frac {f(x_0) - f(x_0 - h)} {h} + \frac h 2 f''(\xi(x)) \\ &\approx \frac {f(x_0) - f(x_0 - h)} {h} \end{aligned}$
Truncation Error
$\displaystyle \frac h 2 f''(\xi(x)) = O(h^2)$
Error Bound
$\displaystyle \frac {|M|h} {2}$
$n+1$개의 값을 통해 일반화된 공식을 얻을 수 있다.
$\displaystyle f'(x_j) = \sum_{k=0}^n f(x_k) L_k'(x) + \frac {f^{(n+1)}(\xi(x_j))} {(n+1)!} \prod_{\substack{k=0\\k≠j}}^n (x_j-x_k)$
$\displaystyle f'(x_0) = \frac {1} {2h} [f(x_0+h) - f(x_0-h)] - \frac {h^2} {6} f^{(3)}(\xi)$
Truncation Error
$\displaystyle
두 개의 점을 쓰고 더 정확하다.