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
thatboi
121
18
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 too long?

There are a few possible reasons why your Eigensystem calculation may be taking longer than expected. One possibility is that you are working with a large matrix, which can significantly increase computation time. Another reason could be that your matrix is ill-conditioned, meaning it has a large condition number and is difficult to compute. Additionally, the complexity of the algorithm being used and the accuracy settings you have chosen can also affect the calculation time.

2. How can I speed up my Eigensystem calculation in Mathematica?

There are a few ways to potentially speed up your Eigensystem calculation in Mathematica. One option is to use the "Parallelization" option, which distributes the computation across multiple processors. You can also try using the "Method" option to choose a more efficient algorithm for your specific matrix. Additionally, reducing the accuracy of the calculation by adjusting the "WorkingPrecision" option can also decrease computation time.

3. Can I estimate the time it will take for my Eigensystem calculation to complete?

Yes, you can use the "Timing" function in Mathematica to get an estimate of the computation time for your Eigensystem calculation. This function will return the elapsed time in seconds, which you can use to estimate the total time based on the progress of the calculation.

4. Why is my Eigensystem calculation in Mathematica giving inaccurate results?

There are a few potential reasons for inaccurate results in your Eigensystem calculation. One possibility is that your matrix is ill-conditioned, which can lead to numerical instabilities and inaccurate solutions. Another reason could be that you have chosen a low working precision, which can affect the accuracy of the calculations. It is always recommended to check the accuracy of your results using different methods and increasing the working precision if needed.

5. Is there a limit to the size of the matrix that Mathematica can handle in an Eigensystem calculation?

Yes, there is a limit to the size of the matrix that Mathematica can handle in an Eigensystem calculation. This limit is dependent on the available memory and processing power of your computer, as well as the complexity of the algorithm being used. If you are working with a very large matrix, it may be necessary to use a more powerful computer or consider using a different software package for your Eigensystem calculation.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
126
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
  • Precalculus Mathematics Homework Help
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
6
Views
9K
Back
Top