<s>
Spectral	B-Algorithm
methods	I-Algorithm
are	O
a	O
class	O
of	O
techniques	O
used	O
in	O
applied	O
mathematics	O
and	O
scientific	O
computing	O
to	O
numerically	O
solve	O
certain	O
differential	O
equations	O
.	O
</s>
<s>
Spectral	B-Algorithm
methods	I-Algorithm
and	O
finite	B-Application
element	I-Application
methods	I-Application
are	O
closely	O
related	O
and	O
built	O
on	O
the	O
same	O
ideas	O
;	O
the	O
main	O
difference	O
between	O
them	O
is	O
that	O
spectral	B-Algorithm
methods	I-Algorithm
use	O
basis	O
functions	O
that	O
are	O
generally	O
nonzero	O
over	O
the	O
whole	O
domain	O
,	O
while	O
finite	B-Application
element	I-Application
methods	I-Application
use	O
basis	O
functions	O
that	O
are	O
nonzero	O
only	O
on	O
small	O
subdomains	O
(	O
compact	O
support	O
)	O
.	O
</s>
<s>
Consequently	O
,	O
spectral	B-Algorithm
methods	I-Algorithm
connect	O
variables	O
globally	O
while	O
finite	B-Application
elements	I-Application
do	O
so	O
locally	O
.	O
</s>
<s>
Partially	O
for	O
this	O
reason	O
,	O
spectral	B-Algorithm
methods	I-Algorithm
have	O
excellent	O
error	O
properties	O
,	O
with	O
the	O
so-called	O
"	O
exponential	O
convergence	O
"	O
being	O
the	O
fastest	O
possible	O
,	O
when	O
the	O
solution	O
is	O
smooth	O
.	O
</s>
<s>
In	O
the	O
finite	B-Application
element	I-Application
community	O
,	O
a	O
method	O
where	O
the	O
degree	O
of	O
the	O
elements	O
is	O
very	O
high	O
or	O
increases	O
as	O
the	O
grid	O
parameter	O
h	O
increases	O
is	O
sometimes	O
called	O
a	O
spectral	B-Algorithm
element	I-Algorithm
method	I-Algorithm
.	O
</s>
<s>
Spectral	B-Algorithm
methods	I-Algorithm
can	O
be	O
used	O
to	O
solve	O
differential	O
equations	O
(	O
PDEs	O
,	O
ODEs	O
,	O
eigenvalue	O
,	O
etc	O
)	O
and	O
optimization	O
problems	O
.	O
</s>
<s>
When	O
applying	O
spectral	B-Algorithm
methods	I-Algorithm
to	O
time-dependent	O
PDEs	O
,	O
the	O
solution	O
is	O
typically	O
written	O
as	O
a	O
sum	O
of	O
basis	O
functions	O
with	O
time-dependent	O
coefficients	O
;	O
substituting	O
this	O
in	O
the	O
PDE	O
yields	O
a	O
system	O
of	O
ODEs	O
in	O
the	O
coefficients	O
which	O
can	O
be	O
solved	O
using	O
any	O
numerical	B-Algorithm
method	I-Algorithm
for	I-Algorithm
ODEs	I-Algorithm
.	O
</s>
<s>
Spectral	B-Algorithm
methods	I-Algorithm
were	O
developed	O
in	O
a	O
long	O
series	O
of	O
papers	O
by	O
Steven	O
Orszag	O
starting	O
in	O
1969	O
including	O
,	O
but	O
not	O
limited	O
to	O
,	O
Fourier	O
series	O
methods	O
for	O
periodic	O
geometry	O
problems	O
,	O
polynomial	O
spectral	B-Algorithm
methods	I-Algorithm
for	O
finite	O
and	O
unbounded	O
geometry	O
problems	O
,	O
pseudospectral	B-Algorithm
methods	I-Algorithm
for	O
highly	O
nonlinear	O
problems	O
,	O
and	O
spectral	O
iteration	O
methods	O
for	O
fast	O
solution	O
of	O
steady-state	O
problems	O
.	O
</s>
<s>
The	O
implementation	O
of	O
the	O
spectral	B-Algorithm
method	I-Algorithm
is	O
normally	O
accomplished	O
either	O
with	O
collocation	B-Algorithm
or	O
a	O
Galerkin	B-Algorithm
or	O
a	O
Tau	O
approach	O
.	O
</s>
<s>
For	O
very	O
small	O
problems	O
,	O
the	O
spectral	B-Algorithm
method	I-Algorithm
is	O
unique	O
in	O
that	O
solutions	O
may	O
be	O
written	O
out	O
symbolically	O
,	O
yielding	O
a	O
practical	O
alternative	O
to	O
series	O
solutions	O
for	O
differential	O
equations	O
.	O
</s>
<s>
Spectral	B-Algorithm
methods	I-Algorithm
can	O
be	O
computationally	O
less	O
expensive	O
and	O
easier	O
to	O
implement	O
than	O
finite	B-Application
element	I-Application
methods	I-Application
;	O
they	O
shine	O
best	O
when	O
high	O
accuracy	O
is	O
sought	O
in	O
simple	O
domains	O
with	O
smooth	O
solutions	O
.	O
</s>
<s>
However	O
,	O
because	O
of	O
their	O
global	O
nature	O
,	O
the	O
matrices	O
associated	O
with	O
step	O
computation	O
are	O
dense	O
and	O
computational	O
efficiency	O
will	O
quickly	O
suffer	O
when	O
there	O
are	O
many	O
degrees	O
of	O
freedom	O
(	O
with	O
some	O
exceptions	O
,	O
for	O
example	O
if	O
matrix	O
applications	O
can	O
be	O
written	O
as	O
Fourier	B-Algorithm
transforms	I-Algorithm
)	O
.	O
</s>
<s>
For	O
larger	O
problems	O
and	O
nonsmooth	O
solutions	O
,	O
finite	B-Application
elements	I-Application
will	O
generally	O
work	O
better	O
due	O
to	O
sparse	O
matrices	O
and	O
better	O
modelling	O
of	O
discontinuities	O
and	O
sharp	O
bends	O
.	O
</s>
<s>
Compute	O
the	O
Fourier	B-Algorithm
transform	I-Algorithm
(	O
bj	O
,	O
k	O
)	O
of	O
g	O
.	O
</s>
<s>
Compute	O
the	O
Fourier	B-Algorithm
transform	I-Algorithm
(	O
aj	O
,	O
k	O
)	O
of	O
f	O
via	O
the	O
formula	O
(	O
)	O
.	O
</s>
<s>
Compute	O
f	O
by	O
taking	O
an	O
inverse	O
Fourier	B-Algorithm
transform	I-Algorithm
of	O
(	O
aj	O
,	O
k	O
)	O
.	O
</s>
<s>
Since	O
we	O
're	O
only	O
interested	O
in	O
a	O
finite	O
window	O
of	O
frequencies	O
(	O
of	O
size	O
n	O
,	O
say	O
)	O
this	O
can	O
be	O
done	O
using	O
a	O
fast	O
Fourier	B-Algorithm
transform	I-Algorithm
algorithm	O
.	O
</s>
<s>
where	O
is	O
the	O
viscosity	B-Application
coefficient	O
.	O
</s>
<s>
With	O
Fourier	O
transformed	O
initial	O
conditions	O
and	O
forcing	O
,	O
this	O
coupled	O
system	O
of	O
ordinary	O
differential	O
equations	O
may	O
be	O
integrated	O
in	O
time	O
(	O
using	O
,	O
e.g.	O
,	O
a	O
Runge	B-Algorithm
Kutta	I-Algorithm
technique	O
)	O
to	O
find	O
a	O
solution	O
.	O
</s>
<s>
The	O
nonlinear	O
term	O
is	O
a	O
convolution	B-Language
,	O
and	O
there	O
are	O
several	O
transform-based	O
techniques	O
for	O
evaluating	O
it	O
efficiently	O
.	O
</s>
<s>
One	O
can	O
show	O
that	O
if	O
is	O
infinitely	O
differentiable	O
,	O
then	O
the	O
numerical	O
algorithm	O
using	O
Fast	O
Fourier	B-Algorithm
Transforms	I-Algorithm
will	O
converge	O
faster	O
than	O
any	O
polynomial	O
in	O
the	O
grid	O
size	O
h	O
.	O
That	O
is	O
,	O
for	O
any	O
n>0	O
,	O
there	O
is	O
a	O
such	O
that	O
the	O
error	O
is	O
less	O
than	O
for	O
all	O
sufficiently	O
small	O
values	O
of	O
.	O
</s>
<s>
We	O
say	O
that	O
the	O
spectral	B-Algorithm
method	I-Algorithm
is	O
of	O
order	O
,	O
for	O
every	O
n>0	O
.	O
</s>
<s>
Because	O
a	O
spectral	B-Algorithm
element	I-Algorithm
method	I-Algorithm
is	O
a	O
finite	B-Application
element	I-Application
method	I-Application
of	O
very	O
high	O
order	O
,	O
there	O
is	O
a	O
similarity	O
in	O
the	O
convergence	O
properties	O
.	O
</s>
<s>
However	O
,	O
whereas	O
the	O
spectral	B-Algorithm
method	I-Algorithm
is	O
based	O
on	O
the	O
eigendecomposition	O
of	O
the	O
particular	O
boundary	O
value	O
problem	O
,	O
the	O
finite	B-Application
element	I-Application
method	I-Application
does	O
not	O
use	O
that	O
information	O
and	O
works	O
for	O
arbitrary	O
elliptic	O
boundary	O
value	O
problems	O
.	O
</s>
