Skip to content

Computational Problems

A useful numerical result needs a benchmark, an error study and a test that can fail. These three projects separate quadrature, derivative resolution, spectral cutoff and roundoff errors. Use natural units ℏ=c=1\hbar=c=1 and report the numerical method, parameters and precision with every table.

Required background. Derivation Problems supplies the rapidity packet and Landau trace; Gauge Covariance fixes the phase and potential transformation. Helpful background. The Notebooks show how to record reproducible inputs and independent diagnostics.

Boosted packet probabilities in two integration variables

Section titled “Boosted packet probabilities in two integration variables”

Project 1. Implement problem 1 of Derivation Problems in rapidity and momentum coordinates. Use m=1m=1, y0=0.7y_0=0.7, s=0.4s=0.4 and passive boost ξ=1.1\xi=1.1. The two probability measures are

∣F(y)∣2 dy=∣a(p)∣2 dp2π,p=msinh⁡y.\begin{gathered} |F(y)|^2\,dy =|a(p)|^2\,\frac{dp}{2\pi},\\ p=m\sinh y. \end{gathered}

Compute the norm, mean energy, mean momentum and both acceptance probabilities: p′>0p'>0 and the transformed image of the original region p>0p>0. Use the Gaussian moments and normal cumulative distribution from the derivation as independent benchmarks.

Produce two separate convergence studies:

  1. At a well-resolved grid, vary the rapidity truncation interval y0±Rsy_0\pm Rs, for example R=4,6,8R=4,6,8.
  2. At fixed interval, refine the quadrature. Compare a rapidity grid with a genuinely uniform momentum grid covering its mapped endpoints.

Split an integral at an acceptance boundary rather than accidentally turning a smooth integrand into an unresolved step. Transform the endpoints and the acceptance region with the frame. Finally run a wrong control: retain the coefficient values under a boost but omit their square-root Jacobian factor.

Solution checkpoints

The correct transformation is

