central point
order
order
order
order
182
4. Series-Expansion Methods
tu away from
2nd
4th
6th
16th
spectral
1
0.500
0.667
0.750
0.889
1.006
2
-0.083 -0.150
- 0.311
-0.512
3
0.017
0.113
0.351
4
- 0.035
-0.274
5
0.009
0.232
6
-0.001
-0.207
7
0.000
0.192
8
-0.000
-0.186
TABLE 4.1. Comparison of weight accorded each grid point as a function of its distance
to the central grid point in centered finite differences and in a spectral method employing
17 expansion coefficients.
Order 0/Accuracy
The accuracy of a finite difference is characterized by the truncation error, which
is computed by estimating a smooth function's values at aseries of grid points
through the use of Taylor series, and by substituting those Taylor-series expansions into the finite-difference fonnula. Tbe discrepancy between the finite-difference calculation and the true derivative is the truncation error and is usually
proportional to some power of the grid intervaI. A conceptually similar characterization of accuracy is possible for the computation of spatial derivatives via the
spectral method .
Tbe basic idea is to examine the difference between the actual derivative of
a smooth function and the approximate derivative computed from the spectral
representation of the same function. Suppose that a function 1/1 (x) is periodic on
the domain -rr: :s x :s n and that the first few derivatives of 1/1 are continuous.
Tben 1/1 and its first derivative can be represented by the convergent Fourier series
00
1/I(x) = L ak ei kx•
k=-oo
(4.20)
and
order
order
order
order
182
4. Series-Expansion Methods
tu away from
2nd
4th
6th
16th
spectral
1
0.500
0.667
0.750
0.889
1.006
2
-0.083 -0.150
- 0.311
-0.512
3
0.017
0.113
0.351
4
- 0.035
-0.274
5
0.009
0.232
6
-0.001
-0.207
7
0.000
0.192
8
-0.000
-0.186
TABLE 4.1. Comparison of weight accorded each grid point as a function of its distance
to the central grid point in centered finite differences and in a spectral method employing
17 expansion coefficients.
Order 0/Accuracy
The accuracy of a finite difference is characterized by the truncation error, which
is computed by estimating a smooth function's values at aseries of grid points
through the use of Taylor series, and by substituting those Taylor-series expansions into the finite-difference fonnula. Tbe discrepancy between the finite-difference calculation and the true derivative is the truncation error and is usually
proportional to some power of the grid intervaI. A conceptually similar characterization of accuracy is possible for the computation of spatial derivatives via the
spectral method .
Tbe basic idea is to examine the difference between the actual derivative of
a smooth function and the approximate derivative computed from the spectral
representation of the same function. Suppose that a function 1/1 (x) is periodic on
the domain -rr: :s x :s n and that the first few derivatives of 1/1 are continuous.
Tben 1/1 and its first derivative can be represented by the convergent Fourier series
00
1/I(x) = L ak ei kx•
k=-oo
(4.20)
and
