4

Suppose $e_i \in \mathbb{R}^3$, $1\leq i \leq 3$ with $\Vert e_i \Vert=1$. Suppose $u,v \in \mathbb{R}^3$, $u^T v=0$, $e_i^T u \neq 0$, $\Vert u \Vert =1$. Suppose $k\in \mathbb{R}$.

Define the projection on the plane orthogonal to $e_i$

$P_i= I-e_i e_i^T$

where $I$ is the $\mathbb{R}^{3\times 3}$ identity matrix.

Suppose $e_i$ and

$\displaystyle q_i = k \frac{e_i \times u}{e_i^T u} + P_i v $

are known for $1\leq i \leq 3$. Is it possible to recover $k$, $u$ and $v$? (and, even before that, is the function from $(k,u,v)$ to $(q_1,q_2,q_3)$ injective? It is clearly not surjective in $\mathbb{R}^9$)

  • It might be helpful to note that $e_i \times (e_i \times u) = -P_i u$. More generally, $e_i \times (e_j \times u) = e_i^Tu e_j - \delta_{ij}u$. – Ben Grossmann Jun 30 '20 at 14:16
  • My current approach is defining $\alpha_1 = u_2/ u_3 - u_3/u_2$ and similar for the other indexes, where $u_i= e_i^T u$. Then $e_1^T (q_2+q_3) = e_1^T (e_2 \times e_3) \alpha_1 + M v $ where $M$ is a matrix. This gives me 3 equations, but I have 6 unknowns ($\alpha_i$ and $v_i$) – Fabio Dalla Libera Jun 30 '20 at 14:28
  • This question/answers imply that more conditions may be required : https://math.stackexchange.com/questions/32600/whats-the-opposite-of-a-cross-product –  Jul 01 '20 at 00:16
  • Yes, I think that those observations can be restated as saying that each equation in $q_i$ actually gives two equations instead of three. It is easy to see that $ e_i ^T q_i =0$. Still we have 7 equations and 6 unknowns – Fabio Dalla Libera Jul 01 '20 at 00:38
  • The form of the equations look like quadratic constraints. $x = [u_1,u_2,u_3,v_1,v_2,v_3]^T$ , $\frac{1}{2}x^TQ_kx + {c_k}^Tx = 0$, e.g. minimizing $|u|^2 + |v|^2 $ , https://en.wikipedia.org/wiki/Quadratically_constrained_quadratic_program –  Jul 01 '20 at 03:54
  • Fabio Dalla Libera - An analytical approach seems to result in quadratic vector equations. A numerical approach could use Newtons method $x = [u_1,u_2,u_3,v_1,v_2,v_3]^T$ , $F(x)$ is a non linear vector of equations. $\displaystyle F_i(x) = \frac{e_i \times u}{e_i^T u} + P_i v -q_i$ , then use $\Delta x \approx - smallratio * pseudoinverse(F'(x))F(x)$, using different starting points e.g. $u = v = \frac{q}{2}$. Are you interested in numerical methods? –  Jul 01 '20 at 10:02
  • I tried scipy.optimize.minimize, even without explicit gradient it works. But I am interested in an analytical approach, at least for confirming the uniqueness of the solution – Fabio Dalla Libera Jul 01 '20 at 11:06
  • I tried grobner_basis in maxima, it got stuck and didn't complete. –  Jul 01 '20 at 12:27
  • Quick sanity check: are the $e_i$ known to form an orthonormal frame, or is the point that they're not orthogonal? – Steven Stadnicki Jul 03 '20 at 01:51
  • they are potentially not orthogonal. Anyway I would be interested in knowing if the solution is unique at least when they are orthogonal. – Fabio Dalla Libera Jul 03 '20 at 01:55

5 Answers5

1

We can eliminate $v$ from the equations. Let $Q$ and $E$ be the augmented matrices $[q_1|q_2|q_3]$ and $[e_1|e_2|e_3]$ respectively. I assume that $E$ is nonsingular, otherwise the system of equations in question is clearly not uniquely solvable. From the equations $u^Tv=0$ and $$ q_i=k\frac{e_i\times u}{e_i^Tu}+P_iv,\tag{1} $$ we obtain $u^Tq_i=-(e_i^Tu)(e_i^Tv)$ for each $i$. Therefore $$ Q^Tu=-\operatorname{diag}(e_1^Tu,\,e_2^Tu,\,e_3^Tu)E^Tv. $$ Since $E$ is invertible and $e_i^Tu\ne0$, we can solve $v$ in terems of $u$: $$ v=-(E^T)^{-1}\operatorname{diag}\left(\frac{1}{e_1^Tu},\,\frac{1}{e_2^Tu},\,\frac{1}{e_3^Tu}\right)Q^Tu.\tag{2} $$ The system of equations and inequations $e_i^Tu\ne0,\,u^Tv=0$ and $(1)$ is now equivalent to \begin{cases} e_i^Tu\ne0,\\ u^T(E^T)^{-1}\operatorname{diag}\left(\frac{1}{e_1^Tu},\,\frac{1}{e_2^Tu},\,\frac{1}{e_3^Tu}\right)Q^Tu=0,\\ q_i=k\frac{e_i\times u}{e_i^Tu}-P_i(E^T)^{-1}\operatorname{diag}\left(\frac{1}{e_1^Tu},\,\frac{1}{e_2^Tu},\,\frac{1}{e_3^Tu}\right)Q^Tu. \end{cases} (The condition $\|u\|=1$ is useless, as $(1)$ is homogeneous in $u$. We can always solve for $u$ first and normalise it later.) If we put $x=E^Tu,\,S= (E^TE)^{-1},\,R=Q^T(E^T)^{-1},\,C_i=[e_i]_\times(E^T)^{-1}$ and $L_i=P_i(E^T)^{-1}$, the above system can be rewritten as $$ \begin{cases} x_i\ne0,\\ x^TS\operatorname{diag}\left(\frac{1}{x_1},\,\frac{1}{x_2},\,\frac{1}{x_3}\right)Rx=0,\\ q_i=\frac{k}{x_i}C_ix-L_i\operatorname{diag}\left(\frac{1}{x_1},\,\frac{1}{x_2},\,\frac{1}{x_3}\right)Rx. \end{cases} $$

Note that if $(k,x)$ is a solution, so is $(k,tx)$ for all nonzero $t$. Since $x_i\ne0$ for each $i$, there always exists a $t$ such that $(tx_1)(tx_2)(tx_3)=1$. Therefore, we can replace the inequality constraint $x_i\ne0$ above by $x_1x_2x_3=1$. If we also clear the denominators, the problem will reduce to a system of one degree-$3$ polynomial equation and ten degree-$4$ equations in four unknowns $x_1,x_2,x_3$ and $k$: $$ \begin{align} &x_1x_2x_3=1,\tag{3}\\ &x^TS\operatorname{diag}\left(x_2x_3,\,x_1x_3,\,x_1x_2\right)Rx=0,\tag{4}\\ &q_i=k\left(\prod_{j\ne i}x_j\right)C_ix-L_i\operatorname{diag}\left(x_2x_3,\,x_1x_3,\,x_1x_2\right)Rx.\tag{5} \end{align} $$

user1551
  • 149,263
  • thank you,I will try. I previously eliminated $v$ by noting that $(e_i \times e_j)^T (q_i-q_j)$ is independent from v. The three combinations of e1,e2 and e3 give three equations. Still, they were unsolvable with sympy (by the way I thought of that approach thanks to your answer on my previous question :) ) – Fabio Dalla Libera Jul 03 '20 at 09:12
  • Elegant analysis. There are only six combinations of $\displaystyle \frac{x_j}{x_h}$ , treating $k$ as a constant. Can the nine $q_i$ equations resolve all $\displaystyle\frac{x_j}{x_h}$ linearly?. Resulting in a polynomial entirely in $k$. –  Jul 04 '20 at 05:24
