3An alternative (and easier) function is optimise but this does not compute the Hessian matrix.