6 unknowns 6 equations PLS HELP ME!!

Hello, i have a term project but i cant do this project. Please help me. I must found l2 l3 m1 m3 n1 and n2 and i have to create 3x3 matrix with l1, m2,n3. This code give me too many solutions. Just for l2 is like 10 solutions.
syms l2 l3 m1 m3 n1 n2;
l1= 1/2;
m2= 1/2;
n3=1;
eq1=((l1)^2)+((m1)^2)+((n1)^2) == 1;
eq2=((l2)^2)+((m2)^2)+((n2)^2) == 1;
eq3=((l3)^2)+((m3)^2)+((n3)^2) == 1;
eq4=(l1*l2)+(m1*m2)+(n1*n2) == 0;
eq5=(l1*l3)+(m1*m3)+(m1*n3) == 0;
eq6=(l2*l3)+(m2*m3)+(n2*n3) == 0;
eqns = [ eq1, eq2, eq3, eq4, eq5, eq6];
vars = [l2 l3 m1 m3 n1 n2];
[l2, l3, m1, m3, n1, n2] = vpasolve(eqns, vars);
A=[l1 m1 n1; l2 m2 n2; l3 m3 n3];
disp('Transformation Matrix=')
disp(A)

2 Comments

What you have are really six equations and nine unknowns, not six. If l1,m1,n1 are regarded as x,y,z coordinates of a vector, and similarly with l2,m2,n2 and l3,m3,n3, then your equations amount to the requirement that these three vectors are each of unit length and are mutually orthogonal. That leaves you with three degrees of freedom in choosing these vectors, so of course there are many possible solutions, namely an entire infinity of them. What else would you expect as a reault?
However, l1, m2, and n3 are given specific numeric values, taking you back to 6 unknowns.

Sign in to comment.

 Accepted Answer

The results you get are correct. Your equations are non-linear, so the solution involves the roots of the degree 8 polynomial 272*Z^8 - 160*Z^7 + 88*Z^6 - 360*Z^5 + 249*Z^4 + 72*Z^3 - 90*Z^2 + 9 = 0 . In the special case of polynomials, vpasolve() is defined to return all of the solutions.
All of the roots of that polynomial are complex. All roots of the system as a whole are complex: there are no real solutions for any of the variables. None of them can be said to be any "better" than the others to pick out just one.

1 Comment

As Roger explained, if all nine of those variables were free, you would have 3 degrees of freedom. However, three of your variables are fixed, so you have no degrees of freedom on that basis.
However, because of the ^2, you lose some sensitivity to sign of the values: (-x)^2 = x^2 . You do have terms such as (l1*l2) that are sensitive to sign, but remember that ((-l1)*(-l2)) = (l1*l2), so the sign is not nailed down absolutely by any one of those terms: those individual terms can just force the signs of the variables to follow in pairs. Furthermore, if (l1*l2)+(m1*m2)+(n1*n2) == 0 then (-(l1*l2))+(-(m1*m2))+(-(n1*n2)) == 0 so if all 3 terms change sign then the equation remains the same.
With multiple sign combinations possible, you end up with multiple solutions.

Sign in to comment.

More Answers (1)

yigit baser
yigit baser on 28 Oct 2017
thank you all of u guys. Last Friday (yesterday), my teacher gave me a l2 so i know l1 l2 m2 n3 now. It is easier to find exactly correct answers. Thanks for your comments.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!