0

Maxima could not solve it but here are the $10$ equations in $6$ unkowns all equal to $0$.

The $q_i$ equations are multiplied by the denominator scalar $\displaystyle e_i^T u$.

Gröbner basis might be feasable for this size problem.

Maxima:

load("vect");
cross(u, v) := matrix(u[2] * v[3] - v[2] * u[3], v[1] * u[3] - u[1] * v[3],u[1] * v[2] - v[1] * u[2]);
dot(u, v) := u[1] * v[1] + u[2] * v[2] + u[3] * v[3];

u : matrix ([u[1]] , [u[2]], [u[3]]); v : matrix ([v[1]] , [v[2]], [v[3]]);

q1 : matrix ([q1[1]] , [q1[2]], [q1[3]]); e1 : matrix ([e1[1]] , [e1[2]], [e1[3]]); P1 : matrix([1,0,0],[0,1,0],[0,0,1]) - e1 . transpose(e1); E1 : cross(e1,u) + transpose(e1) . u * ( P1 . v - q1) ;

q2 : matrix ([q2[1]] , [q2[2]], [q2[3]]); e2 : matrix ([e2[1]] , [e2[2]], [e2[3]]); P2 : matrix([1,0,0],[0,1,0],[0,0,1]) - e2 . transpose(e2); E2 : cross(e2,u) + transpose(e2) . u * ( P2 . v - q2) ;

