Saturday, October 10, 2026

Numerical Computation Strategy : Convergence

In doing numerical computations, we use some free parameters. Picking the correct values for these parameters is rather “art” in physics. There is a compromise between cost and accuracy. Below is an illustration : let us use the problem from previous feed QM(3).

Simplified Schrodinger’s equation : \( \frac{1}{2}\left(-\frac{d^2}{d x^2}+x^2\right) \psi (x)=E \psi (x)\)

The analytical result is {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5,…}.

With Wolfram Mathematica® 11 software :

 V[r_] := r^2;

H = - R''[r]/2 + V[r] R[r]/2;

{vals, funs} =

  NDEigensystem[{H}, R[r], {r, -x, x}, 10,

   Method -> {"Eigensystem" -> {"Arnoldi", "Criteria" -> "RealPart",

       MaxIterations -> 2000},

     "SpatialDiscretization" -> {"FiniteElement", {"MeshOptions" -> \

{"MaxCellMeasure" -> 0.01}}}}];

Take[Sort[vals], 10]

 

We have the opportunity to pick any value for x, but large x is expensive (in terms of computational cost). Let us try a few values of x.


x result
1 {0.162471, 1.5, 5.13003, 11.2823, 19.9127, 31.0135, 44.5829, 60.6202, 79.1252, 100.098}
2 {0.454224, 1.26444, 2.149, 3.55982, 5.65917, 8.41084, 11.792, 15.7951, 20.4175, 25.6582}
3 {0.499552, 1.49259, 2.44784, 3.31587, 4.16776, 5.2212, 6.61117, 8.33159, 10.3541, 12.6641}
4 {0.499999, 1.49998, 2.49977, 3.49803, 4.4881, 5.44904, 6.35002, 7.2138, 8.15969, 9.30023}
5 {0.5, 1.5, 2.5, 3.5, 4.49999, 5.49989, 6.49932, 7.49655, 8.48574, 9.45226}
6 {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.49999, 9.49995}
7 {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5}

From the table above, we see the evolution of the results, given x. For \(x\leq 4\), the results are not yet accurate. However, the results start converging rapidly after \(x\geq 5\). In this case, I’ll pick \(x=6\).

 

No comments: