$$ q:= x^2 - 2 x - 1 = (x - 1)^2 - 2 = (x - 1)^2 - \left( \sqrt{2} \right)^2 = (1 - x)^2 - \left( \sqrt{2} \right)^2 \geq 0 $$
The semialgebraic set (and spectrahedron) $\left] - \infty, 1 - \sqrt{2} \right]$ can be defined by the following linear matrix inequality (LMI)
$$ \begin{bmatrix} 1 - x & \sqrt{2} \\ \sqrt{2} & 1 - x \end{bmatrix} \succeq {\bf O}_2 $$
which, using Sylvester's criterion, encapsulates the linear inequality $1 - x \geq 0$ (or, $x \leq 1$) twice and the quadratic inequality $q = (1 - x)^2 - \left( \sqrt{2} \right)^2 \geq 0$ once. Thus, the root $1 - \sqrt{2}$ can be found via the following semidefinite program (SDP)
$$ \boxed{\begin{array}{ll} \underset {x \in {\Bbb R}} {\text{maximize}} & x \\ \text{subject to} & \begin{bmatrix} 1 - x & \sqrt{2} \\ \sqrt{2} & 1 - x \end{bmatrix} \succeq {\bf O}_2 \end{array}} $$
whereas the root $1 + \sqrt{2}$ can be found via the following SDP
$$ \begin{array}{ll} \underset {x \in {\Bbb R}} {\text{minimize}} & x \\ \text{subject to} & \begin{bmatrix} x - 1 & \sqrt{2} \\ \sqrt{2} & x - 1 \end{bmatrix} \succeq {\bf O}_2 \end{array} $$
whose feasible region is defined by an LMI that encapsulates the linear inequality $x - 1 \geq 0$ (or, $x \geq 1$) twice.
Numerical experiment
In Python + NumPy + CVXPY:
>>> import numpy as np
>>> from cvxpy import *
>>> I_2 = np.identity(2)
>>> H_2 = np.ones((2,2)) - I_2
>>> x = Variable()
>>> SDP = Problem(Maximize(x), [ ((1-x) * I_2) + (np.sqrt(2) * H_2) >> 0 ])
>>> SDP.solve()
-0.4142140469344502
How close is this maximum to the root $1 - \sqrt{2}$?
>>> 1 - np.sqrt(2)
-0.41421356237309515
>>> x.value - (1 - np.sqrt(2))
-4.845613550408245e-07
x <= 1 - sqrt(2)be much simpler? – Rodrigo de Azevedo Mar 05 '25 at 12:20