For period two in each direction, use Fourier coefficients
Integration of the periodic Poisson equation gives the necessary compatibility condition . With it, the normalization fixes and every other Fourier mode gives . The Fourier-Galerkin approximation is therefore
One may evaluate the coefficients by a discrete Fourier transform for a pseudospectral implementation, with the corresponding quadrature/aliasing error distinguished from truncation.
Convergence with spectral accuracy means faster decay than every fixed algebraic power of . A smooth periodic extension gives this rate; an analytic periodic extension to a complex strip gives the stronger exponential rate on a slightly narrower strip. Division by preserves that Fourier decay, so the normalized solution has the same type of spectral convergence.
Two qualifications are required by the literal source assumptions. The mean-zero condition on was not stated: meets the printed analyticity and endpoint equalities but has no periodic solution. Also endpoint equality of alone does not make its periodic extension analytic. For example is analytic, has matching endpoint values and zero mean, but its nonzero Fourier coefficients are . Then , with only algebraic decay. Thus the standard spectral-speed conclusion is valid under the intended analytic-periodic torus assumption and compatibility, not for every function satisfying only the displayed endpoint values.
Spectral accuracy 2026-10-14
A spectral method has spectral accuracy for a class of smooth data when its error decreases faster than any fixed inverse power of the truncation size. For periodic Fourier series, this follows from arbitrarily many integrations by parts when every derivative matches across the periodic boundary. An analytic periodic extension to a complex strip gives exponential coefficient decay. Analyticity inside one period and matching only endpoint values do not suffice: a jump in a derivative of the periodic extension yields algebraic decay instead.