Finding value of unknown variable in determinant matrix, where matrix is kept equal to zero
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear, Please check the attach file for reference. Inside 3x3 matrix, I know all the value of variable except "b" which is unknown variable. The matrix is in form of determinant. I tried with sym b and Solve det ()==0 command, but this is not a correct way. I need b should be in form of vector not single variable. As far I know it can be solved using eig() command, but I do not know how? If any once can help me in this regard.
Thanks in advance
4 Kommentare
Ameer Hamza
am 12 Jun. 2018
I am not sure how to use eig() to solve this type of problem. eig solve the following problem
A*x = lambda*x
for values of x and lambda. If you can show how to mathematically convert your problem to this form then we can suggest a solution.
John D'Errico
am 12 Jun. 2018
eig does not really apply here, although you COULD use eig to solve the problem in a very unnecessary way. That is, you could expand the det into a polynomial in b. The picture shown is a 3x3, where the polynomial in b will be a 4th order polynomial in b. 4th order, because there are elements with b^2 in them. Of course, we are also told the matrix is 6x6, so there is some confusion spread around.
Once you compute the polynomial in b, then roots would apply, IF the coefficients are fully known.
How does roots work? Well, there are many ways to compute all of the roots of a polynomial. I recall algorithms by Jenkins & Traub, etc. But one reasonable way to do things is to convert the polynomial coefficients into a companion matrix, such that the matrix has the same eigenvalues as the polynomial has roots. Then you would call eig. But that is silly to write, since code is already written and provided in MATLAB, in the form of the function roots! Don't recreate the wheel. Use existing, professionally written code to do your job for you.
Unless of course, this is homework.
Antworten (1)
John D'Errico
am 12 Jun. 2018
The .jpg you show is a 3x3 matrix, NOT a 6x6 matrix. So there are obvious points of confusion in what you say. But in any case, it is trivial to expand the determinant, for a symbolic 6x6 matrix or a 3x3. The symbolic toolbox can do that, where only b is unknown. The result will be a polynomial in b. I cannot know the order of the polynomial, since we are not told what the matrix truly is. Is it 3x3, or some unknown 6x6 matrix? For the 3x3 matrix shown, it looks like it will be a 4th degree polynomial, a quartic.
So there will be 4 values of b that will yield zero for the determinant.
The question is, are all of those other parameters known values? Do you have actual numbers for those parameters? Or are they intended to be left as unknown values? This is important, since if your real problem is actually a 6x6 matrix, AND if the polynomial in b is of higher degree than 4, then there will be no solution that will be findable.
The point is, one can use tools like roots or solve to compute all of the roots of a polynomial with constant, known coefficients. However, it is a well known theorem ( Abel-Ruffini ) that tells us there is no algebraic solution for a polynomial of degree 5 or greater that has non-constant, variable coefficients.
And since you have been inconsistent in telling us the real matrix, we cannot know what degree the polynomial will be.
So the answer is trivial in theory: expand that determinant into a polynomial in b. Then compute the roots. And depending on if the coefficients of the polynomial are arbitrary, variables things or not, and the degree of the polynomial, you may or may not be able to compute the roots. But only you know the answer to that, because you have not provided sufficient information.
4 Kommentare
Walter Roberson
am 12 Jun. 2018
solve() of a polynomial with symbolic coefficients would have returned a vector, possibly a vector that uses root() as a placeholder. The symbolic toolbox knows the properties of root() placeholders and can reason with such placeholders, so you can carry them around in your expressions for further work.
At some point you will know numeric values for all of the variables in the expression: you can subs() those numeric values into the expression. Sometimes that will result in the root() placeholder simplifying to exact values directly, but more of the time this will leave you with root() placeholders with numeric coefficients and involving a placeholder variable. Those represent the infinitely precise solutions. You can change such root() placeholders that have only numeric coefficients and polynomial references to the placeholder variable, to finite precision numeric approximations, by using vpa() or using double()
If you end up with root() placeholders involving polynomials of degree 2, 3, or 4, then you can ask MATLAB to expand those out to closed-form solutions instead of as root() placeholders. The way you do that is in the solve() command that is creating the placeholders, add an option, 'MaxDegree', followed by 4. If you do that then the complete closed form of roots up to degree 4 will be calculated. However, the closed form of cubics is icky to read, and the closed form solution of quartics is effectively impossible for humans to make sense out of, extending over 10000 characters for each solution in the simplest case. If you are expanding out the closed form of a root of a quartic "so you can work with it later", then chances are your computation has jumped the shark and that you will never ever make sense of the answer.
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!