q3 : matrix ([q3[1]] , [q3[2]], [q3[3]]); e3 : matrix ([e3[1]] , [e3[2]], [e3[3]]); P3 : matrix([1,0,0],[0,1,0],[0,0,1]) - e3 . transpose(e3); E3 : cross(e3,u) + transpose(e3) . u * ( P3 . v - q3) ;

solve([E1[1][1],E1[2][1],E1[3][1],E2[1][1],E2[2][1],E2[3][1],E3[1][1],E3[2][1],E3[3][1], u . v],[u[1],u[2],u[3],v[1],v[2],v[3]]);

E1[1][1]; tex(%); E1[2][1]; tex(%); E1[3][1]; tex(%);

E2[1][1]; tex(%); E2[2][1]; tex(%); E2[3][1]; tex(%);

E3[1][1]; tex(%); E3[2][1]; tex(%); E3[3][1]; tex(%);

u . v; tex(%);

$$\left({\it e_1}_{3}\,u_{3}+{\it e_1}_{2}\,u_{2}+{\it e_1}_{1}\,u_{1 }\right)\,\left(-{\it e_1}_{1}\,{\it e_1}_{3}\,v_{3}-{\it e_1}_{1}\, {\it e_1}_{2}\,v_{2}+\left(1-{\it e_1}_{1}^2\right)\,v_{1}-{\it q_1} _{1}\right)+{\it e_1}_{2}\,u_{3}-u_{2}\,{\it e_1}_{3}$$

$$\left({\it e_1}_{3}\,u_{3}+{\it e_1}_{2}\,u_{2}+{\it e_1}_{1}\,u_{1 }\right)\,\left(-{\it e_1}_{2}\,{\it e_1}_{3}\,v_{3}+\left(1- {\it e_1}_{2}^2\right)\,v_{2}-{\it q_1}_{2}-{\it e_1}_{1}\,v_{1}\, {\it e_1}_{2}\right)-{\it e_1}_{1}\,u_{3}+u_{1}\,{\it e_1}_{3}$$

$$\left({\it e_1}_{3}\,u_{3}+{\it e_1}_{2}\,u_{2}+{\it e_1}_{1}\,u_{1 }\right)\,\left(\left(1-{\it e_1}_{3}^2\right)\,v_{3}-{\it q_1}_{3}- {\it e_1}_{2}\,v_{2}\,{\it e_1}_{3}-{\it e_1}_{1}\,v_{1}\,{\it e_1} _{3}\right)+{\it e_1}_{1}\,u_{2}-u_{1}\,{\it e_1}_{2}$$

$$\left({\it e_2}_{3}\,u_{3}+{\it e_2}_{2}\,u_{2}+{\it e_2}_{1}\,u_{1 }\right)\,\left(-{\it e_2}_{1}\,{\it e_2}_{3}\,v_{3}-{\it e_2}_{1}\, {\it e_2}_{2}\,v_{2}+\left(1-{\it e_2}_{1}^2\right)\,v_{1}-{\it q_2} _{1}\right)+{\it e_2}_{2}\,u_{3}-u_{2}\,{\it e_2}_{3}$$

$$\left({\it e_2}_{3}\,u_{3}+{\it e_2}_{2}\,u_{2}+{\it e_2}_{1}\,u_{1 }\right)\,\left(-{\it e_2}_{2}\,{\it e_2}_{3}\,v_{3}+\left(1- {\it e_2}_{2}^2\right)\,v_{2}-{\it q_2}_{2}-{\it e_2}_{1}\,v_{1}\, {\it e_2}_{2}\right)-{\it e_2}_{1}\,u_{3}+u_{1}\,{\it e_2}_{3}$$

$$\left({\it e_2}_{3}\,u_{3}+{\it e_2}_{2}\,u_{2}+{\it e_2}_{1}\,u_{1 }\right)\,\left(\left(1-{\it e_2}_{3}^2\right)\,v_{3}-{\it q_2}_{3}- {\it e_2}_{2}\,v_{2}\,{\it e_2}_{3}-{\it e_2}_{1}\,v_{1}\,{\it e_2} _{3}\right)+{\it e_2}_{1}\,u_{2}-u_{1}\,{\it e_2}_{2}$$

$$\left({\it e_3}_{3}\,u_{3}+{\it e_3}_{2}\,u_{2}+{\it e_3}_{1}\,u_{1 }\right)\,\left(-{\it e_3}_{1}\,{\it e_3}_{3}\,v_{3}-{\it e_3}_{1}\, {\it e_3}_{2}\,v_{2}+\left(1-{\it e_3}_{1}^2\right)\,v_{1}-{\it q_3} _{1}\right)+{\it e_3}_{2}\,u_{3}-u_{2}\,{\it e_3}_{3}$$

