In mathematics, trigonometric interpolation is interpolation with trigonometric polynomials. Interpolation is the process of finding a function which goes through some given data points. For trigonometric interpolation, this function has to be a trigonometric polynomial, that is, a sum of sines and cosines of given periods. This form is especially suited for interpolation of periodic functions. An important special case is when the given data points are equally spaced, in which case the solution is given by the discrete Fourier transform. Formulation of the interpolation problem A trigonometric polynomial of degree K has the form This expression contains 2K + 1 coefficients, a0, a1, … aK, b1, …, bK, and we wish to compute those coefficients so that the function passes through N points: Since the trigonometric polynomial is periodic with period 2π, the N points can be distributed and ordered in one period as (Note that we do not in general require these points to be equally spaced.) The interpolation problem is now to find coefficients such that the trigonometric polynomial p satisfies the interpolation conditions. Formulation in the complex plane The problem becomes more natural if we formulate it in the complex plane. We can rewrite the formula for a trigonometric polynomial as where i is the imaginary unit. If we set z = eix, then this becomes with This reduces the problem of trigonometric interpolation to that of polynomial interpolation on the unit circle. Existence and uniqueness for trigonometric interpolation now follows immediately from the corresponding results for polynomial interpolation. For more information on formulation of trigonometric interpolating polynomials in the complex plane, see p. 156 of Interpolation using Fourier Polynomials. Solution of the problem Under the above conditions, there exists a solution to the problem for any given set of data points {xk, yk} as long as N, the number of data points, is not larger than the number of coefficients in the polynomial, i.e., N ≤ 2K+1 (a solution may or may not exist if N>2K+1 depending upon the particular set of data points). Moreover, the interpolating polynomial is unique if and only if the number of adjustable coefficients is equal to the number of data points, i.e., N = 2K + 1. In the remainder of this article, we will assume this condition to hold true. Odd number of points If the number of points N is odd, say N=2K+1, applying the Lagrange formula