a′(p′)=EpEp′ a(p),dp′=Ep′Ep dp.a'(p')=\sqrt{\frac{E_p}{E_{p'}}}\,a(p), \qquad dp'=\frac{E_{p'}}{E_p}\,dp.

The full-line benchmarks are

DiagnosticExpected value
Norm11
⟨E⟩\langle E\rangle before the boost1.35970835151.3597083515
⟨p⟩\langle p\rangle before the boost0.82176391400.8217639140
Pr⁡(p′>0)\Pr(p'>0)0.15865525390.1586552539
Probability of the transformed original region0.95994084310.9599408431

The omitted norm tail of the symmetric rapidity interval is erfc⁡(R/2)\operatorname{erfc}(R/\sqrt2). Energy and momentum moments have differently weighted tails; do not reuse this norm-tail bound for them. As a check on the transformed mean,

⟨E′⟩=cosh⁡ξ ⟨E⟩−sinh⁡ξ ⟨p⟩,⟨p′⟩=cosh⁡ξ ⟨p⟩−sinh⁡ξ ⟨E⟩.\begin{aligned} \langle E'\rangle &=\cosh\xi\,\langle E\rangle -\sinh\xi\,\langle p\rangle,\\ \langle p'\rangle &=\cosh\xi\,\langle p\rangle -\sinh\xi\,\langle E\rangle. \end{aligned}

The wrong coefficient control generally fails normalization because the measure still transforms. Agreement between two plots does not test this Jacobian. Show separate errors against the full-line answer and against the finite-interval integral: one measures truncation plus quadrature, the other isolates quadrature.

A pure gauge tests the full Dirac derivative

Section titled “A pure gauge tests the full Dirac derivative”

Project 2. Work in a two-component spin sector on the periodic interval 0≤x<2π0\le x<2\pi, with dimensionless m=q=p0=1m=q=p_0=1. Let

HA=σx(−i∂x−A(x))+mσz,χ(x)=asin⁡x,A(x)=acos⁡x,a=0.7,Φ=0,E=2.\begin{aligned} H_A&=\sigma_x(-i\partial_x-A(x))+m\sigma_z,\\ \chi(x)&=a\sin x,\qquad A(x)=a\cos x,\\ a&=0.7,\qquad \Phi=0,\qquad E=\sqrt2. \end{aligned}

This potential is a pure periodic gauge. Define

u=((E+m)/(2E)p0/2E(E+m)),ψA(x)=eiχ(x)ueip0x.\begin{aligned} u&= \begin{pmatrix} \sqrt{(E+m)/(2E)}\\ p_0/\sqrt{2E(E+m)} \end{pmatrix},\\ \psi_A(x)&=e^{i\chi(x)}u e^{ip_0x}. \end{aligned}

Use the interval-averaged norm ∥ψ∥2=(2π)−1∫02πψ†ψ dx\|\psi\|^2=(2\pi)^{-1}\int_0^{2\pi} \psi^\dagger\psi\,dx. The exact state has norm one and satisfies HAψA=EψAH_A\psi_A=E\psi_A.

On N=8,12,16,24,32,64N=8,12,16,24,32,64 equally spaced points, apply the full Hamiltonian with a Fourier spectral derivative. Measure the residual norm and the sampled norm separately. Repeat after deliberately replacing −A-A by +A+A in the Hamiltonian.

Solution checkpoints

The continuum identity is

(−i∂x−A)eiχ(x)eip0x=p0eiχ(x)eip0x,(-i\partial_x-A)e^{i\chi(x)}e^{ip_0x} =p_0e^{i\chi(x)}e^{ip_0x},

where A=χ′A=\chi'. For grid data with Fourier convention ψ^k=N−1∑je−ikxjψj\widehat\psi_k=N^{-1}\sum_j e^{-ikx_j}\psi_j, the derivative −i∂x-i\partial_x is multiplication by the integer kk. For even NN, use the ordered modes 0,1,…,N/2−1,−N/2,…,−10,1,\ldots,N/2-1,-N/2,\ldots,-1 consistently with the transform. Apply the derivative separately to each component; the Pauli matrix then interchanges the components.

Compute the grid residual as

Rj=(HAψA)j−E(ψA)j,rN=[1N∑j=0N−1Rj†Rj]1/2.\begin{aligned} R_j&=(H_A\psi_A)_j-E(\psi_A)_j,\\ r_N&= \left[\frac1N\sum_{j=0}^{N-1}R_j^\dagger R_j\right]^{1/2}. \end{aligned}

A direct discrete-Fourier implementation in double precision gives the following representative values:

NNrNr_N
885.5653×10−25.5653\times10^{-2}
12125.1547×10−45.1547\times10^{-4}
16162.0134×10−62.0134\times10^{-6}
24245.7460×10−125.7460\times10^{-12}
3232 and aboveRoundoff regime; implementation-dependent

The finite grid resolves progressively more Fourier harmonics in eiasin⁡xe^{ia\sin x}. It need not be exactly gauge covariant at finite NN even though the continuum equation is. The sampled norm remains one at every resolution because the phase has unit modulus.

With the wrong sign, the continuum residual is 2AσxψA2A\sigma_x\psi_A. Since ∥σxu∥=1\|\sigma_xu\|=1,

rwrong⟶2a⟨cos⁡2x⟩=2 a≈0.9899494937.\begin{aligned} r_{\rm wrong}&\longrightarrow 2a\sqrt{\langle\cos^2x\rangle}\\ &=\sqrt2\,a\approx0.9899494937. \end{aligned}

This failure persists with refinement while the sampled norm still passes. At high resolution, direct transform roundoff can make residuals nonmonotonic. Do not fit a convergence order to that roundoff plateau or call norm conservation a substitute for the equation residual.

A magnetic cutoff with a known omitted tail

Section titled “A magnetic cutoff with a known omitted tail”

Project 3. For problem 2 of Derivation Problems, use y=bτ>0y=b\tau>0 and approximate the positive-band trace ratio by

RNmax⁡(y)=y[1+2∑n=1Nmax⁡e−2yn].R_{N_{\max}}(y)= y\left[1+2\sum_{n=1}^{N_{\max}}e^{-2yn}\right].

The exact ratio is R(y)=ycoth⁡yR(y)=y\coth y. Compute it for y=0.005,0.025,0.1,0.5,2,10y=0.005,0.025,0.1,0.5,2,10. For each value, vary Nmax⁡N_{\max} and compare the numerical difference with the analytical tail. Repeat with an incorrect lowest-level multiplicity of two, then examine y→0y\to0 at a fixed cutoff.

Solution checkpoints

Summing the omitted geometric series gives the exact positive truncation error

R(y)−RNmax⁡(y)=2y e−2y(Nmax⁡+1)1−e−2y.R(y)-R_{N_{\max}}(y)= \frac{2y\,e^{-2y(N_{\max}+1)}}{1-e^{-2y}}.

For small yy, evaluate the denominator as −expm1⁡(−2y)-\operatorname{expm1}(-2y) or an equivalent stable expression; subtracting two nearly equal floating-point numbers loses precision. Evaluate the closed ratio as y/tanh⁡yy/\tanh y. Use pairwise or compensated summation when the finite sum is long.

For example, Nmax⁡=⌈20/y⌉N_{\max}=\lceil20/y\rceil makes the analytical tail smaller than 4.3×10−184.3\times10^{-18} for the listed values. A larger observed double-precision difference can be roundoff in the sum or closed expression. It is not evidence that the exact tail estimate has failed.

The wrong lowest-level multiplicity adds yy, producing a false linear field term. Independently, at fixed Nmax⁡N_{\max},

RNmax⁡(y)∼y(1+2Nmax⁡)⟶0,R_{N_{\max}}(y)\sim y(1+2N_{\max})\longrightarrow0,

whereas R(y)→1R(y)\to1. A fixed level cutoff therefore fails the continuum limit. More levels become relevant as the field decreases; a calculation must control the joint cutoff and small-field limit.

What a completed numerical report establishes

Section titled “What a completed numerical report establishes”

For each project submit the declared inputs, an analytic benchmark, separate error columns, the failed control, and an interpretation tied to the model. A plot is useful when it explains where an error occurs; it does not replace the convergence table.

These checks validate the specified packet, pure-gauge mode and spectral sum. They do not establish the accuracy of an arbitrary interacting simulation. For longer reproducible calculations, continue with the Lorentz, Dirac packet and Landau notebooks, whose programs and retained data have their own diagnostic scopes.

  • Greiner, Walter. Relativistic Quantum Mechanics: Wave Equations. Third edition. Springer, 2000. doi:10.1007/978-3-662-04275-5. Wave equations and magnetic spectra.
  • Thaller, Bernd. The Dirac Equation. Springer, 1992. doi:10.1007/978-3-662-02753-0. Dirac operators and external-field structure.
  • Weinberg, Steven. The Quantum Theory of Fields, Volume I: Foundations. Cambridge University Press, 1995, chapter 2. doi:10.1017/CBO9781139644167. Particle-state transformations and normalization.