Let's say I have the following quadratic equation
$$ (x - a_1)^2 + (x - a_2)^2 + \dots + (x - a_n)^2 = b $$
This will have $2$ solutions (complex solutions are valid). One could expand that out, collect the terms and then use the quadratic formula. Is there a way to solve this directly without rewriting everything?
Note this is the equation 2.6 in Zhao's fast sweeping paper.
You can consider the vector $\mathbf{v}=(a_1,...,a_n)$.
$$v_1:=\langle\mathbf{v},\mathbf{1}\rangle\text{ and }v_2:=\|\mathbf{v}\|_2^2$$
Now you can write the equation as $$nx^2-2v_1x+v_2-b=0$$