I have a system of 6 equations with 6 variables. The 6 variables are $t11, t12, t13, t21, t22, t23$ and the rest of the symbols in the equations are known symbols. I want to find all the possible analytical solutions of the 6 variables $t11, t12, t13, t21, t22, t23$ as expressions of the known symbols. Here are the 6 equations (I wrote them in Matlab):
eq1 = pz1^2 + 2*pz1*t11*vz1 + t11^2*vx1^2 + t11^2*vy1^2 + t11^2*vz1^2 == qz1^2 + 2*qz1*t21*uz1 + t21^2*ux1^2 + t21^2*uy1^2 + t21^2*uz1^2
eq2 = pz2^2 + 2*pz2*t12*vz2 + t12^2*vx2^2 + t12^2*vy2^2 + t12^2*vz2^2 == qz2^2 + 2*qz2*t22*uz2 + t22^2*ux2^2 + t22^2*uy2^2 + t22^2*uz2^2
eq3 = pz3^2 + 2*pz3*t13*vz3 + t13^2*vx3^2 + t13^2*vy3^2 + t13^2*vz3^2 == qz3^2 + 2*qz3*t23*uz3 + t23^2*ux3^2 + t23^2*uy3^2 + t23^2*uz3^2
eq4 = pz1*pz2 + pz2*t11*vz1 + pz1*t12*vz2 + t11*t12*vx1*vx2 + t11*t12*vy1*vy2 + t11*t12*vz1*vz2 == qz1*qz2 + qz2*t21*uz1 + qz1*t22*uz2 + t21*t22*ux1*ux2 + t21*t22*uy1*uy2 + t21*t22*uz1*uz2
eq5 = pz2*pz3 + pz3*t12*vz2 + pz2*t13*vz3 + t12*t13*vx2*vx3 + t12*t13*vy2*vy3 + t12*t13*vz2*vz3 == qz2*qz3 + qz3*t22*uz2 + qz2*t23*uz3 + t22*t23*ux2*ux3 + t22*t23*uy2*uy3 + t22*t23*uz2*uz3
eq6 = pz1*pz3 + pz3*t11*vz1 + pz1*t13*vz3 + t11*t13*vx1*vx3 + t11*t13*vy1*vy3 + t11*t13*vz1*vz3 == qz1*qz3 + qz3*t21*uz1 + qz1*t23*uz3 + t21*t23*ux1*ux3 + t21*t23*uy1*uy3 + t21*t23*uz1*uz3
Notice that each equation is of the form: $eq_i=left\_expression==right\_expression$
The equations are for sure correct (I checked them with known values and known solutions for $t11, t12, t13, t21, t22, t23$ and I indeed got equality of the left and right expressions in each equation).
But I need to get all the possible solutions for the general case.
When I tried to solve the equations using Matlab 'solve' command, it didn't finish the run (I waited for more than an hour).
Can anyone suggest other ways of solving the equations?
The equations look solvable since they are all second degree polynomial equations (of 6 variables).
Any chance that anyone here can try to solve the equations using 'Mathematica' or 'Maple' programs (since I don't have them). Or at least tell me if they are solvable in these programs and if so, I will buy the programs (the university will..).
Here is the full code in matlab so you can see how I built the equations (if anyone here is able to translate the code to Mathematica/Maple and check if the the equations are solvable there)
clear;
close all;
clc;
%The folowing 6 symbols are the UNKNOWN variables
syms t11 t12 t13 %parameters of the 3 lines of the first set
syms t21 t22 t23 %parameters of the 3 lines of the second set
%The folowing symbols are the KNOWN variables
syms px1 py1 pz1
syms px2 py2 pz2
syms px3 py3 pz3
syms vx1 vy1 vz1
syms vx2 vy2 vz2
syms vx3 vy3 vz3
syms qx1 qy1 qz1
syms qx2 qy2 qz2
syms qx3 qy3 qz3
syms ux1 uy1 uz1
syms ux2 uy2 uz2
syms ux3 uy3 uz3
%Trying to make the equations simpler, I assume all 6 lines pass through
%a point on the Z axis (but I prefer the general case)
lines1_points = [0 0 0 ; 0 0 0 ; pz1 pz2 pz3];
%lines1_points = [px1 px2 px3 ; py1 py2 py3 ; pz1 pz2 pz3];
lines1_vecs = [vx1 vx2 vx3 ; vy1 vy2 vy3 ; vz1 vz2 vz3];
lines2_points = [0 0 0 ; 0 0 0 ; qz1 qz2 qz3];
%lines2_points = [qx1 qx2 qx3 ; qy1 qy2 qy3 ; qz1 qz2 qz3];
lines2_vecs = [ux1 ux2 ux3 ; uy1 uy2 uy3 ; uz1 uz2 uz3];
vars1 = diag([t11 t12 t13]);
vars2 = diag([t21 t22 t23]);
T1 = lines1_points+lines1_vecs*vars1;
T2 = lines2_points+lines2_vecs*vars2;
T1_transpose = T1.';
T2_transpose = T2.';
part1 = T1_transpose*T1;
part2 = T2_transpose*T2;
eqs_symmetric_matrix = part1==part2;
expanded_eqs_symmetric_matrix = expand(eqs_symmetric_matrix);
%6 equations of the top upper matrix (first 3 equations are the diagonal)
eq1 = expanded_eqs_symmetric_matrix(1,1)
eq2 = expanded_eqs_symmetric_matrix(2,2)
eq3 = expanded_eqs_symmetric_matrix(3,3)
eq4 = expanded_eqs_symmetric_matrix(1,2)
eq5 = expanded_eqs_symmetric_matrix(2,3)
eq6 = expanded_eqs_symmetric_matrix(1,3)
eqs = [eq1; eq2; eq3; eq4; eq5; eq6];
fprintf('Trying to solve the equations (matlab does not succeed to solve the equations)\n');
[t11_sol,t12_sol,t13_sol,t21_sol,t22_sol,t23_sol] = solve(eqs,[t11,t12,t13,t21,t22,t23]);
fprintf('Finished solving the equations\n');
I will appreciate any help!
Thanks
Update: Using the assumption that all the lines pass through the same point [0 0 z] and using the fact that all the directional vectors of the lines are unit. The new 6 equations are now:
eq1 = t11^2 + z^2 + 2*t11*z*(- vx1^2 - vy1^2 + 1)^(1/2) == t21^2 + z^2 + 2*t21*z*(- ux1^2 - uy1^2 + 1)^(1/2)
eq2 = t12^2 + z^2 + 2*t12*z*(- vx2^2 - vy2^2 + 1)^(1/2) == t22^2 + z^2 + 2*t22*z*(- ux2^2 - uy2^2 + 1)^(1/2)
eq3 = t13^2 + z^2 + 2*t13*z*(- vx3^2 - vy3^2 + 1)^(1/2) == t23^2 + z^2 + 2*t23*z*(- ux3^2 - uy3^2 + 1)^(1/2)
eq4 = z^2 + t11*z*(- vx1^2 - vy1^2 + 1)^(1/2) + t12*z*(- vx2^2 - vy2^2 + 1)^(1/2) + t11*t12*vx1*vx2 + t11*t12*vy1*vy2 + t11*t12*(- vx1^2 - vy1^2 + 1)^(1/2)*(- vx2^2 - vy2^2 + 1)^(1/2) == z^2 + t21*z*(- ux1^2 - uy1^2 + 1)^(1/2) + t22*z*(- ux2^2 - uy2^2 + 1)^(1/2) + t21*t22*ux1*ux2 + t21*t22*uy1*uy2 + t21*t22*(- ux1^2 - uy1^2 + 1)^(1/2)*(- ux2^2 - uy2^2 + 1)^(1/2)
eq5 = z^2 + t12*z*(- vx2^2 - vy2^2 + 1)^(1/2) + t13*z*(- vx3^2 - vy3^2 + 1)^(1/2) + t12*t13*vx2*vx3 + t12*t13*vy2*vy3 + t12*t13*(- vx2^2 - vy2^2 + 1)^(1/2)*(- vx3^2 - vy3^2 + 1)^(1/2) == z^2 + t22*z*(- ux2^2 - uy2^2 + 1)^(1/2) + t23*z*(- ux3^2 - uy3^2 + 1)^(1/2) + t22*t23*ux2*ux3 + t22*t23*uy2*uy3 + t22*t23*(- ux2^2 - uy2^2 + 1)^(1/2)*(- ux3^2 - uy3^2 + 1)^(1/2)
eq6 = z^2 + t11*z*(- vx1^2 - vy1^2 + 1)^(1/2) + t13*z*(- vx3^2 - vy3^2 + 1)^(1/2) + t11*t13*vx1*vx3 + t11*t13*vy1*vy3 + t11*t13*(- vx1^2 - vy1^2 + 1)^(1/2)*(- vx3^2 - vy3^2 + 1)^(1/2) == z^2 + t21*z*(- ux1^2 - uy1^2 + 1)^(1/2) + t23*z*(- ux3^2 - uy3^2 + 1)^(1/2) + t21*t23*ux1*ux3 + t21*t23*uy1*uy3 + t21*t23*(- ux1^2 - uy1^2 + 1)^(1/2)*(- ux3^2 - uy3^2 + 1)^(1/2)

In Maple syntax these equations would be:
However, given that this system solves a very general geometric problem, I would not expect it to have a compact solution. Indeed, my attempts at getting a Groebner basis in the most efficient way possible in Maple 2017 consumes all of my available system memory almost instantly, and then fails.
This is pretty good evidence that the closed form solution to this system is probably too large to be useful.
You'll probably need to consider a different approach to this problem.