def CentralDiff(f, x, dx):
    """
    Computes the 1st derivative of a function of a single variable f(x)
    by central differencing:

    \begin{equation}
    f'(x) \approx \frac{f(x + dx) - f(x - dx)}{2 * dx}
    \end{equation}

    Input:
        f: function
            Function of a single variable that returns a float
        x: 
            Point at which the derivative will be computed
        dx: 
            Step size in the central difference algorithm
    """
    return (f(x + dx) - f(x - dx)) / (2*dx)