Last time | Next time |
Today:
"Beware of stencils!"
(Here is some Mathematica code to check and try to understand the motivating examples).
As examples, consider rules for differentiation, which use different stencils for the evaluation of \(f'(x_0)\):
If we're really lucky, we'll get through 4-7, and 17;
By making sure that our methods are exact for polynomials of degree \(n\) or lower
where \(n\) is chosen because we're using \(n+1\) data points (usually \(x_0,x_1,\ldots,x_n)\) as the backbone of our stencil.
"In particular, it must be exact for the polynomials $p_{j}(x)=(x-x_{0})^{j}, j=0,1,\ldots,n$." (p 143)
These polynomials for a basis for the space of all polynomials of degree \(n\) or lower. Since all of the operations we're considering are linear, if we know the answers for these polynomials we can build the answer for an arbitrary polynomial of degree \(n\) or lower.
(pp. 143-144).
We end up with a system of linear equations (so time to whip out that Gaussian elimination!:). But also sometimes symbolic manipulation, and so our author includes a little bit about Maxima in this chapter (Crumpet 29, p. 147).
Here's another picture of how we might build one of these.