Mathematica Eigensystem Calculation Taking Too Long

In summary, the conversation discusses the issue of finding the Eigensystem of a 5x5 matrix in Mathematica, which is taking a long time and causing memory issues. The possibility of using Parallelize[] and solving numerically instead of symbolically is also mentioned. The problem being solved for the x_i is not specified.
  • #1
102
14
Hey all,
I am currently trying to find the Eigensystem of the following 5x5 matrix in Mathematica. Unfortunately, doing so takes an insanely long time (I cannot even call Eigensystem[p][[1,1]] in a reasonable amount of time). Does anyone have any advice? Also I cannot simply redefine new variables for each of the differences x_{i}-x_{j} because I will need to solve for each x_{i} individually in an upcoming calculation so I do not think we can use some clever algebraic combination of the x_{i}-x_{j} to recover the x_{i} individually.

p = ({
{0, 1/(x1 - x2)^3, 1/(x1 - x3)^3, 1/(x1 - x4)^3, 1/(x1 - x5)^3},
{1/(x1 - x2)^3, 0, 1/(x2 - x3)^3, 1/(x2 - x4)^3, 1/(x2 - x5)^3},
{1/(x1 - x3)^3, 1/(x2 - x3)^3, 0, 1/(x3 - x4)^3, 1/(x3 - x5)^3},
{1/(x1 - x4)^3, 1/(x2 - x4)^3, 1/(x3 - x4)^3, 0, 1/(x4 - x5)^3},
{1/(x1 - x5)^3, 1/(x2 - x5)^3, 1/(x3 - x5)^3, 1/(x4 - x5)^3, 0}
});

Thanks!
 
Physics news on Phys.org
  • #2
Have you considered Parallelize[] ? I think it is often used for the issue you describe -
 
  • #3
Are you trying to compute the eigenvalues/vectors symbolically? That is (a) far more memory intensive than a numerical computation (according to https://reference.wolfram.com/language/ref/Eigensystem.html the memory required increases faster than exponentially with the size of the matrix), and (b) probably not possible for 5x5 or larger matrices in general, since it is not possible to solve a generic polynomial of degree 5 or higher by radicals. (I think it's significant that none of the examples on the page I linked attempt symbolic/exact calculations on anything larger than a 4x4 matrix.)

What is the actual problem you are trying to solve for the [itex]x_i[/itex]? It may be possible to solve it numerically without trying to find symbolic expressions for the eigenvalues/vectors of a 5x5 matrix.
 
  • Like
Likes Delta2, jim mcnamara and DrClaude

1. Why is my Mathematica Eigensystem calculation taking so long?

There are a few possible reasons why your Eigensystem calculation may be taking a long time. One possibility is that the matrix you are working with is very large, which can significantly increase the computation time. Another reason could be that your matrix is ill-conditioned, meaning that the values in the matrix are very large or very small, making the calculation more difficult for the computer. Additionally, the complexity of the algorithm being used to calculate the Eigensystem can also impact the computation time.

2. Is there a way to speed up the Eigensystem calculation in Mathematica?

Yes, there are a few ways to potentially speed up the Eigensystem calculation in Mathematica. One approach is to use sparse matrices, which can be much faster to work with compared to dense matrices. Another option is to use parallel computing, which allows for multiple processors to work on the calculation simultaneously. Additionally, simplifying the matrix or using specialized Eigensystem algorithms can also improve computation time.

3. Can the Eigensystem calculation in Mathematica be inaccurate?

Yes, there is always the potential for numerical errors in any computation, including Eigensystem calculations in Mathematica. This can be due to rounding errors or limitations in the precision of the computer. It is important to consider the accuracy and precision needs of your calculation and adjust settings accordingly in Mathematica.

4. How do I know if my Eigensystem calculation in Mathematica is correct?

There are a few ways to check the accuracy of your Eigensystem calculation in Mathematica. One method is to compare the results to known solutions or to use built-in functions such as MatrixPower to verify the results. Additionally, checking the condition number of the matrix can give an indication of the accuracy of the calculation. It is also helpful to review the documentation and algorithms used by Mathematica for the Eigensystem function to understand any potential limitations or sources of error.

5. Are there any resources for troubleshooting slow Eigensystem calculations in Mathematica?

Yes, there are several resources available for troubleshooting slow Eigensystem calculations in Mathematica. The Mathematica documentation for the Eigensystem function offers tips and strategies for improving computation time. Additionally, the Mathematica community forums and Stack Exchange can be helpful for finding solutions to specific problems or for getting advice from experienced users. Finally, consulting with a Mathematica expert or attending workshops and conferences can also provide valuable insights and techniques for optimizing Eigensystem calculations in Mathematica.

Suggested for: Mathematica Eigensystem Calculation Taking Too Long

Replies
1
Views
1K
Replies
1
Views
708
Replies
10
Views
1K
Replies
1
Views
1K
Replies
5
Views
681
Replies
3
Views
90
Replies
1
Views
766
Replies
1
Views
691
Back
Top