# Trigonometric polynomial

In the mathematical subfields of numerical analysis and mathematical analysis, a trigonometric polynomial is a finite linear combination of functions sin(nx) and cos(nx) with n taking on the values of one or more natural numbers. The coefficients may be taken as real numbers, for real-valued functions. For complex coefficients, there is no difference between such a function and a finite Fourier series.
Trigonometric polynomials are widely used, for example in trigonometric interpolation applied to the interpolation of periodic functions. They are used also in the discrete Fourier transform.
The term trigonometric polynomial for the real-valued case can be seen as using the analogy: the functions sin(nx) and cos(nx) are similar to the monomial basis for polynomials. In the complex case the trigonometric polynomials are spanned by the positive and negative powers of $e^{ix}$, i.e., Laurent polynomials in $z$ under the change of variables $x\mapsto z:=e^{ix}$.

## Definition

Any function T of the form
$T(x)=a_{0}+\sum _{n=1}^{N}a_{n}\cos(nx)+\sum _{n=1}^{N}b_{n}\sin(nx)\qquad (x\in \mathbb {R} )$
with coefficients $a_{n},b_{n}\in \mathbb {C}$ and at least one of the highest-degree coefficients $a_{N}$ and $b_{N}$ non-zero, is called a complex trigonometric polynomial of degree N. Using Euler's formula the polynomial can be rewritten as
$T(x)=\sum _{n=-N}^{N}c_{n}e^{inx}\qquad (x\in \mathbb {R} ).$ with $c_{n}\in \mathbb {C}$.
Analogously, letting coefficients $a_{n},b_{n}\in \mathbb {R}$, and at least one of $a_{N}$ and $b_{N}$ non-zero or, equivalently, $c_{n}\in \mathbb {R}$ and $c_{n}={\bar {c}}_{-n}$ for all $n\in [-N,N]$, then
$t(x)=a_{0}+\sum _{n=1}^{N}a_{n}\cos(nx)+\sum _{n=1}^{N}b_{n}\sin(nx)\qquad (x\in \mathbb {R} )$
is called a real trigonometric polynomial of degree N.

## Properties

A trigonometric polynomial can be considered a periodic function on the real line, with period some divisor of ⁠$2\pi$⁠, or as a function on the unit circle.
Trigonometric polynomials are dense in the space of continuous functions on the unit circle, with the uniform norm; this is a special case of the Stone–Weierstrass theorem. More concretely, for every continuous function ⁠$f$⁠ and every ⁠$\epsilon >0$⁠ there exists a trigonometric polynomial ⁠$T$⁠ such that $|f(z)-T(z)|<\epsilon$ for all ⁠$z$⁠. Fejér's theorem states that the arithmetic means of the partial sums of the Fourier series of ⁠$f$⁠ converge uniformly to ⁠$f$⁠ provided ⁠$f$⁠ is continuous on the circle; these partial sums can be used to approximate ⁠$f$⁠.
A trigonometric polynomial of degree ⁠$N$⁠ has a maximum of ⁠$2N$⁠ roots in a real interval ⁠$[a,a+2\pi )$⁠ unless it is the zero function.

## Fejér-Riesz theorem

The Fejér-Riesz theorem states that every positive real trigonometric polynomial $t(x)=\sum _{n=-N}^{N}c_{n}e^{inx},$ satisfying $t(x)>0$ for all $x\in \mathbb {R}$, can be represented as the square of the modulus of another (usually complex) trigonometric polynomial $q(x)$ such that: $t(x)=|q(x)|^{2}=q(x){\bar {q}}(x).$ Or, equivalently, every Laurent polynomial $w(z)=\sum _{n=-N}^{N}w_{n}z^{n},$ with $w_{n}\in \mathbb {C}$ that satisfies $w(\zeta )\geq 0$ for all $\zeta \in \mathbb {T}$ can be written as: $w(\zeta )=|p(\zeta )|^{2}=p(\zeta ){\bar {p}}({\bar {\zeta }}),$ for some polynomial $p(z)$.