<s>[INST] When are these eigenvalues non-negative? I'm trying to find a pair of real numbers $(a,b)$ which ensure that some matrix is strictly positive semi-definite.The eigenvalues of this matrix are $$\lambda=1 + a \pm \sqrt{(c+b)^2+2(x'-ax)^2}$$ and $$\lambda=1 - a \pm \sqrt{(c-b)^2+2(x'-ax)^2}.$$ 
I therefore need one of the eigenvalues to be zero and the rest non-negative.
For a fixed $c,x,x' \in \mathbb R$, what is the best way to determine some $a,b$ exist? If not, are there conditions on $x,x',c$ so that $a,b$ exist? Here I know that $0\leq x,x' \leq 1/\sqrt2$ and $0 \leq c \leq 1$.
 [/INST] I will use the notations $X=\sqrt{2}x$ and $X^\prime=\sqrt{2}x^\prime$ as it makes every expression simpler. 
I will prove the following:

If $c^2 +{X^\prime}^2\leq 1$, then: 
  
  
*
  
*Pick any $b$ in the interval $\left[0, \sqrt{1-{X^\prime}^2}-c\right]$
  
*If $X\neq 1$ put $a=\dfrac{-\left(1+XX^\prime\right) +\sqrt{\left(X+X^\prime\right)^2+\left(1-X^2\right)\left(c+b\right)^2}}{1-X^2}$
  
*If $X=1$ put $a=\dfrac{(c+b)^2+{X^\prime}^2-1}{2\left(1+X^\prime\right)}$
  
  
  (a, b) is a solution and the vanishing eigenvalue is $1 + a - \sqrt{(c+b)^2+(X'-aX)^2}$


Note that the smallest of the four eigenvalues is either $$\lambda_1=1 + a - \sqrt{(c+b)^2+(X'-aX)^2}\qquad  or\qquad \lambda_2=1 - a - \sqrt{(c-b)^2+(X'-aX)^2}$$ 
Your problem is equivalent to finding $a,b$ such that one of these situations occurs:


*

*$0=\lambda_1\leq\lambda_2$ 

*$0=\lambda_2\leq\lambda_1$.


I'll focus on the first situation. 
First, $0=\lambda_1 $ is equivalent to 
$$a+1\geq 0 \qquad and \qquad a^2 \left(1-X^2\right)+2a\left(1+XX^\prime\right)+\left(1-{X^\prime}^2-(c+b)^2\right)=0$$
When $X=1$ (the largest allowed value) this is a degree $1$ equation whose unique solution $$a=\frac{(c+b)^2+{X^\prime}^2-1}{2\left(1+X^\prime\right)}$$
is easily seen to satisfy $a+1\geq 0$ as required.
When $X\neq 1$, you need $\left(1+XX^\prime\right)^2-\left(1-X^2\right)\left(1-{X^\prime}^2-(c+b)^2\right)$ to be non-negative (we assume this for now and will look at it closer when we will be looking for $b$), there are then two solutions for $a$:
$$a=\dfrac{-\left(1+XX^\prime\right) \pm\sqrt{\left(1+XX^\prime\right)^2-\left(1-X^2\right)\left(1-{X^\prime}^2-(c+b)^2\right)}}{1-X^2}$$
but since $a+1$ needs to be nonnegative, there is hope only for the solution with "$+$" and the condition $a+1\geq 0$ becomes
$$\left(1+XX^\prime\right)^2-\left(1-X^2\right)\left(1-{X^\prime}^2-(c+b)^2\right)\geq \left(X^2+XX^\prime\right)^2 $$
since $u\leq v$ and $u^2\leq v^2$ are equivalent if $u$ and $v$ are known to be non-negative.
After crossing out the nonnegative common factor $\left(1-X^2\right)$ this simplifies into $$(X+X^\prime)^2+(c+b)^2\geq 0$$ which is always true.

So far, we have shown that $0=\lambda_1$ is equivalent to:
  
  
*
  
*When $X=1$,  $$a=\frac{(c+b)^2+{X^\prime}^2-1}{2\left(1+X^\prime\right)}$$
  
*When $X\neq 1$,  $$a=\dfrac{-\left(1+XX^\prime\right) +\sqrt{\left(X+X^\prime\right)^2+\left(1-X^2\right)\left(c+b\right)^2}}{1-X^2}$$
  

Now let's have a look at $\lambda_1\leq\lambda_2$. Because of all the square roots, it would be extremely painful to solve exactly. However there are some ranges of parameters that allow us to make this easy.
Note that $\lambda_1\leq\lambda_2$ has the form $$2a\leq \text{(some difference of square roots)}$$ 
I will solve $$2a\leq 0\leq \text{(that difference of square roots)}$$ 
First, $a\leq 0$ is equivalent to $$b\leq \sqrt{1-{X^\prime}^2}-c$$
It is easy to check in the case $X=0$, and not too difficult in the case $X\neq 0$.
Second, the difference of square roots on the right is $$\sqrt{(c+b)^2+(X'-aX)^2} - \sqrt{(c-b)^2+(X'-aX)^2}$$ and since $c$ is nonnegative, this difference is nonnegative if and only if $b\geq 0$. Finding $b$ such that  $0\leq b\leq \sqrt{1-{X^\prime}^2}-c$ is possible if and only if $c\leq \sqrt{1-{X^\prime}^2}$.
The announced result follows.
The result was double-checked by computer.
</s>