Final steps
- Update the inverse Hessian approximation using the following formula:
$$
s_k = \mathbf{x}_{k+1} - \mathbf{x}_k, \quad y_k = \nabla f(\mathbf{x}_{k+1}) - \nabla f(\mathbf{x}_k)
$$
$$
H_{k+1} = H_k + \frac{s_k s_k^T}{s_k^T y_k} - \frac{H_k y_k y_k^T H_k}{y_k^T H_k y_k}
$$
- Repeat the process until convergence, i.e., \( \|\nabla f(\mathbf{x}_k)\| \) is sufficiently small.