# Numerical Differentiation

Numerical differentiation is differentiating a function in a way that does not involve normal differentiating methods. This may be because the function is too complex to differentiate directly.

## Finite Difference Approximations

This type of differentiation involves taking the point at which you want to differentiate, and find the slope using either a point before, after or both. Note that this only finds an approximation of the derivative, and at only one point at a time.

The following are the equations to calculate the derivative. These are to calculate the derivative at x, where fi+1 = f(x+h) and fi-1 = f(x-h), given that h = Δx. Note, a smaller Δx will give a more accurate solution.

Forward Difference:

Backward Difference:

Central Difference:

Second derivative using Central Difference:

#### Errors

The error for forward and backward difference is O(h), meaning a first degree truncation error. The higher the degree, the more accurate the approximation. Central difference is O(h2), and is therefore more accurate. This is because it takes the average of forward and backward difference.

## End

This is the end of this topic. Click here to go back to the main subject page for Numerical Methods & Statistics.