cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Variable in determinant

tbalázs
1-Newbie

Variable in determinant

I have an equation like det((-a^2)*M+S)=0, where M and S are matrices. How can I find the two solutions (the two roots) for a? It will be a biquadratic equation, and I need the two positive roots of the four. I've tried it with a solve block, but I could only one root calculated. 

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions

When asking a question about Mathcad it would be beneficial if you state which version of Mathcad or Prime you are using and if you post the worksheet to make clear what you are searching for.

As you say you are getting a biquadratic equation in a it seems like M and S should be 2x2 matrices.

The numeric solve block will only give you one solution, depending on the guess value. A different guess might give you the second solution. If you are looking for an non-real solution, the guess has to be non-real, too.

The get all solutions at once you have two ways to go.

Either use the symbolic "solve" command

where you can restrict the solution to real values using the "assume" keyword

or you can use the numeric "polyroot" function which needs the vector of the coefficients of your polynomial as argument.

I use the symbolic "coeffs" to create that vector so that I don't have to type it in by hand,

"polyroot" is a numeric function and as you can see we experience some numerical inaccuracies (the real part of the imaginary solutions is not exact zero).

We can cope with that by setting either the zero tolerance threshold or zhe Complex threshold to a lower value than 9. At least we can do so in Mathcad 15 and below - I don't think that Prime offers a way to do so:

Hope that this helps. Otherwise please post your worksheet.

Regards

Werner

View solution in original post

5 REPLIES 5

This would be easier to deal with if you specified the matrices M and S here.

Alan

Sorry, I'm tottaly new in this site and almost in Mathcad.

In the next answer, Werner Exinger answered my question, and I got the same result as I had calculated manually.

Thanks, Thomas

When asking a question about Mathcad it would be beneficial if you state which version of Mathcad or Prime you are using and if you post the worksheet to make clear what you are searching for.

As you say you are getting a biquadratic equation in a it seems like M and S should be 2x2 matrices.

The numeric solve block will only give you one solution, depending on the guess value. A different guess might give you the second solution. If you are looking for an non-real solution, the guess has to be non-real, too.

The get all solutions at once you have two ways to go.

Either use the symbolic "solve" command

where you can restrict the solution to real values using the "assume" keyword

or you can use the numeric "polyroot" function which needs the vector of the coefficients of your polynomial as argument.

I use the symbolic "coeffs" to create that vector so that I don't have to type it in by hand,

"polyroot" is a numeric function and as you can see we experience some numerical inaccuracies (the real part of the imaginary solutions is not exact zero).

We can cope with that by setting either the zero tolerance threshold or zhe Complex threshold to a lower value than 9. At least we can do so in Mathcad 15 and below - I don't think that Prime offers a way to do so:

Hope that this helps. Otherwise please post your worksheet.

Regards

Werner

Thank you very much, I was able to solve it with the "solve" command.

Thomas

-MFra-
21-Topaz II
(To:tbalázs)

The given equation, with simple algebraic operations turns into a eigenvalue equation. See the following examples:

Eigenvalues equations.jpg

about eigenvalues. A quick explanation.jpg

Top Tags