$$\left({\it e_3}_{3}\,u_{3}+{\it e_3}_{2}\,u_{2}+{\it e_3}_{1}\,u_{1 }\right)\,\left(-{\it e_3}_{2}\,{\it e_3}_{3}\,v_{3}+\left(1- {\it e_3}_{2}^2\right)\,v_{2}-{\it q_3}_{2}-{\it e_3}_{1}\,v_{1}\, {\it e_3}_{2}\right)-{\it e_3}_{1}\,u_{3}+u_{1}\,{\it e_3}_{3}$$

$$\left({\it e_3}_{3}\,u_{3}+{\it e_3}_{2}\,u_{2}+{\it e_3}_{1}\,u_{1 }\right)\,\left(\left(1-{\it e_3}_{3}^2\right)\,v_{3}-{\it q_3}_{3}- {\it e_3}_{2}\,v_{2}\,{\it e_3}_{3}-{\it e_3}_{1}\,v_{1}\,{\it e_3} _{3}\right)+{\it e_3}_{1}\,u_{2}-u_{1}\,{\it e_3}_{2}$$

$$u_{3}\,v_{3}+u_{2}\,v_{2}+u_{1}\,v_{1}$$

0

I'm sure this needs checking.

The strategy is to find three equations entirely in $u$ variables $u_1,u_2,u_3$ and solve them.

$$\displaystyle q_i = \frac{e_i \times u}{e_i^T u} + P_i v \tag{1}$$

$$u \cdot v = 0 \tag{2}$$

If $P_i$ is invertible then:

$$\displaystyle v = -{P_i}^{-1}\frac{e_i \times u}{e_i^T u} + {P_i}^{-1} q_i \tag{3}$$

$v$ is expressed in terms of $u$.

Substituting $v$ into $(2)$ gives one equation entirely in $u$.

If $P$ is not invertible then row reductions can be performed to find a row echelon form that will have one or more zero rows.

$P \rightarrow \begin{bmatrix} a & b & c\\ 0 & d & e\\ 0 & 0 & 0\end{bmatrix}$ or $\begin{bmatrix} a & b & c\\ 0 & 0 & 0\\ 0 & 0 & 0\end{bmatrix}$ or $\begin{bmatrix} 0 & 0 & 0\\ 0 & 0 & 0\\ 0 & 0 & 0\end{bmatrix}$ or other forms.

Each zero row produces an equation in $u$ variables only (no $v$ variables).

$$\displaystyle q_{ik} = \frac{(e_i \times u)_k}{e_i^T u} \: \: with\: row\: reductions\tag{4}$$

$$e_i \times u = \begin{bmatrix} e_{i2}u_3 - e_{i3}u_2 \\ e_{i3}u_1 - e_{i1}u_3 \\ e_{i1}u_2 - e_{i2}u_1\end{bmatrix} \tag{5}$$

Some or many of the $e_{ik}$ values could be zero so select non zero rows of $e_i \times u$.

In the case where $P_i$ is invertible $(3)$ substituted into $(2)$ has a common scalar denominator ${e_i^T u} $ that can be multiplied into the numerator:

$$u_1 \cdot v_1 + u_2 \cdot v_2 + u_3 \cdot v_3 = $$ $$u_1 [{P_i}^{-1}{(e_i \times u)} - {e_i^T u}{P_i}^{-1} q_i]_1 + u_2 [{P_i}^{-1}{(e_i \times u)} - {e_i^T u}{P_i}^{-1} q_i]_2 + u_3 [{P_i}^{-1}{(e_i \times u)} - {e_i^T u}{P_i}^{-1} q_i]_3 = 0 \tag{6}$$

The $u$ order of equation $(6)$ is $2$ i.e. it has terms of the form ${u_1}^2$, $u_1u_2$ etc... Its a quadratic.

This produces equations of the form:

$$ c_{11}{u_1}^2 + c_{22}{u_2}^2 + ... + c_{12}u_1u_2 ... = 0 \tag{7}$$

If all $P_i$ are invertible there will be three quadratic equations of the form $(7)$.

From $(4)$ if some $P_i$ where not invertible there will be equations of the form:

$$c_1 u_1 + c_2 u_2 + c_3 u_3 = 0 \tag{8}$$

