How to find solutions for a determinat with 4 variables equal to zero
Show older comments
I have a matrix 3x3 with 4 variables.I want to find for which values of these variables the determinant is equal to zero.
The matrix and code is here:
q1=sym('q1');
q2=sym('q2');
q3=sym('q3');
q4=sym('q4');
l1 = 250;
l2 = 220;
l3 = 160;
lE = 214.6;
Jac=[-sin(q1)*(l3*cos(q2+q3)+l2*cos(q2)+lE*sin(q2+q3+q4)) -cos(q1)*(l2*sin(q2)+l3*sin(q2+q3)-lE*cos(q2+q3+q4)) -cos(q1)*(l3*sin(q2+q3)-lE*cos(q2+q3+q4));cos(q1)*(l3*cos(q2+q3)+l2*cos(q2)+lE*sin(q2+q3+q4)) -sin(q1)*(l3*sin(q2+q3)+l2*sin(q2)+lE*cos(q2+q3+q4)) -sin(q1)*(l3*sin(q2+q3)+lE*cos(q2+q3+q4));0 l3*cos(q2+q3)+l2*cos(q2)+lE*sin(q2+q3+q4) l3*cos(q2+q3)+lE*sin(q2+q3+q4)]
I know that the solution may be q3=0 ^ q4=pi/2.
If i do
solve(Jac==0)
i have not the desirable solution.
4 Comments
John D'Errico
on 10 May 2016
Please don't make repeated posts of the same question.
Walter Roberson
on 10 May 2016
This is not the same as http://www.mathworks.com/matlabcentral/answers/283584-how-to-find-the-values-of-variables-that-a-matrice-6x5-looses-rank -- this one involves the determinant of a 3 x 3 matrix and the other one involves a 6 x 5 matrix. They are, though, related.
John D'Errico
on 10 May 2016
Edited: John D'Errico
on 10 May 2016
Virtually identical. The constants are the same, as well as many of the terms in the equations themselves. Knowing how to find the solution to one would show how to solve the other.
Pyrros Tsopanakis
on 11 May 2016
Answers (1)
Walter Roberson
on 10 May 2016
"With difficulty" ?
The degenerate solutions include:
q2 = 0, q4 = -q3-arcsin(1100/1073+(800/1073)*cos(q3))
q3 = 0, q2 = -arctan((1/1073)*(1900+1073*sin(q4))/cos(q4))
q3 = 0, q4 = -q2-arcsin((1900/1073)*cos(q2))
q4 = 0, q2 = -arctan((1100+800*cos(q3)+1073*sin(q3)) / (-800*sin(q3)+1073*cos(q3)))
q4 = 0, q3 = arctan(-(1180300/1791329)*cos(q2)+(800/1791329)*sqrt(-1210000*cos(q2)^2+1791329), -(880000/1791329)*cos(q2)-(1073/1791329)*sqrt(-1210000*cos(q2)^2+1791329))-q2
q4 = 0, q3 = arctan(-(1180300/1791329)*cos(q2)-(800/1791329)*sqrt(-1210000*cos(q2)^2+1791329), -(880000/1791329)*cos(q2)+(1073/1791329)*sqrt(-1210000*cos(q2)^2+1791329))-q2
q2 = pi/2, q3 = arctan(1073*cos(q4)/(1073*sin(q4)+800))
q2 = pi/2, q4 = -q3+arccos((800/1073)*sin(q3))
q3 = pi/2, q2 = arctan((1100+1073*cos(q4))/(1073*sin(q4)+800))
q4 = pi/2, q2 = arctan((1/1873)*(1100+1873*cos(q3))/sin(q3))
q4 = pi/2, q3 = -q2+Pi-arccos((1100/1873)*cos(q2))
q1 = 0, q3 = 0, q4 = Pi/2
q2 = 0, q3 = 0, q4 = Pi/2
q2 = Pi, q3 = 0, q4 = Pi/2
... and possibly other degenerate solutions.
I say "degenerate" here in the sense that these are solutions regardless of the (finite) values of any variable not mentioned in the list: solutions that do not depend upon all 4 variables.
There are a number of other solutions involving all 4 variables. For example,
q1 = 0, q2 = -arctan((1073*sin(q3)*cos(q4)+1073*cos(q3)*sin(q4)+800*cos(q3)+1100) / (1073*cos(q3)*cos(q4)-1073*sin(q3)*sin(q4)-800*sin(q3)))
I did not do anything special here: I just went through a series of cases. Finding the complete set of solutions takes a bunch of computing time and more memory than I have on my system.
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!