For second derivatives f′′(x), calculating the change in slope requires 3 points:
f(xi+2)f(xi+1)=f(xi)+f′(xi)(2h)+2!f′′(xi)(2h)2+…=f(xi)+f′(xi)h+2!f′′(xi)h2+…
If we subtract subtract the equations as (1)−2(2):
f(xi+2)−2f(xi+1)=−f(xi)+f′′(xi)h2+…
Solving for f′′(xi) gives:
Forward:Backward:Centered:f′′(xi)=h2f(xi+2)−2f(xi+1)+f(xi)+O(h)f′′(xi)=h2f(xi)−2f(xi−1)+f(xi)+O(h)f′′(xi)=h2f(xi+1)−2f(xi)+f(xi−1)+O(h)


