Title: Lecture 24 Numerical Differentiation
1Lecture 24 - Numerical Differentiation
- CVEN 302
- October 22, 2001
2Lectures Goals
- Finite Difference Schemes
- Taylor Series Expansion for Differentiation
- Lagrange differentiation
- Partial Derivatives
- Richardson Extrapolation
3Numerical differentiation
A Taylor series or LaGrange interpolation of
points can be used to find the derivatives. The
Taylor series expansion is defined as
4First Derivative at a Point
i-2 i-1 i
i1 i2
5Numerical differentiation
Use the Taylor series expansion to represent
three points about single location
6Numerical differentiation
Assume that the data points are equally spaced
and the equations can be written as
7Forward differentiation
For a forward first derivative, subtract eqn2
from eqn1
Rearrange the equation
8Forward differentiation
As the Dx gets smaller the error will get smaller
The error is defined as
9Backward differentiation
Subtract eqn3 from eqn2
The error is defined as
10Central differentiation
Subtract eqn3 from eqn1
The error is defined as
11Differential Error
Notice that the errors of the forward and
backward 1st derivative of the equations have an
error of the order of O(Dx) and the central
differentiation has an error of order O(Dx2).
The central difference has an better accuracy and
lower error that the others. This can be
improved by using more terms to model the first
derivative.
12Numerical differentiation
If you want to improve the accuracy and decrease
the error you will need to eliminate terms
13Higher Order Errors in Differentiation
The terms become
The terms become A-3, B 4 and C-1
14Higher order 1st derivative
Parabolic curve
i-2 i-1 i
i1 i2
15Higher Order Derivatives
To find higher derivatives, use the Taylor series
expansions of term and eliminate the terms from
the sum of equations. To improve the error in
the problem add additional terms.
162nd Derivative of the function
It will require three terms to get a central 2nd
derivative of discrete set of data.
172nd order Central Difference
The terms become
The terms become A1,B-2 and C1. Therefore
18Lagrange Differentiation
Another form of differentiation is to use the
Lagrange interpolation between three points. The
values can be determine for unevenly spaced
points. Given
19Lagrange Differentiation
Differentiate the Lagrange interpolation
Assume a constant spacing
20Lagrange Differentiation
Differentiate the Lagrange interpolation
Various locations
21Lagrange Differentiation
To find a higher order derivative from the
Lagrange interpolation for a three point Lagrange
Take the derivative
22Partial Derivatives
- Straightforward extension of one-dimensional
formula
(i, j2)
(i, j1)
(i1, j1)
(i-1, j1)
(i-2, j)
(i-1, j)
(i, j)
(i1, j)
(i2, j)
(i, j-1)
(i-1, j-1)
(i1, j-1)
(i, j-2)
23(i, j2)
(i, j1)
(i1, j1)
(i-1, j1)
(i-2, j)
(i-1, j)
(i, j)
(i1, j)
(i2, j)
(i, j-1)
(i-1, j-1)
(i1, j-1)
(i, j-2)
24Partial Derivatives
Laplacian Operator
j1
j
j-1
i-1
i
i1
25Partial Derivatives
Mixed Derivative
j1
j
j-1
i-1
i
i1
26Bi-harmonic Operator
j2
j1
j
j-1
j-2
i-1
i1
i-2
i2
i
27Summary
- Finite Difference Technique (Taylor Series)
- Error Calculation
28Summary
- Finite Difference Techniques
- Forward Difference Scheme
- Backward Difference Scheme
- Central Difference Scheme
29Summary
30Homework
- Check the Homework webpage