Title: Numerical Methods
1Todays class
- Numerical Differentiation
- Finite Difference Methods
2Numerical Differentiation
- Finite Difference Methods
- Forward
- Backward
- Centered
- Error Magnitude
- O(h) for forward and backward
- O(h2) for centered
3Forward First Derivative
- Consider a function f(x) which can be expanded in
a Taylor series in the neighborhood of a point x
4Forward First Derivative
5Backward First Derivative
- Consider a function f(x) which can be expanded in
a Taylor series in the neighborhood of a point x
6Backward First Derivative
7Central First Derivative
8Central First Derivative
9Numerical Differentiation
102nd-order Forward Difference
11High-Accuracy Differentiation
12Forward Finite-Divided Difference
13Backward Difference Scheme
14Backward Finite-Divided Difference
15Centered Difference Scheme
16Centered Divided Difference
17Basic Differentiation
- Example
- Find derivative at x0.5, h0.25
- True
- Forward
18Basic Differentiation
- Example
- Backward
- Centered
19High-Accuracy Differentiation
- Forward
- Backward
- Centered
20Summary
- Forward Divided Difference method uses the value
of points in front of or at the point where the
derivative is calculated. - Backward Divided Difference method uses the value
of points behind of or at the point where the
derivative is calculated.
21Summary
- Centered Divided Difference uses the value of
points both in front and behind of the point
where the derivative is calculated. - Centered method is usually more accurate than
forward backward methods - Accurate formulas use more points in the
calculations.
22Richardson Extrapolation
- As with integration, use two approximations to
arrive at a better approximation - D is the true value but unknown and D(h1) is an
approximation based on the step size h1. Reducing
the step size to half, h2 h1/2, we obtained
another approximation D(h2). - By properly combining the two approximations,
D(h1) D(h2), the error is reduced to O(h4).
23Richardson Extrapolation
24Richardson Extrapolation
25Richardson Extrapolation
26Richardsons Extrapolation
- Example
- h0.5
- h0.25
- Extrapolate
27Unevenly Spaced Data
28Unevenly Spaced Data
29Unevenly Spaced Data
30Unevenly Spaced Data
31Unevenly Spaced Data
32Next class
- Ordinary Differential Equations
- Read Chapter PT7, 25