If the conditions are not degenerate (bad $e_i$) then these equations should be solvable.

  • I tried this approach, but unfortunately it leads nowhere. P is in the first form you listed. It is possible to define a base where $e_i=\left[\begin{matrix}- \sin{\left(\alpha \right)} \sin{\left(\gamma \right)} & \sin{\left(\alpha \right)} \cos{\left(\gamma \right)} & \cos{\left(\alpha \right)}\end{matrix}\right]$ is one vector of the base and complete the (orthonormal) base with the vectors – Fabio Dalla Libera Jul 02 '20 at 01:34
  • $ e^x_i=\left[\begin{matrix}2 \sin^{2}{\left(\frac{\alpha}{2} \right)} \sin{\left(\gamma \right)} \cos{\left(\gamma \right)} & - 2 \sin^{2}{\left(\frac{\alpha}{2} \right)} \cos^{2}{\left(\gamma \right)} + 1 & - \sin{\left(\alpha \right)} \cos{\left(\gamma \right)}\end{matrix}\right]$ and $e^y_i=\left[\begin{matrix}- 2 \sin^{2}{\left(\frac{\alpha}{2} \right)} \sin^{2}{\left(\gamma \right)} + 1 & 2 \sin^{2}{\left(\frac{\alpha}{2} \right)} \sin{\left(\gamma \right)} \cos{\left(\gamma \right)} & \sin{\left(\alpha \right)} \sin{\left(\gamma \right)}\end{matrix}\right]$. However, I cannot solve it – Fabio Dalla Libera Jul 02 '20 at 01:35
0

$$ \displaystyle q_i = \frac{e_i \times u}{e_i^T u} + P_i v \tag{1}$$

$(1)$ Expanded produces:

$$-{\it e_{11}}\,{\it e_{13}}\,{\it v_3}-{\it e_{11}}\,{\it e_{12}}\, {\it v_2}+\left(1-{\it e_{11}}^2\right)\,{\it v_1}+{{{\it e_{12}}\, {\it u_3}-{\it e_{13}}\,{\it u_2}}\over{{\it e_{13}}\,{\it u_3}+ {\it e_{12}}\,{\it u_2}+{\it e_{11}}\,{\it u_1}}}-{\it q_{11}}$$

$$-{\it e_{12}}\,{\it e_{13}}\,{\it v_3}+\left(1-{\it e_{12}}^2 \right)\,{\it v_2}-{\it e_{11}}\,{\it e_{12}}\,{\it v_1}+{{ {\it e_{13}}\,{\it u_1}-{\it e_{11}}\,{\it u_3}}\over{{\it e_{13}}\, {\it u_3}+{\it e_{12}}\,{\it u_2}+{\it e_{11}}\,{\it u_1}}}- {\it q_{12}}$$

$$\left(1-{\it e_{13}}^2\right)\,{\it v_3}-{\it e_{12}}\,{\it e_{13}} \,{\it v_2}-{\it e_{11}}\,{\it e_{13}}\,{\it v_1}+{{{\it e_{11}}\, {\it u_2}-{\it e_{12}}\,{\it u_1}}\over{{\it e_{13}}\,{\it u_3}+ {\it e_{12}}\,{\it u_2}+{\it e_{11}}\,{\it u_1}}}-{\it q_{13}}$$

$$-{\it e_{21}}\,{\it e_{23}}\,{\it v_3}-{\it e_{21}}\,{\it e_{22}}\, {\it v_2}+\left(1-{\it e_{21}}^2\right)\,{\it v_1}+{{{\it e_{22}}\, {\it u_3}-{\it e_{23}}\,{\it u_2}}\over{{\it e_{23}}\,{\it u_3}+ {\it e_{22}}\,{\it u_2}+{\it e_{21}}\,{\it u_1}}}-{\it q_{21}}$$

$$-{\it e_{22}}\,{\it e_{23}}\,{\it v_3}+\left(1-{\it e_{22}}^2 \right)\,{\it v_2}-{\it e_{21}}\,{\it e_{22}}\,{\it v_1}+{{ {\it e_{23}}\,{\it u_1}-{\it e_{21}}\,{\it u_3}}\over{{\it e_{23}}\, {\it u_3}+{\it e_{22}}\,{\it u_2}+{\it e_{21}}\,{\it u_1}}}- {\it q_{22}}$$

$$\left(1-{\it e_{23}}^2\right)\,{\it v_3}-{\it e_{22}}\,{\it e_{23}} \,{\it v_2}-{\it e_{21}}\,{\it e_{23}}\,{\it v_1}+{{{\it e_{21}}\, {\it u_2}-{\it e_{22}}\,{\it u_1}}\over{{\it e_{23}}\,{\it u_3}+ {\it e_{22}}\,{\it u_2}+{\it e_{21}}\,{\it u_1}}}-{\it q_{23}}$$

$$-{\it e_{31}}\,{\it e_{33}}\,{\it v_3}-{\it e_{31}}\,{\it e_{32}}\, {\it v_2}+\left(1-{\it e_{31}}^2\right)\,{\it v_1}+{{{\it e_{32}}\, {\it u_3}-{\it e_{33}}\,{\it u_2}}\over{{\it e_{33}}\,{\it u_3}+ {\it e_{32}}\,{\it u_2}+{\it e_{31}}\,{\it u_1}}}-{\it q_{31}}$$

