The problem with calculating eigenvalues ​​using math

I mainly try to find the eigenvalues ​​for the matrix, and it takes about 12 hours. When it ends, he says that he cannot find all the eigenvectors (in fact, almost none), and I am skeptical of those that he found. All I can really do is post my code, and I hope someone can make some suggestions for me. I am not very good at maths and possibly slow runtimes, and bad results have something to do with me, not maths. Thanks to everyone who responds, I really appreciate that.

cutoff = 500; (* set a cutoff for the infinite series *)
numStates = cutoff + 1; (* set the number of excited states to be printed *)
If[numStates > 10, numStates = 10];

    $RecursionLimit = cutoff + 256; (* Increase the recursion limit to allow for the specified cutoff *)
(* set the mass of the constituent quarks *)
m1 := mS; (* just supposed to be a constant *)
m2 := 0;

(* construct the hamiltonian *)
h0[n_,m_] := 4 Min[n,m] * ((-1)^(n+m) * m1^2 + m2^2);

v[0,m_] := 0;
v[n_,0] := 0;
v[n_,1] := (8/n) * ((1 + (-1)^(n + 1)) / 2);
v[n_,m_] := v[n - 1, m - 1] * (m/(m - 1)) + (8 m/(n + m - 1))*((1 + (-1)^(n + m))/2);

h[n_,m_] := h0[n,m] + v[n,m];

(* construct the matrix from the hamiltonian *)
mat = Table[h[n,m], {n, 0, cutoff}, {m, 0, cutoff}] // FullSimplify;

(* find the eigenvalues and eigenvectors, then reverse the order *)
PrintTemporary["Finding the eigenvalues"];
{vals, vecs} = Eigensystem[N[mat]] // FullSimplify;

$RecursionLimit = 256; (* Put the recursion limit back to the default *)

, , . -, , , m1, m2 , , m1 .

+5
2

, mS . , Mathematica . mS, .

, , , , memoization

v[n_, m_] := v[n, m] = v[n - 1, m - 1]*(m/(m - 1)) 
                     + (8 m/(n + m - 1))*((1 + (-1)^(n + m))/2);

v[n, m] = n m, v[0,0] , h[n, m] Table[].

, 2, , .

+9

. , .

, , 501 x 501 . [, , . , . , , .]

, . 2 x 2:

Array[f, {2, 2}] // Eigenvalues

(* ==> 
 {1/2 (f[1, 1]+f[2, 2]-Sqrt[f[1, 1]^2+4f[1, 2] f[2, 1]-2 f[1, 1] f[2, 2]+f[2, 2]^2]), 
 1/2(f[1, 1]+f[2, 2]+Sqrt[f[1, 1]^2+4 f[1, 2] f[2, 1]-2 f[1, 1] f[2, 2]+f[2, 2]^2])}   
*)

Array[f, {2, 2}] // Eigenvalues//ByteCount= 3384 . : 7x7 70 ( ). :

enter image description here

: = E ^ (2.2403067075863197 + 2.2617380321848457 x ).

, 501 x 501 .

[, ?]

+3

All Articles