I am trying to solve the following system of equations
$ \begin{eqnarray} \|p + \alpha n\| & = &\|q + \beta n\| \\ (p + \alpha n) \cdot (q + \beta n) & = & 0 \end{eqnarray} $
for the unknowns $\alpha, \beta \in \mathbb{R}$, with $n$, $p$ and $q$ known vectors in $\mathbb{R}^n$ (the second line contains a dot product), and $\|n\|=1$.
Using some algebra, these equations can be written as
$ \begin{eqnarray} \alpha^2 - \beta^2 + A\alpha + B\beta + C & = & 0 \\ \alpha\beta + D\alpha + E\beta + F & = & 0 \end{eqnarray} $
for suitably defined scalar constants $A$,..., $F$. Further manipulation leads to a quartic equation.
My question: is there some "elegant" closed-form solution, or, otherwise, by what method could this be solved numerically (it seems there are two pairs of solutions)?