Solution (source code)

= Solution

Apply the <matrix determinant lemma> to $HP-\lambda I=(H-\lambda I)-Hu,u^T$: its <determinant> is $\chi_H(\lambda)[1-u^T(H-\lambda I)^{-1}Hu]$.