Can a non-periodic function have a Fourier series?

In order to find its Fourier series, a periodic function with period $R$ should be thought of as a function defined on a circle of circumference $R$, call it $S^1_R$. The Fourier series of the function is then its representation in the basis of $L^2(S^1_R)$ given by orthonormal eigenfunctions of the Laplace operator.

If two functions have incommensurate periods, then their sum is nonperiodic, does not descend to a circle of any circumference, and therefore does not have a Fourier series.

As functions on $\mathbb{R}$, if they are sufficiently nice, the Fourier transform gives an analogous decomposition, but because there are so many more eigenfunctions of the Laplace operator on $\mathbb{R}$, the sum is an integral. Compare:

Let $e_\omega(t) = e^{2\pi i\omega t}$ for $\omega$ real. $$ \mbox{periodic ($\omega$ is an integral multiple of a base frequency): }\\ f(t) = \sum_\omega\langle f,e_\omega(t)\rangle e_\omega$$ $$ \mbox{nonperiodic ($\omega$ ranges over $\mathbb{R}$): }\\ f(t) = \int\langle f,e_\omega(t)\rangle e_\omega\ d\omega$$ where $$\langle f,e_\omega\rangle = \int f(x)\overline{e_\omega(x)}\ dx$$ You will recognize that if we integrate over the circle, $\langle f,e_\omega\rangle$ gives the series of Fourier coefficients and if we integrate over $\mathbb{R}$, it is the Fourier transform.


The Fourier series of a non-periodic function is really the Fourier series of its periodic extension. For example, there is a Fourier series of $f(x)=x$ on $[0,\pi]$, which is actually the Fourier series of the sawtooth wave that is formed by periodically extending $f(x)=x$. The Fourier series for a non-periodic function will not converge at every point but will still converge in the sense of $L^2$.

Also, Fourier series are not meant to be defined on the whole line, they are indeed meant to be defined on intervals. This has to do with the changes in the spectrum of the Laplacian as the domain increases: in the limit, the spectrum becomes dense, and you have to turn to the Fourier transform instead of Fourier series.


To answer the original question: it's a matter of convention or terminology. The most usual usage (as visible in the other answers and comments) is that "Fourier series" refers to that of a periodic function, or an extension-by-periodicity of a function on an interval to a periodic function on the line. In particular, a sum of sines and cosines, or exponentials, with some incommensurable periods, would often not be considered a Fourier series.

Yet, certainly such a thing is a sum of cosines and sines, or exponentials, so it's related in some ways. Such things were investigated at length in the early 20th century by Harald Bohr and others, in part to look at the behavior of Dirichlet series.

So, on one hand, in some contexts "Fourier series" means "of periodic function". In others, it might not.