Topics: Numerical Methods
Central Difference is a second-order, finite difference method to numerically approximate the derivative of a function or a dataset. It estimates the derivative using the previous point and the next point as
dtdf≈2Δtf(t+Δt)−f(t−Δt)
Starting from the Taylor series expansion of f(t+Δt) and f(t−Δt):
f(t+Δt)=f(t)+Δtdtdf(t)+2!Δt2dt2d2f(t)+3!Δt3dt3d3f(t)+O(Δt4)
f(t−Δt)=f(t)−Δtdtdf(t)+2!Δt2dt2d2f(t)−3!Δt3dt3d3f(t)+O(Δt4)
Subtracting f(t−Δt) from f(t+Δt) and dividing by 2Δt gives:
2Δtf(t+Δt)−f(t−Δt)=dtdf+3!Δt2dt3d3f(t)+O(Δt3)
The terms after dtdf(t) form the error of the Central Difference method. This error is O(Δt2), i.e., it is proportional to Δt2. This is why it is a second-order method.
- https://www.youtube.com/watch?v=9fGaTU1-f-0&pp=ygUgc3RldmUgYnJ1bnRvbiBmb3J3YXJkIGRpZmZlcmVuY2U%3D