Elio Saade
Note

Forward Difference

Topics: Numerical Methods

Definition

Forward Difference is a first-order, finite difference method to numerically approximate the derivative of a function or a dataset. It estimates the derivative using the current point and the next point as
dfdt≈f(t+Δt)−f(t)Δt\frac{df}{dt} \approx \frac{f(t+\Delta t) - f(t)}{\Delta t}

Derivation

Starting from the Taylor series expansion of f(t+Δt)f(t+\Delta t):
f(t+Δt)=f(t)+Δt  df(t)dt+Δt22!  d2f(t)dt2+Δt33!  d3f(t)dt3+O(Δt4)f(t+\Delta t) = f(t) + \Delta t \; \frac{df(t)}{dt} + \frac{\Delta t ^2}{2!} \; \frac{d^2f(t)}{dt^2} + \frac{\Delta t ^3}{3!} \; \frac{d^3 f(t)}{dt^3} + \mathcal{O}(\Delta t ^4)
Subtracting f(t)f(t) and dividing by Δt\Delta t gives:
f(t+Δt)−f(t)Δt=df(t)dt+Δt2!  d2f(t)dt2+Δt23!  d3f(t)dt3+O(Δt3)\frac{f(t+\Delta t) - f(t)}{\Delta t} = \frac{df(t)}{dt} + \frac{\Delta t }{2!} \; \frac{d^2f(t)}{dt^2} + \frac{\Delta t ^2}{3!} \; \frac{d^3 f(t)}{dt^3} + \mathcal{O}(\Delta t ^3)
The terms after df(t)dt\frac{df(t)}{dt} form the error of the Forward Difference method. This error is O(Δt)\mathcal{O}(\Delta t), i.e., it is proportional to Δt\Delta t. This is why it is a first-order method.

References

  1. https://www.youtube.com/watch?v=9fGaTU1-f-0&pp=ygUgc3RldmUgYnJ1bnRvbiBmb3J3YXJkIGRpZmZlcmVuY2U%3D

Connections

Direct relationships to this note.