![Page 1: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/1.jpg)
Today’s class
• Numerical Differentiation• Finite Difference Methods
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
1
![Page 2: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/2.jpg)
Numerical Differentiation
• Finite Difference Methods• Forward• Backward• Centered
• Error Magnitude• O(h) for forward and backward• O(h2) for centered
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
2
![Page 3: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/3.jpg)
Forward First Derivative
• Consider a function f(x) which can be expanded in a Taylor series in the neighborhood of a point x
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
3
![Page 4: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/4.jpg)
Forward First Derivative
Numerical MethodLecture 14
Prof. Jinbo BiCSE, UConn
4
![Page 5: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/5.jpg)
Backward First Derivative
• Consider a function f(x) which can be expanded in a Taylor series in the neighborhood of a point x
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
5
![Page 6: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/6.jpg)
Backward First Derivative
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
6
![Page 7: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/7.jpg)
Central First Derivative
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
7
![Page 8: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/8.jpg)
Central First Derivative
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
8
![Page 9: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/9.jpg)
Numerical Differentiation
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
9
![Page 10: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/10.jpg)
2nd-order Forward Difference
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
10
![Page 11: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/11.jpg)
High-Accuracy Differentiation
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
11
![Page 12: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/12.jpg)
Forward Finite-Divided Difference
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
12
![Page 13: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/13.jpg)
Backward Difference Scheme
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
13
+
![Page 14: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/14.jpg)
Backward Finite-Divided Difference
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
14
![Page 15: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/15.jpg)
Centered Difference Scheme
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
15
![Page 16: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/16.jpg)
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
16
Centered Divided Difference
![Page 17: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/17.jpg)
• Example:
• Find derivative at x=0.5, h=0.25• True
• Forward
Basic Differentiation
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
17
![Page 18: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/18.jpg)
• Example:• Backward
• Centered
Basic Differentiation
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
18
![Page 19: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/19.jpg)
• Forward
• Backward
• Centered
High-Accuracy Differentiation
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
19
![Page 20: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/20.jpg)
• 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.
Summary
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
20
![Page 21: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/21.jpg)
• 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.
Summary
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
21
![Page 22: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/22.jpg)
• 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).
Richardson Extrapolation
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
22
![Page 23: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/23.jpg)
Richardson Extrapolation
2)( hhE
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
23
![Page 24: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/24.jpg)
Richardson Extrapolation
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
24
![Page 25: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/25.jpg)
Richardson Extrapolation
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
25
![Page 26: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/26.jpg)
• Example:• h=0.5
• h=0.25
• Extrapolate
Richardson’s Extrapolation
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
26
![Page 27: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/27.jpg)
Unevenly Spaced Data
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
27
![Page 28: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/28.jpg)
Unevenly Spaced Data
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
28
![Page 29: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/29.jpg)
Unevenly Spaced Data
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
29
![Page 30: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/30.jpg)
Unevenly Spaced Data
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
30
![Page 31: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/31.jpg)
Unevenly Spaced Data
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
31
![Page 32: Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1](https://reader036.vdocument.in/reader036/viewer/2022062320/56649f435503460f94c62c20/html5/thumbnails/32.jpg)
Next class
• Ordinary Differential Equations• Read Chapter PT7, 25
Numerical MethodsLecture 14
Prof. Jinbo BiCSE, UConn
32