$$-{\it e_{32}}\,{\it e_{33}}\,{\it v_3}+\left(1-{\it e_{32}}^2 \right)\,{\it v_2}-{\it e_{31}}\,{\it e_{32}}\,{\it v_1}+{{ {\it e_{33}}\,{\it u_1}-{\it e_{31}}\,{\it u_3}}\over{{\it e_{33}}\, {\it u_3}+{\it e_{32}}\,{\it u_2}+{\it e_{31}}\,{\it u_1}}}- {\it q_{32}}$$

$$\left(1-{\it e_{33}}^2\right)\,{\it v_3}-{\it e_{32}}\,{\it e_{33}} \,{\it v_2}-{\it e_{31}}\,{\it e_{33}}\,{\it v_1}+{{{\it e_{31}}\, {\it u_2}-{\it e_{32}}\,{\it u_1}}\over{{\it e_{33}}\,{\it u_3}+ {\it e_{32}}\,{\it u_2}+{\it e_{31}}\,{\it u_1}}}-{\it q_{33}}$$

Note that these equations are linear in $v = [v_1,v_2,v_3]^T$

Degenerate equations will occur.

The solvability of $v_k$ depends on the rank of the matrix of the coefficients of $v_k$ variables.

Reducing all $v_k$ out of the equations will leave equations in $u$.

$u \cdot v = 0$ can now be added to the equations.

Since there are three divisors $e_i \cdot u$ multiplying the numerators with these divisors will result in cubic equations in $u_k$ with mixed terms e.g. $u_i u_j u_k$.

The problem reduces to solving a system of cubic equations in three variables $u_1,u_2,u_3$.

