# Solving a system of equations given a determinant

I would like to solve the following equation system:

where: $\alpha$ is the unknown vector; $M$ and $K$ are constant matrices (8 x 8).

I don't really know how to solve this :/ (LinearSolve or some loop?)

Any ideas?

### Update

Here is my code. Evaluation of the Solve expression runs indefinitely.

M = {{18.252581868563773, 0.06705185574759391,
0.5486060924803138, -0.039621551123578215, 0., 0., 0.,
0.}, {0.06705185574759391, 0.09741329795773487,
1.3410371149518783, -0.0027430304624015693, 0., 0., 0.,
0.}, {0.5486060924803138, 0.039621551123578215,
8.858972456348772, 0., -0.039621551123578215, 0., 0.,
0.}, {-0.039621551123578215, -0.0027430304624015693, 0.,
0.027796042019002567, -0.0027430304624015693, 0., 0.,
0.}, {0., 0., -0.039621551123578215, -0.0027430304624015693,
0.007314747899737517,
1.3410371149518783, -0.0027430304624015693, 0.}, {0., 0., 0.,
0., 0.039621551123578215, 33.68554113363173,
0., -0.039621551123578215}, {0., 0., 0.,
0., -0.0027430304624015693, 0.,
0.2974057336718429, -0.0027430304624015693}, {0., 0., 0., 0.,
0., -0.039621551123578215, -0.0027430304624015693,
0.0036573739498687585}}

K = {{2.432045103220617*^7,
3.6480676548309256*^6, -2.432045103220617*^7,
3.6480676548309256*^6, 0, 0, 0, 0}, {3.6480676548309256*^6,
729613.5309661851, -3.6480676548309256*^6, 364806.7654830926, 0,
0, 0, 0}, {-2.432045103220617*^7, -3.6480676548309256*^6,
4.864090206441234*^7, 0., 3.6480676548309256*^6, 0, 0,
0}, {3.6480676548309256*^6, 364806.7654830926, 0.,
1.4592270619323703*^6, 364806.7654830926, 0, 0, 0}, {0, 0,
3.6480676548309256*^6, 364806.7654830926,
1.4592270619323703*^6, -3.6480676548309256*^6,
364806.7654830926, 0}, {0, 0, 0, 0, -3.6480676548309256*^6,
4.864090206441234*^7, 0., 3.6480676548309256*^6}, {0, 0, 0, 0,
364806.7654830926, 0., 1.4592270619323703*^6,
364806.7654830926}, {0, 0, 0, 0, 0, 3.6480676548309256*^6,
364806.7654830926, 729613.5309661851}}

freqs = Table[Subscript[α, i], {i, MatrixRank[M]}];
EqOfFreq = -freqs^2 . M + K;
Solve[Det[EqOfFreq] == 0, freqs];

• I assume $\alpha$ is the $a$ you're talking about. Then, how do you understand $a^2$? – corey979 Nov 27 '16 at 15:23
• That equation reminds me of my aeroelasticity home work :) Just find the polynomial with Determinant and then use Solve to find alpha. Why don't you post your matrices? – Mirko Aveta Nov 27 '16 at 15:26
• @MirkoAveta It's for calculating the vibration frequencies of a stucture accually:) Anyway, I posted my martices and tried your method, but the evaluation won't stop. – Razero Nov 27 '16 at 16:10
• You have a complicated polynomial equation of degree 16 and with 8 variables. It's impossible that a closed form solution exists. NSolve returns an infinite number of solutions. And I suspect your code doesn't reflect what you want: 1) how do you understand freqs^2., and 2) why did you put a dot after the exponent? – corey979 Nov 27 '16 at 16:14
• So: no. Run freqs^2 and see what's the output. A scalar product (a dot product) is performed with the Dot: freqs.freqs. Then, Det[EqOfFreq] is a polynomial with 8 variables with degree 16 and... over 17 thousand terms. – corey979 Nov 27 '16 at 16:28

Use of Det is going to get you into ill conditioning as well as a needlessly nonlinear problem. Better to treat if as a generalized eigenvalues problem. It would also make sense to rescale the K matrix, say divide by 10^6 (Improves the numerics in terms of truncation error), but I will omit that below.

First find generalized eigenvalues, for which there are solutions (that is, nontrivial null vectors v) to K.v-lambda*M.v==0.

eigvals = Eigenvalues[{K, M}]

(* Out[61]= {3.38643*10^8, 2.07948*10^8, 5.2628*10^7, 1.54155*10^7,
3.86166*10^6, 1.07584*10^6, 397384., 19176.7} *)


For each j in {1,...,8}, in principle the determinant Det[K-eigval[[j]]*M] vanishes but due to the bad numerical conditioning this won't happen. All the same these are the values to use.

Obtaining those alphas is now a much simpler task. Here we do that for the first of the generalized eigenvalues.

Solve[-alf^2 == eigvals[[1]]]

(* Out[63]= {{alf -> 0. - 18402.3 I}, {alf -> 0. + 18402.3 I}} *)

• Is there anything interesting you could add here, perhaps comments on the (unfortunately) hacky solutions in the answers? I described why I need this in the comments. – Szabolcs Nov 27 '16 at 21:33
• @Szabolcs Afraid that's too far out of my area to have anything to offer. – Daniel Lichtblau Nov 27 '16 at 22:35