Local cubic convergence of Rayleigh quotient iteration (source code)

= Local cubic convergence of Rayleigh quotient iteration
{c}

Let a real symmetric <matrix> have simple eigenpairs $(\lambda_i,w_i)$ and let
$$
x=c^{-1}\left(w_1+\epsilon\sum_{i\geq2}a_iw_i\right).
$$
Then its <Rayleigh quotient> is
$$
R_A(x)=\lambda_1+\epsilon^2D+O(\epsilon^4),
\qquad
D=\sum_{i\geq2}a_i^2(\lambda_i-\lambda_1).
$$
After solving the shifted <linear system> and applying <vector normalization>, the relative <coefficients> are
$$
-\epsilon^3\frac{Da_i}{\lambda_i-\lambda_1}+O(\epsilon^5).
$$
Thus the <eigenvector> direction error is cubed at each sufficiently close iterate for which the shifted <linear system> has a unique solution. This qualification matters for an interior <eigenvalue>: for $A=\operatorname{diag}(-1,0,1)$ and $x\propto(\epsilon,1,\epsilon)$, the <Rayleigh quotient> is exactly zero although $x$ is not an <eigenvector>, so $Aw=x$ has no solution. Such a shift requires a separate termination check or a modified solve.