applied numerical methods lec11
TRANSCRIPT
1
Numerical Differentiation
2
Taylor’s Theorem
h=(xi+1- xi)
High-Accuracy Differentiation Formulas
2ii1i
i hOh2
xf-
h
xfxfxf
ixx
idx
xdfxf
one more sample xi+2 = xi+1 + h
hOh
xfxfxf i1i
i
hOh
xfx2fxfxf
2
i1i2ii
2
2
i1i2ii1ii hOh
2h
xfxfxf-
h
xfxfxf
2
one extra sample xi+1 = xi + h
first-order accurate
second-order accurate
Big O notation describes the limiting behavior of a
function when the argument tends towards a particular
value or infinity, usually in terms of simpler functions.
Forward difference
xi1 xi xi+1
x
h
Backward difference
xi1 xi xi+1
x
h
Centered difference
xi1 xi xi+1
x
2h
First Derivatives
• Forward difference
• Backward difference
• Central difference
)x(f
i-2 i-1 i i+1 i+2
1i1i
1i1i
1i1i
1i1i
1ii
1ii
1ii
1ii
i1i
i1i
i1i
i1i
xx
yy
xx
)x(f)x(f)x(f
xx
yy
xx
)x(f)x(f)x(f
xx
yy
xx
)x(f)x(f)x(f
x
y
8
Forward Finite-Divided Difference Formulas
second-order accurate forward
difference formula for f’(x)
9
Backward Finite-Divided Difference Formulas
10
Centered Finite-Divided Difference Formulas
11
Example
hOh
xfxfxf i1i
i
12
13
Example of High-Accuracy Differentiation
14
Miscellaneous problems #1
15
16
Miscellaneous problems #2
17
18
Miscellaneous problems #3
19
20
Homework
1-
2-
3-
22
4-
5-