Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

central-difference formula

Approximating a derivative from one point ahead and one point behind, straddling x symmetrically -- one order of accuracy better than using either side alone.

The central-difference formula approximates f'(x) by D(h)=\dfrac{f(x+h)-f(x-h)}{2h}, the slope of the secant line through (x-h,f(x-h)) and (x+h,f(x+h)). Its truncation error is O(h^2) -- one order better than the one-sided forward- or backward-difference formulas -- because the symmetric expansion cancels the h^1 error term exactly (ch.05 sec.3).

Examples

  • For f(x)=x^2 at x=1, h=0.1: \dfrac{f(1.1)-f(0.9)}{0.2}=\dfrac{1.21-0.81}{0.2}=2, exactly matching f'(1)=2 -- no error at all, since x^2's own error term vanishes identically.

Read the full section →
Graph settings

Calculator