3

I have a symbolic, 2-parameter, 8x8 matrix to solve, but Mathematica takes something like 20 minutes to solve it and returns a very large output containing expressions of the form Root[#1^2 #4^3 + ... #2^6+...].

The matrix is :

F = 
  {{0, 1/9 (2 j + 3 q), 0, 1/9 (2 j + 7 q), 0, -(2/9) (2 j + 3 q), 0, 
     -(2/9)(2 j + 3 q)}, 
   {1/9 (-2 j - 3 q), 0, 1/9 (-2 j + q), 0, 2/9 (2 j + q), 0, 2/9 (2 j + q), 0}, 
   {0, (4 q)/9, 0, -((4 q)/9), 0, 0, 0, 0}, 
   {(4 q)/9, 0, -((4 q)/9), 0, 0, 0, 0, 0}, 
   {(8 (j - q))/27, -(2/27) (2 j + 13 q), (8 (j - q))/27, -(2/27) (2 j + 13 q), 
     (8 (j - q))/27, 8/81 (14 j - 5 q), (8 (j - q))/27, -(8/81) (j - 10 q)}, 
   {2/9 (2 j + q), 0, 2/9 (2 j + q), 0, -(8/81) (7 j + 2 q), 0, 
     -(8/81) (4 j + 5 q), 0}, 
   {-(16/27) (j - q), -(16/27) (j - q), -(16/27) (j - q), -(16/27) (j - q), 
     -(16/27) (j - q), -(56/27) (j - q), -(16/27) (j - q), (8 (j - q))/9}, 
   {0, 0, 0, 0, (8 (j - q))/27, 0, -(8/27) (j - q), 0}}

I want to compute Eigensystem[F].

Even when I specify some numerical values of these parameters, the program still returns an output with Rootand takes 1 or 2 minutes. I believe this isn't normal. I'm wondering if I have to use compiled functions (which I don't know how to use) or parallel computation for doing this.

Is there a way to obtain some numerical values of the roots (possibly in terms of $j$ and $q$), by specifying the values of the two parameters?

I saw these answers : How to solve an eigensystem faster? and How do I work with Root objects? but I'm having trouble applying them to my problem.

Toool
  • 167
  • 8
  • 2
    If you just want to see numerical values, just do Eigensystem[N[F]], assuming you've already set values to the parameters. Otherwise, you'd have a hard time avoiding Root[] since the roots of an eighth-degree polynomial do not admit radical representations in general. – J. M.'s missing motivation Jun 18 '15 at 08:46
  • @Guesswhoitis, I've tried to do Eigensystem[N[f]]but it still takes a lot of time, and gives me output with Root.. The question is how can I avoid this long computation time and the Root output ? – Toool Jun 18 '15 at 08:52
  • 1
    I said that you should only do it if you've already set numerical values to the parameters; if you're still seeing Root[], then you didn't follow what I said. – J. M.'s missing motivation Jun 18 '15 at 08:55
  • You're right thanks. With the numerical values it works fine, now my goal is to see if I can do this without specifying numerical values of the 2 parameters.. ! – Toool Jun 18 '15 at 09:03
  • 1
    Then you can't avoid Root[] except in very special cases. I already said something about Root[] being needed to represent polynomial roots in general… – J. M.'s missing motivation Jun 18 '15 at 09:07
  • Ok but is it possible to do a numerical calculation of such roots, avoiding the evaluation of the symbolic parameters ? – Toool Jun 18 '15 at 09:16
  • If you set the parameters as inexact numbers (N[(* your parameter *)]), then the symbolics are bypassed. – J. M.'s missing motivation Jun 18 '15 at 09:22
  • 1
    I have to wonder what sort of result you are expecting. – Daniel Lichtblau Jun 18 '15 at 11:12
  • I want the eigenvalues and eigenvectors of this matrix in terms of the parameters j and q without Root. – Toool Jun 18 '15 at 12:01
  • 1
    @LSnoopyD Why do you believe that is possible at all? Check here: https://en.wikipedia.org/wiki/Abel%E2%80%93Ruffini_theorem – Szabolcs Jun 18 '15 at 12:18
  • 1
    Then you're asking for the unreasonable. I already said that you can't avoid Root[] except in very special cases. – J. M.'s missing motivation Jun 18 '15 at 12:20
  • There is no algebraic solution, I understand that. I'm looking for a numerical solution of these roots ! Since jand q aren't the polynomial's variables I believe it is possible to compute numerically the roots without evaluating j and q. Either I'm explaining myself very badly, or I'm totally wrong and I'm missing something.. – Toool Jun 18 '15 at 12:58
  • 1
    "Looking for a numerical solution" and "now my goal is to see if I can do this without specifying numerical values of the 2 parameters.." are contradictory. What you can do is substitute in numerical values first and computer the eigensystem only afterwards. You can define a function ("function" as in "subroutine"/"procedure") in terms of j and q that does this. – Szabolcs Jun 18 '15 at 13:42

1 Answers1

2

The following function will calculate the eigensystem numerically when provided with numerical values of $j$ and $q$. This is, I believe, what @Szabolcs was referring to in his comment. I wonder if this is what you mean when you ask for a "numerical solution".

Clear[eigen]
eigen[jj_?NumericQ, qq_?NumericQ] := Chop@Eigensystem[N[f /. {j -> jj, q -> qq}]]

You can then use this procedure to calculate the numerical values of the eigenvectors and eigenvalues for any value of the two parameters. For instance:

{evals, evecs} = eigen[0.1, 4];

evals

{0.495659 + 4.25935 I, 0.495659 - 4.25935 I, 0.109879 + 3.07184 I, 0.109879 - 3.07184 I, 2.92633, -2.89685, -0.0425017 + 0.329099 I, -0.0425017 - 0.329099 I}

evecs

{{-0.0482985 - 0.0348853 I, 0.0321458 - 0.113914 I, -0.0453241 - 0.0211174 I, -0.00581224 + 0.000565127 I, -0.32658 + 0.0450911 I, -0.0600757 + 0.332626 I, 0.813862, 0.0234541 - 0.306671 I}, {-0.0482985 + 0.0348853 I, 0.0321458 + 0.113914 I, -0.0453241 + 0.0211174 I, -0.00581224 - 0.000565127 I, -0.32658 - 0.0450911 I, -0.0600757 - 0.332626 I, 0.813862, 0.0234541 + 0.306671 I}, {-0.353103 + 0.0685274 I, -0.0725844 - 0.181175 I, -0.168451 + 0.0424839 I, 0.0112354 + 0.107266 I, 0.604769, 0.150466 + 0.0354625 I, -0.453657 - 0.179914 I, -0.0818168 + 0.395229 I}, {-0.353103 - 0.0685274 I, -0.0725844 + 0.181175 I, -0.168451 - 0.0424839 I, 0.0112354 - 0.107266 I, 0.604769, 0.150466 - 0.0354625 I, -0.453657 + 0.179914 I, -0.0818168 - 0.395229 I}, {0.414179, -0.340333, -0.56998, 0.597888, -0.158251, 0.0308016, -0.0494196, 0.0429756}, {0.403107, 0.310752, -0.549465, -0.584588, -0.245644, 0.0543998, 0.115176, -0.143931}, {-0.338839 - 0.35103 I, -0.111621 + 0.0863311 I, -0.31761 - 0.314881 I, -0.177504 + 0.137599 I, -0.195885 - 0.135764 I, 0.179694 + 0.237822 I, -0.177915 - 0.274909 I, -0.488576}, {-0.338839 + 0.35103 I, -0.111621 - 0.0863311 I, -0.31761 + 0.314881 I, -0.177504 - 0.137599 I, -0.195885 + 0.135764 I, 0.179694 - 0.237822 I, -0.177915 + 0.274909 I, -0.488576}}

MarcoB
  • 67,153
  • 18
  • 91
  • 189
  • Thanks for your answer. I was a bit fuzzy on what I wanted : I will follow this strategy and then interpolate the results for the $j$ and $q$ dependence of the eigenvalues. – Toool Jun 19 '15 at 12:27
  • @LSnoopyD I'm glad it helps; thank you for the accept as well! – MarcoB Jun 19 '15 at 12:30