Three different classes of real functions are represented in the tests.
Two of the examples chosen are of continuous functions, namely the
triangular wave and the parabolic wave, the latter being also
differentiable. In these two cases the Fourier series converge quite
rapidly, since the Fourier coefficients , with
, behave for large values of
as
in
the first case and as
in the second, with the consequence that
the improvement obtained with the use of the center series is modest. All
the remaining examples involve discontinuous functions. In the case of the
two forms of sawtooth wave and the two forms of square wave the functions
are discontinuous, but limited. These series converge much slower that the
previous ones, having coefficients that behave as
for large values
of
, and in this case the use of the first-order center series produces
very significant improvements in the rhythm of convergence, and sometimes
very large ones.
The two remaining examples are simple series concocted to be convergent
almost everywhere but to have coefficients that behave as for
large values of
, and which due to this converge much slower than those
in the previous class of discontinuous functions. The resulting functions
are not limited, being in fact logarithmically divergent at a single
point. In this case the use of the center series produces truly enormous
advantages, to the point where it is not even possible to measure the
improvement in some cases, due to the enormous time it would take to
complete the standard Fourier runs, which could run up to many years of
CPU time. In this case the use of the center series, and in particular of
the second-order center series, represents the qualitative difference
between being able to deal with these functions with numerical ease and
not being able to deal with them at all by numerical means.
The numerical tests were executed on a one-dimensional regular lattice of
points defining a set of intervals between
and
, these two points being identified with each other by
periodic boundary conditions. The special points, which correspond to the
singularities of
on the unit circle, and where the representation
of the real functions by the center series is not defined, were excluded
from the set of lattice points. At each remaining point the two types of
series were added up until the absolute value of the difference between
the approximate value obtained and the known exact result fell below the
required threshold. Some care was taken to avoid mistaking for convergence
the mere accidental passages through the limiting value during
oscillations. In the case of the simple piece-wise functions used as
examples the exact result is known because we have piece-wise expressions
in closed form for these functions. However, in some cases, and in
particular for the Fourier Conjugate functions of all the functions used
as examples, no such expressions in closed form are available.
In all the cases where exact expressions in closed form for the limiting
functions are not available the following strategy was used. First, the
limiting function was obtained numerically to a high degree of precision
at all the points of the lattice to be used in the tests. The precision
target for these calculations was set at
, while the
comparison tests were performed for target precisions ranging from
to
. Of course the operation of
adding up the series to such high level of precision typically takes a
long time. In fact, in most cases it is practically impossible to do this
using the Fourier series. Therefore, we used the first-order center series
for some of these preliminary calculations. This worked well in the case
of the better-behaved examples, namely for those involving functions which
are at least continuous. In all other cases, namely those involving
discontinuous functions, even the first-order center series took too long
to achieve the desired high level of precision, so that in these cases we
used the second-order center series, which in all cases was sufficient for
our ends. The derivation of these second-order series can also be found in
Appendix A.
In the tables shown in Appendix B we report the number of
series terms which were added in each case, for each series and for each
level of precision to be achieved. We report two results in each case, the
average number of terms added, considering all the valid lattice points in
the interval , and the maximum number of terms added at any
single point. This usually corresponds to the points right next to a
special point, since these in turn correspond to singularities of
on the complex plane. The ratios reported express how much more efficient
the first-order center series is, as compared to the original DP Fourier
series.
For each example worked out we give explicitly, in the next few
sub-sections, the DP Fourier series and the corresponding first-order
center series, for both the original function and the corresponding FC
function. When it is the case, the second-order center series is also
given. The special points are listed explicitly, as well as the value of
the original DP function at those points. In the graphs shown in this
paper both the original DP function and the FC function are plotted using
the results from calculations with first-order center series added up to
precision
, on the same graph, in order to illustrate
the general behavior of the functions.
![]() |
The source code for all the programs used for the numerical calculations
in this paper is freely available online on the web [3]. The
compilation structure which is included with them is meant to work on
Linux systems, and all the data reported was produced on a Debian-Linux
distribution version running on
GHz AMD64 hardware with
GB of RAM and two CPUs. These were Intel quad-core Xeon CPUs with
hyper-threading capabilities, but no parallelization of any kind was
included in the programs. Therefore, all processing times reported are
single-CPU, single-core times. Very little was done by hand in the way of
optimization, which was mostly done automatically by the compiler.
However, we do report the time of each run, in order to give some idea of
the absolute efficiency which may be accomplished in practice with each
type of series.