Skip to content

Benchmarking numerical and symbolic methods

Two discretizations can agree to twelve digits while solving the wrong problem. For the unit-density sine process, the probability E(s)E(s) of no particles in (0,s)(0,s) is a Fredholm determinant. The number of quadrature nodes is a numerical choice. The interval length is part of the physical question. An endpoint identity tests both the sign of the kernel and the dependence on that length.

Use K(x,y)=sin⁡(π(x−y))/[π(x−y)]K(x,y)=\sin(\pi(x-y))/[\pi(x-y)] with K(x,x)=1K(x,x)=1. On L2(0,s)L^2(0,s) let E(s)=det⁡(I−K)E(s)=\det(I-K). For Gauss–Legendre nodes xix_i and weights wiw_i on the physical interval, the Nyström approximation is

En(s)=det⁡[δij−wiwj K(xi,xj)]i,j=1n.E_n(s)=\det\left[\delta_{ij}-\sqrt{w_iw_j}\,K(x_i,x_j)\right]_{i,j=1}^n .

Square-root weighting makes this real matrix symmetric and preserves the determinant of the usual column-weighted rule. The factor from mapping the nodes to (0,s)(0,s) belongs in the weights. Bornemann derives the quadrature determinant and relates convergence to smoothness of the kernel. Bornemann, §6, Eq. (6.1) and Thm. 6.2, PDF

Start with the constant kernel K0=1K_0=1 on (0,s)(0,s). It has exactly one nonzero eigenvalue ss, so its determinant is 1−s1-s. Any quadrature exact on constants should recover it to rounding accuracy. This catches a weight error with a single node. The constant kernel is a short-interval control. At s=1s=1 it would predict zero and is a poor replacement for the sine kernel.

Nodes nnEn(1)E_n(1)Rn(1,1)R_n(1,1)
20.1784087771772.6399690805
40.1702271420742.7381651500
80.1702174213792.7382710275
160.1702174213792.7382710275

Here R=K(I−K)−1R=K(I-K)^{-1}. Adding a short interval at the upper end gives dlog⁡E/ds=−R(s,s)d\log E/ds=-R(s,s). The sign can be checked as s↓0s\downarrow0, where E(s)=1−s+o(s)E(s)=1-s+o(s). The resolvent equation gives another numerical route. With AA the matrix inside the determinant and bi=wiK(xi,s)b_i=\sqrt{w_i}K(x_i,s), solve Ay=bAy=b and evaluate Rn(s,s)=1+bTyR_n(s,s)=1+b^\mathsf{T}y. The leading one is the diagonal of the original kernel. Tracy and Widom, §I, endpoint derivatives and resolvent, PDF

A centered difference of log⁡E32(1+h)\log E_{32}(1+h) and log⁡E32(1−h)\log E_{32}(1-h) differs from −R32(1,1)-R_{32}(1,1) by 7.6×10−6,7.6×10−8,7.6×10−107.6\times10^{-6},7.6\times10^{-8},7.6\times10^{-10} for h=10−2,10−3,10−4h=10^{-2},10^{-3},10^{-4}. These are absolute discrepancies in a derivative, not error bars on E(1)E(1). The downloadable calculation separates quadrature order from finite-difference step. A separate Painlevé V check uses the nonlinear equation obeyed by a rescaled logarithmic derivative.

The first departure from the constant-kernel answer checks the frequency normalization. The two-point term of the Fredholm expansion integrates [1−K(x,y)2]/2[1-K(x,y)^2]/2 over the square. Expanding the sinc gives 1−K2=π2(x−y)2/3+O((x−y)4)1-K^2=\pi^2(x-y)^2/3+O((x-y)^4). Since the square integral of (x−y)2(x-y)^2 is s4/6s^4/6, the gap probability begins

E(s)=1−s+π236s4+O(s6).E(s)=1-s+\frac{\pi^2}{36}s^4+O(s^6).

The three-point determinant contributes only at higher order: subtract its first row from the next two, each of which then starts at order s2s^2, before integrating over three positions. With 12 quadrature nodes, the ratio (E−1+s)/s4(E-1+s)/s^4 at s=0.2s=0.2, 0.10.1 and 0.050.05 gives 0.268470.26847, 0.272720.27272 and 0.273800.27380, tending toward π2/36=0.27416\pi^2/36=0.27416. Omitting π\pi from the kernel would alter this coefficient even if the single-node constant test passed.

For the sine problem, replacing s=1s=1 with s=0.5s=0.5 produces a different probability. For a real cutoff test, take the half-line rank-one kernel K∞(x,y)=e−x−yK_\infty(x,y)=e^{-x-y} on x,y≥0x,y\ge0. Its sole eigenvalue is ∫0∞e−2xdx=1/2\int_0^\infty e^{-2x}dx=1/2. Truncating at LL changes det⁡(I−K∞)\det(I-K_\infty) by exactly e−2L/2e^{-2L}/2, even with perfect quadrature. A calculation at L=2L=2 therefore retains about 0.009160.00916 of error even if doubling the node count changes no displayed digit.

An independent repetition should give the kernel and measure, the physical observable, the sequence of each numerical control and at least one identity with a different failure mode. Agreement after changing two controls simultaneously can conceal an error cancellation. This method compares the endpoint analysis published in 1994 and the quadrature analysis published in 2010.

  • Bornemann, Folkmar. “On the Numerical Evaluation of Fredholm Determinants.” Mathematics of Computation 79 (2010), 871–915. DOI.
  • Tracy, Craig A., and Harold Widom. “Fredholm Determinants, Differential Equations and Matrix Models.” Communications in Mathematical Physics 163 (1994), 33–72. DOI.