def levenberg_marquardt_update(x, a, c, damping=0.001):
    """ 
    Given a value of x, return a better x 
    using newton-gauss 
    """
    hess = hessian(x, a)
    return x - np.linalg.inv(hess + damping*np.diag(hess)).dot(gradient(x, a, c))