Last time | Next time |
Today:
This was a great opportunity to use Octave! Those calculations by hand are painful. Save yourself all that pain!
What should we use?
There is an assignment for section 4.3 which will serve as a take home component (again, 30%) of the exam. You may submit it by Friday.
So 4.3 will not be explicitly covered on the in-class portion.
We noted that the formula includes two important parts: a derivative, and a power of \(h\): the error is of the form $O(h^{n}f^{(k)}(\xi_{h}))$.
The power of \(h\) tells us the rate of convergence -- how fast the method converges as the step size \(h\) tends to 0; the derivative \(k\) tells us the degree of precision (the power of the polynomial that the method gets right). Polynomials of degree \(k-1\) vanish under \(k\) derivatives, so those polynomials will be evaluated without error using the scheme.
(Note: there is an error in one of the formulas in the tables at the end of the section. What do you have when you have an error in your error formula?:)
We used the two-point backward and forward difference formulas to derive the three-point centered difference formula, by "balancing errors".
While there is no motivation for this, the author shows that it works. Maybe it's just magic.... or a good project?
Let's see how to use Taylor series to derive a more specific error formula for the first formula of this class, the midpoint method: \[ I = \int_{x_0-h}^{x_0+h}f(x)dx \approx M = 2h f(x_0) \] (given as $O(h^{3}f^{''}(\xi_{h}))$ in the table).
For the derivation of the error term, we rely on the weighted mean value theorem for integrals (which is found on page 158 of the text).
But the idea is really swell, and I am delighted by this method!
Here's another picture of how we might build one of these.