MATLAB: Why matlab is unable to solve these set of equations

how to solveSymbolic Math Toolbox

syms X_1 X_2 X_3 X_4 Y_1 Y_2 Y_3 Y_4 a_1 a_2 a_3 a_4 a_5 a_6 a_7 a_8 a_9 b_1 b_2 b_3 b_4 b_5 b_6 b_7 b_8 b_9 c_1 c_2 c_3 c_4 c_5 c_6 c_7 c_8 c_9 d_1 d_2 d_3 d_4 d_5 d_6 d_7 d_8 d_9 e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9
%
first=a_1*X_1+a_2*X_2+a_3*X_3+a_4*X_4+a_5*Y_1+a_6*Y_2+a_7*Y_3+a_8*Y_4;
second=b_1*X_1+b_2*X_2+b_3*X_3+b_4*X_4+b_5*Y_1+b_6*Y_2+b_7*Y_3+b_8*Y_4+b_9;
third=c_1*X_3+c_2*X_4+c_3*Y_3+c_4*Y_4+c_5;
fourth=d_1*X_1+d_2*X_2+d_3*X_3+d_4*X_4+d_5*Y_1+d_6*Y_2+d_7*Y_3+d_8*Y_4+d_9;
fifth=e_1*X_3+e_2*X_4+e_3*Y_3+e_4*Y_4+e_5;
sixth=X_1*Y_2-X_2*Y_1;
seventh=X_3*Y_4-Y_3*X_4;
eighth=X_2*Y_3-X_3*Y_2;
%
S = solve([first,second,third,fourth,fifth,sixth,seventh,eighth], [X_1,Y_1,X_2,Y_2,X_3,Y_3,X_4,Y_4])

Best Answer

My suggestion would be to help out Matlab's 'solve' a little by the way the problem is approached. The sixth, seventh, and eighth equations can be written
y1/x1 = y2/x2 = y3/x3 = y4/x4 = t
Then in the second, third, fourth, and fifth equations we can replace all y's by x's and t. If we regard t as temporarily known, these become a set of four linear equations which can be readily solved for the x's in terms of the b, c, d, and e constants and t. Finally substitute these x expressions into the first equation to get a single equation in terms of the single unknown t. If properly simplified this should be expressible as a quartic polynomial equation in t which 'solve' should be able to handle. With each of the four solutions, the corresponding x and y values can then be readily derived.