def derivative(f, x0, eps=1e-6):
    """Computes a numerical approximation of the first derivative of the function f(x)
     at the point x0 using central differences."""

    e = 1e-6

    return ((f(x0 + (eps/2))) - (f(x0 - (eps/2)))) / eps