Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    How many numbers are needed to resolve a smooth bound-state profile? A local difference stencil uses nearby values to estimate derivatives. Spectral collocation differentiates one interpolating function through the entire grid. For a sufficiently smooth solution this can reduce the required point count dramatically, but it also makes boundary conditions, smoothness and rounding errors decisive.

    We construct Chebyshev and Fourier differentiation, then compute a kink fluctuation with the same finite-interval conditions used by a difference method. Separate tests expose the domain error and a nonlinear alias that a larger grid does not automatically cure.

    Preparation: Finite differences and residuals, polynomial interpolation and Fourier series. The physical kink normalization is developed in soliton stability.

    Nondimensionalize the bound-state problem

    For the scalar kink, use the dimensionless coordinate y=mx/2y=mx/2, where mm is the tree-level vacuum curvature mass. The fluctuation equation is

    Lψ=Eψ,L=−d2dy2+4−6sech⁡2y.\mathcal L\psi=E\psi,\qquad \mathcal L=-\frac{d^2}{dy^2}+4-6\operatorname{sech}^2y.

    The physical frequency satisfies ω2=(m2/4)E\omega^2=(m^2/4)E. On the half-line, the odd shape mode obeys ψ(0)=0\psi(0)=0 and decays at infinity:

    E∞=3,ψ∞(y)=3 sech⁡y tanh⁡y.E_\infty=3,\qquad \psi_\infty(y)=\sqrt3\,\operatorname{sech}y\,\tanh y.

    Indeed, substituting the profile gives Lψ∞=3ψ∞\mathcal L\psi_\infty=3\psi_\infty, and t=tanh⁡yt=\tanh y gives ∫0∞sech⁡2y tanh⁡2y dy=1/3\int_0^\infty\operatorname{sech}^2y\,\tanh^2y\,dy=1/3.

    Our first numerical problem instead has

    0<y<R,ψ(0)=ψ(R)=0.0<y<R,\qquad \psi(0)=\psi(R)=0.

    The exact half-line profile is nonzero at finite RR. Thus comparing a numerical eigenvalue directly with 33 mixes discretization and boundary error. We first compare two methods at the same RR and only then increase RR. The shooting calculation also distinguishes a finite Dirichlet wall from a spectral decay condition.

    Differentiate the interpolating polynomial

    On a reference interval −1≤ξ≤1-1\le\xi\le1, take the ascending Chebyshev–Lobatto nodes

    ξj=−cos⁡jπn,j=0,…,n.\xi_j=-\cos\frac{j\pi}{n},\qquad j=0,\ldots,n.

    There are n+1n+1 points. If vjv_j are the field values, the unique degree-at-most-nn interpolant is

    p(ξ)=∑j=0nvjℓj(ξ),ℓj(ξ)=∏k≠jξ−ξkξj−ξk.p(\xi)=\sum_{j=0}^n v_j\ell_j(\xi), \qquad \ell_j(\xi)=\prod_{k\ne j}\frac{\xi-\xi_k}{\xi_j-\xi_k}.

    Differentiation is linear:

    p′(ξi)=∑jDijvj,Dij=ℓj′(ξi).p'(\xi_i)=\sum_jD_{ij}v_j,\qquad D_{ij}=\ell_j'(\xi_i).

    For the Chebyshev nodes, let c0=cn=2c_0=c_n=2 and cj=1c_j=1 otherwise. The entries are

    Dij=cicj(−1)i+jξi−ξj(i≠j),Dii=−∑j≠iDij.D_{ij}=\frac{c_i}{c_j}\frac{(-1)^{i+j}}{\xi_i-\xi_j} \quad(i\ne j),\qquad D_{ii}=-\sum_{j\ne i}D_{ij}.

    The diagonal formula enforces the derivative of a constant. This construction is derived in Trefethen, Chapter 6, Theorem 7, pp. 51–55 (PDF). The source orders nodes from +1+1 to −1-1; reversing both rows and columns gives the ascending convention used here.

    Map to y=R(ξ+1)/2y=R(\xi+1)/2:

    Dy=2RD,Dyy=4R2D2.D_y=\frac2R D,\qquad D_{yy}=\frac4{R^2}D^2.

    The scale factor is squared for a second derivative. An elementary but discriminating implementation test is Dyy=1D_y y=\boldsymbol1, followed by derivatives of several polynomials on intervals of different lengths.

    For homogeneous Dirichlet data, first form the full second-derivative matrix, then remove endpoint unknowns:

    Hn=[−Dy2+diag⁡(4−6sech⁡2yj)]interior.H_n=\left[-D_y^2+ \operatorname{diag}(4-6\operatorname{sech}^2y_j)\right]_{\mathrm{interior}}.

    Deleting endpoints from DyD_y before squaring would differentiate a different intermediate interpolant. For nonzero Dirichlet values, retain their contributions as known terms on the right. A Neumann or Robin condition instead supplies an endpoint row involving the appropriate derivative and value; it cannot be imposed by deleting the endpoint blindly.

    This point-collocation matrix is generally not symmetric in the Euclidean norm of its nodal values. The companion uses a general eigensolver, records imaginary parts and residuals, and selects the smallest positive eigenvalue satisfying a stated realness test. The collocation eigenvalues need not be variational upper bounds.

    Recovering the finite-box shape mode

    The retained calculation uses R=4,6,8,12R=4,6,8,12 and Chebyshev degrees 24,32,48,64,96,12824,32,48,64,96,128. Degrees 192192 and 256256 provide a reference refinement check for each finite boundary problem. Eigenvectors are normalized by integrating their interpolating polynomial with Gauss–Legendre quadrature; changing the quadrature from 256256 to 512512 points checks that normalization.

    At R=8R=8, the degree-256256 reference gives ER=3.00000270086864E_R=3.00000270086864. Its change from degree 192192 is 2.25×10−122.25\times10^{-12}, so differences at that scale are numerical floors rather than additional certified digits.

    MethodInterior unknowns∣E−ER∣\lvert E-E_R\rvert
    Centered differences63635.808×10−35.808\times10^{-3}
    Centered differences2552553.606×10−43.606\times10^{-4}
    Centered differences102310232.253×10−52.253\times10^{-5}
    Chebyshev collocation23233.772×10−73.772\times10^{-7}
    Chebyshev collocation31312.261×10−92.261\times10^{-9}
    Chebyshev collocation47471.185×10−121.185\times10^{-12}

    The smooth profile is resolved with far fewer collocation points. This comparison counts unknowns, not wall-clock cost: the Chebyshev matrix is dense, whereas the difference matrix is tridiagonal. A large multidimensional calculation must account for storage, matrix application and solver structure as well.

    Finite-box kink eigenvalue error versus unknown count, and the normalized finite-box shape compared with the half-line profile.

    The left panel compares discretizations of exactly the same Dirichlet problem at R=8R=8. Differences near 10−1210^{-12} are comparable to the reference refinement, not guaranteed continuum accuracy. The right shows the normalized profile at R=4R=4, where the finite wall visibly changes its tail relative to the half-line shape.

    A nodal eigen-residual alone can be small even when the interpolating function is poor between nodes. The driver therefore differentiates the interpolating polynomial at independent quadrature points. At R=8R=8, the maximum off-grid ODE residual is 4.91×10−34.91\times10^{-3} at degree 2424, 1.54×10−81.54\times10^{-8} at degree 4848, and 1.56×10−111.56\times10^{-11} at degree 6464. It then rises to 7.98×10−97.98\times10^{-9} at degree 256256: high derivatives amplify rounding error. The normalized profile difference at degree 4848 relative to the reference is 6.69×10−136.69\times10^{-13} in L2L^2. These diagnostics measure different aspects of the approximation and need not attain their minima at the same degree.

    Now vary the boundary:

    RRFinite-Dirichlet eigenvalue ERE_RER−3E_R-3
    443.008128720563.008128720568.129×10−38.129\times10^{-3}
    663.000147508243.000147508241.475×10−41.475\times10^{-4}
    883.000002700873.000002700872.701×10−62.701\times10^{-6}
    12123.000000000913.000000000919.07×10−109.07\times10^{-10}

    The degree-192192 to 256256 changes range from 1.15×10−121.15\times10^{-12} to 6.46×10−126.46\times10^{-12}. The domain effect is much larger than that refinement at the smaller RR. A well-resolved finite box is still a finite box.

    Fourier differentiation and the Nyquist mode

    On a periodic interval of length 2π2\pi, sample at xj=2πj/Nx_j=2\pi j/N. The discrete Fourier coefficients are

    f~k=1N∑j=0N−1fje−ikxj.\widetilde f_k=\frac1N\sum_{j=0}^{N-1}f_j e^{-ikx_j}.

    For resolved modes, first and second derivatives multiply coefficients by ikik and −k2-k^2. In matrix form,

    D1=F−1diag⁡(ik)F,D2=F−1diag⁡(−k2)F.D_1=F^{-1}\operatorname{diag}(ik)F,\qquad D_2=F^{-1}\operatorname{diag}(-k^2)F.

    Here FF denotes the matching discrete transform. For even NN, the real interpolant represents the Nyquist component by cos⁡(Nx/2)\cos(Nx/2). Its first derivative vanishes at every grid point, so the first-derivative multiplier is set to zero there. Its second derivative is −(N/2)2cos⁡(Nx/2)-(N/2)^2\cos(Nx/2) and does not vanish. Consequently D12D_1^2 and the proper Fourier D2D_2 differ on that mode. This is a convention about unresolved sine data, not a failure of calculus.

    For the analytic periodic function f=ecos⁡xf=e^{\cos x}, the exact second derivative is

    f′′=(sin⁡2x−cos⁡x)ecos⁡x.f''=(\sin^2x-\cos x)e^{\cos x}.

    The maximum nodal errors at N=8,16,32,64N=8,16,32,64 are respectively 1.03×10−21.03\times10^{-2}, 3.91×10−73.91\times10^{-7}, 4.30×10−144.30\times10^{-14} and 2.25×10−132.25\times10^{-13}. The rapid decrease reaches a rounding floor.

    Smoothness is essential. For ∣sin⁡x∣|\sin x|, which has cusps, the RMS function interpolation errors at N=8,16,32,64,128N=8,16,32,64,128 are 0.07190.0719, 0.02880.0288, 0.01090.0109, 0.003970.00397 and 0.001430.00143. The convergence is algebraic. We do not compare an ordinary second derivative at the cusps, where a distributional treatment is needed. Likewise, a smooth function on an interval can acquire an endpoint jump when periodically extended; using a Fourier grid does not remove that jump.

    Nonlinear products create unresolved modes

    Collocation evaluates products at the grid points. A product can generate frequencies above the resolved band even if every input is resolved. On an NN-point grid,

    ei(k+N)xj=eikxj,e^{i(k+N)x_j}=e^{ikx_j},

    so the higher frequency is indistinguishable from a lower one: this is aliasing.

    For example,

    cos⁡3(4x)=34cos⁡(4x)+14cos⁡(12x).\cos^3(4x)=\frac34\cos(4x)+\frac14\cos(12x).

    At N=12N=12, the second term appears as a constant and gives a false mean 1/41/4, although the continuum mean is zero. A more demanding example is cos⁡3(5x)\cos^3(5x). Its frequency-1515 term aliases to frequency 33 on both 1212 and 1818 points. Merely applying the familiar factor-3/23/2 padding associated with quadratic products is insufficient for this cubic product.

    If the inputs and desired output satisfy ∣k∣≤K|k|\le K, a cubic creates modes up to 3K3K. To keep those modes from wrapping into [−K,K][-K,K] on a product grid of size MM, a sufficient strict condition is

    M>4K.M>4K.

    Pad the resolved input coefficients with zeros, evaluate on that grid, multiply, transform back, then keep the desired output band. The companion tests the known trigonometric inputs by reevaluating them on 12,18,2412,18,24 product points; for these exactly resolved inputs this is equivalent to zero-padding. With K=5K=5, M=24M=24 removes the false frequency-33 component to roundoff. The driver is a concrete alias check, not a general-purpose nonlinear padding library.

    Summary

    Spectral differentiation follows directly from an interpolating function. It can resolve smooth field profiles efficiently, provided coordinates, boundary equations and derivative conventions are consistent. The kink calculation separates point-count convergence from the finite wall, while the Fourier tests distinguish analytic convergence, rounding floors, limited smoothness and nonlinear aliasing.

    Exercises

    1. Square before eliminating endpoints

    Construct the first-derivative matrix at the ascending nodes (−1,0,1)(-1,0,1). Compare the interior entry of D2D^2 with the square of the interior submatrix of DD. How does the result scale on [0,R][0,R]?

    Solution

    Differentiating the three quadratic Lagrange polynomials gives

    D=(−3/22−1/2−1/201/21/2−23/2),D2=(1−211−211−21).D= \begin{pmatrix} -3/2&2&-1/2\\ -1/2&0&1/2\\ 1/2&-2&3/2 \end{pmatrix}, \qquad D^2= \begin{pmatrix} 1&-2&1\\ 1&-2&1\\ 1&-2&1 \end{pmatrix}.

    For zero endpoint values, the correct interior second derivative is −2v1-2v_1. Removing the endpoint rows and columns first leaves the 1×11\times1 matrix (0)(0), whose square is zero. That procedure incorrectly discards the derivative information carried by the endpoint values of the intermediate polynomial.

    Under y=R(ξ+1)/2y=R(\xi+1)/2, multiply DD by 2/R2/R and D2D^2 by 4/R24/R^2. Thus the single interior entry for the second derivative is −8/R2-8/R^2. Checking Dyy=1D_y y=1 independently catches an orientation or scale error before solving an eigenproblem.

    2. Why quadratic padding fails for a cubic

    An input has Fourier support ∣k∣≤5|k|\le5. Show explicitly why an 1818-point product grid corrupts the retained band for f=cos⁡(5x)f=\cos(5x), and derive a sufficient grid size for any cubic of such inputs.

    Solution

    The exact product is

    f3=34cos⁡(5x)+14cos⁡(15x).f^3=\frac34\cos(5x)+\frac14\cos(15x).

    On 1818 points, 1515 is equivalent to −3-3 modulo 1818. Since the cosine is even, the unwanted term becomes 14cos⁡(3x)\frac14\cos(3x) inside the retained band. The incorrect coefficient is not a small discretization remainder.

    For general input support [−K,K][-K,K], convolution gives cubic support [−3K,3K][-3K,3K]. A positive high mode can wrap into the retained interval if k−M≥−Kk-M\ge-K for some k≤3Kk\le3K. Excluding this possibility requires 3K−M<−K3K-M<-K, or M>4KM>4K; the negative side gives the same condition. For K=5K=5, any integer M>20M>20 suffices under this support convention, and the retained test uses M=24M=24. After multiplication one must still project back to the desired output band.

    References

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.