  The suitable basis functions for approximating periodic function are
periodic, trigonometric functions. When the function is not periodic, a viable
alternative is to consider polynomials as basis functions. In this paper we
will point out the inadequacy of polynomial approximation and suggest to switch
from powers of $x$ to powers of $\sin(px)$ where $p$ is a parameter which
depends on the dimension of the approximating subspace. The new set does not
suffer from the drawbacks of polynomial approximation and by using them one can
approximate analytic functions with spectral accuracy. An important application
of the new basis functions is related to numerical integration. A quadrature
based on these functions results in higher accuracy compared to Legendre
quadrature.