There does not seem to be a way to find these equations without knowledge of $e_i$.

  • I tried with the base e1=(0,-1/2,sqrt(3)/2), e2=(sqrt(3)/4,1/4,(sqrt(3)/2), e3=(-sqrt(3)/4, 1/4, sqrt(3)/2) but sympy does not return – Fabio Dalla Libera Jul 02 '20 at 07:13
  • I tried maxima with two cubics and it locked up. $solve([ax^3 + bx^2y + cy^3 - 1, dx^3 + exy^2 + fy^3 - 1],[x,y]);$ –  Jul 02 '20 at 07:58
0

Example: $e_1=(0,-\frac1{2},\frac{\sqrt{3}}{2}), \: e_2=(\frac{\sqrt{3}}{4},\frac1{4},\frac{\sqrt{3}}{2}), \: e_3=(-\frac{\sqrt{3}}{4}, \frac1{4}, \frac{\sqrt{3}}{2})$

Maxima:

load("vect");
cross(u, v) := matrix(u[2] * v[3] - v[2] * u[3], v[1] * u[3] - u[1] * v[3],u[1] * v[2] - v[1] * u[2]);
dot(u, v) := u[1] * v[1] + u[2] * v[2] + u[3] * v[3];

u : matrix ([u1] , [u2], [u3]); v : matrix ([v1] , [v2], [v3]);

q1 : matrix ([q11] , [q12], [q13]); e1 : matrix ([0] , [-1/2], [sqrt(3)/2]); P1 : matrix([1,0,0],[0,1,0],[0,0,1]) - e1 . transpose(e1); E1 : cross(e1,u)/(transpose(e1) . u ) + P1 . v - q1 ;

q2 : matrix ([q21] , [q22], [q23]); e2 : matrix ([sqrt(3)/4] , [1/4], [sqrt(3)/2]); P2 : matrix([1,0,0],[0,1,0],[0,0,1]) - e2 . transpose(e2); E2 : cross(e2,u)/(transpose(e2) . u) + P2 . v - q2 ;

q3 : matrix ([q31] , [q32], [q33]); e3 : matrix ([-sqrt(3)/4] , [1/4], [sqrt(3)/2]); P3 : matrix([1,0,0],[0,1,0],[0,0,1]) - e3 . transpose(e3); E3 : cross(e3,u)/(transpose(e3) . u ) + P3 . v - q3 ;

A1 : augcoefmatrix(E1[1],[v1,v2,v3]); A2 : augcoefmatrix(E1[2],[v1,v2,v3]); A3 : augcoefmatrix(E1[3],[v1,v2,v3]); A4 : augcoefmatrix(E2[1],[v1,v2,v3]); A5 : augcoefmatrix(E2[2],[v1,v2,v3]); A6 : augcoefmatrix(E2[3],[v1,v2,v3]); A7 : augcoefmatrix(E3[1],[v1,v2,v3]); A8 : augcoefmatrix(E3[2],[v1,v2,v3]); A9 : augcoefmatrix(E3[3],[v1,v2,v3]);

A : matrix(A1[1],A2[1],A3[1],A4[1],A5[1],A6[1],A7[1],A8[1],A9[1]);

AA : A;

for k:1 thru 9 do AA[k][4] : ratsimp(AA[k][4]);

BB : copy(AA);

S1 : copy(BB[1][4]); S2 : copy(BB[2][4]); S3 : copy(BB[3][4]); S4 : copy(BB[4][4]); S5 : copy(BB[5][4]); S6 : copy(BB[6][4]); S7 : copy(BB[7][4]); S8 : copy(BB[8][4]); S9 : copy(BB[9][4]);

BB[1][4] : R1; BB[2][4] : R2; BB[3][4] : R3; BB[4][4] : R4; BB[5][4] : R5; BB[6][4] : R6; BB[7][4] : R7; BB[8][4] : R8; BB[9][4] : R9;

for k:2 thru 9 do AA : rowop(AA,k,1,AA[k][1]);

for k:2 thru 9 do AA[k] : AA[k]/AA[k][2];

for k:3 thru 9 do AA : rowop(AA,k,2,1);

for k:4 thru 9 do AA[k] : AA[k]/AA[k][3];

for k:5 thru 9 do AA : rowop(AA,k,4,1);

AA : rowop(AA,2,4,AA[2][3]);

for k:1 thru 9 do AA[k][4] : ratsimp(AA[k][4]);

AA : rowswap(AA,3,4);

for k:2 thru 9 do BB : rowop(BB,k,1,BB[k][1]);

for k:2 thru 9 do BB[k] : BB[k]/BB[k][2];

for k:3 thru 9 do BB : rowop(BB,k,2,1);

for k:4 thru 9 do BB[k] : BB[k]/BB[k][3];

for k:5 thru 9 do BB : rowop(BB,k,4,1);

BB : rowop(BB,2,4,BB[2][3]);

for k:1 thru 9 do BB[k][4] : ratsimp(BB[k][4]);

BB : rowswap(BB,3,4);

$$\displaystyle q_i = \frac{e_i \times u}{e_i^T u} + P_i v \tag{1} $$

Matrix form of $(1)$

$$AA = \pmatrix{1&0&0&-{{\left(\sqrt{3}\,{\it q_{11}}+1\right)\,{\it u_3}+ \left(\sqrt{3}-{\it q_{11}}\right)\,{\it u_2}}\over{\sqrt{3}\, {\it u_3}-{\it u_2}}}\cr 0&{{3}\over{4}}&{{\sqrt{3}}\over{4}}&-{{ \sqrt{3}\,{\it q_{12}}\,{\it u_3}-{\it q_{12}}\,{\it u_2}-\sqrt{3}\, {\it u_1}}\over{\sqrt{3}\,{\it u_3}-{\it u_2}}}\cr 0&{{\sqrt{3} }\over{4}}&{{1}\over{4}}&-{{\sqrt{3}\,{\it q_{13}}\,{\it u_3}- {\it q_{13}}\,{\it u_2}-{\it u_1}}\over{\sqrt{3}\,{\it u_3}- {\it u_2}}}\cr {{13}\over{16}}&-{{\sqrt{3}}\over{16}}&-{{3}\over{8}} &-{{\left(2\,\sqrt{3}\,{\it q_{21}}-1\right)\,{\it u_3}+\left( {\it q_{21}}+2\,\sqrt{3}\right)\,{\it u_2}+\sqrt{3}\,{\it q_{21}}\, {\it u_1}}\over{2\,\sqrt{3}\,{\it u_3}+{\it u_2}+\sqrt{3}\,{\it u_1} }}\cr -{{\sqrt{3}}\over{16}}&{{15}\over{16}}&-{{\sqrt{3}}\over{8}}&- {{\left(2\,\sqrt{3}\,{\it q_{22}}+\sqrt{3}\right)\,{\it u_3}+ {\it q_{22}}\,{\it u_2}+\left(\sqrt{3}\,{\it q_{22}}-2\,\sqrt{3} \right)\,{\it u_1}}\over{2\,\sqrt{3}\,{\it u_3}+{\it u_2}+\sqrt{3}\, {\it u_1}}}\cr -{{3}\over{8}}&-{{\sqrt{3}}\over{8}}&{{1}\over{4}}&- {{2\,\sqrt{3}\,{\it q_{23}}\,{\it u_3}+\left({\it q_{23}}-\sqrt{3} \right)\,{\it u_2}+\left(\sqrt{3}\,{\it q_{23}}+1\right)\,{\it u_1} }\over{2\,\sqrt{3}\,{\it u_3}+{\it u_2}+\sqrt{3}\,{\it u_1}}}\cr {{ 13}\over{16}}&{{\sqrt{3}}\over{16}}&{{3}\over{8}}&-{{\left(2\,\sqrt{ 3}\,{\it q_{31}}-1\right)\,{\it u_3}+\left({\it q_{31}}+2\,\sqrt{3} \right)\,{\it u_2}-\sqrt{3}\,{\it q_{31}}\,{\it u_1}}\over{2\,\sqrt{ 3}\,{\it u_3}+{\it u_2}-\sqrt{3}\,{\it u_1}}}\cr {{\sqrt{3}}\over{16 }}&{{15}\over{16}}&-{{\sqrt{3}}\over{8}}&-{{\left(2\,\sqrt{3}\, {\it q_{32}}-\sqrt{3}\right)\,{\it u_3}+{\it q_{32}}\,{\it u_2}+ \left(-\sqrt{3}\,{\it q_{32}}-2\,\sqrt{3}\right)\,{\it u_1}}\over{2 \,\sqrt{3}\,{\it u_3}+{\it u_2}-\sqrt{3}\,{\it u_1}}}\cr {{3}\over{8 }}&-{{\sqrt{3}}\over{8}}&{{1}\over{4}}&-{{2\,\sqrt{3}\,{\it q_{33}} \,{\it u_3}+\left({\it q_{33}}+\sqrt{3}\right)\,{\it u_2}+\left(1- \sqrt{3}\,{\it q_{33}}\right)\,{\it u_1}}\over{2\,\sqrt{3}\, {\it u_3}+{\it u_2}-\sqrt{3}\,{\it u_1}}}\cr } \tag{2}$$

More readable:

$$BB = \pmatrix{1&0&0&{\it R_1}\cr 0&{{3}\over{4}}&{{\sqrt{3}}\over{4}}& {\it R_2}\cr 0&{{\sqrt{3}}\over{4}}&{{1}\over{4}}&{\it R_3}\cr {{13 }\over{16}}&-{{\sqrt{3}}\over{16}}&-{{3}\over{8}}&{\it R_4}\cr -{{ \sqrt{3}}\over{16}}&{{15}\over{16}}&-{{\sqrt{3}}\over{8}}&{\it R_5} \cr -{{3}\over{8}}&-{{\sqrt{3}}\over{8}}&{{1}\over{4}}&{\it R_6}\cr {{13}\over{16}}&{{\sqrt{3}}\over{16}}&{{3}\over{8}}&{\it R_7}\cr {{ \sqrt{3}}\over{16}}&{{15}\over{16}}&-{{\sqrt{3}}\over{8}}&{\it R_8} \cr {{3}\over{8}}&-{{\sqrt{3}}\over{8}}&{{1}\over{4}}&{\it R_9}\cr } \tag{3}$$

Reduced row echelon form:

$$BB = \pmatrix{1&0&0&{\it R_1}\cr 0&1&0&{{16\,{\it R_4}+8\,\sqrt{3}\, {\it R_2}-13\,{\it R_1}}\over{5\,\sqrt{3}}}\cr 0&0&1&-{{16\,\sqrt{3} \,{\it R_4}+4\,{\it R_2}-13\,\sqrt{3}\,{\it R_1}}\over{5\,\sqrt{3}}} \cr 0&0&0&{{12\,{\it R_3}-4\,\sqrt{3}\,{\it R_2}}\over{3^{{{3}\over{ 2}}}}}\cr 0&0&0&-{{80\,{\it R_5}-112\,\sqrt{3}\,{\it R_4}-128\, {\it R_2}+32\,3^{{{3}\over{2}}}\,{\it R_1}}\over{35\,\sqrt{3}}}\cr 0 &0&0&{{40\,\sqrt{3}\,{\it R_6}+16\,3^{{{3}\over{2}}}\,{\it R_4}+32\, {\it R_2}-8\,3^{{{3}\over{2}}}\,{\it R_1}}\over{5\,3^{{{3}\over{2}}} }}\cr 0&0&0&{{16\,{\it R_7}+16\,{\it R_4}-26\,{\it R_1}}\over{5}} \cr 0&0&0&-{{80\,{\it R_8}-112\,\sqrt{3}\,{\it R_4}-128\,{\it R_2}+ 86\,\sqrt{3}\,{\it R_1}}\over{35\,\sqrt{3}}}\cr 0&0&0&{{40\,\sqrt{3} \,{\it R_9}+16\,3^{{{3}\over{2}}}\,{\it R_4}+32\,{\it R_2}-2\,3^{{{7 }\over{2}}}\,{\it R_1}}\over{5\,3^{{{3}\over{2}}}}}\cr } \tag{4}$$

The first three rows solve for $v_1,v_2,v_3$.

These can be substituted into $u \cdot v = 0$

Rows four to nine are equations entirely in $u$.

Since there are only three denominator expressions in $R$ then multiplying the equations by them will result in cubic equations in $u$.