Professional Documents
Culture Documents
MATH 4073 Numerical Analysis in Test Notes (Cheat Cheat Sheet) v4.0
MATH 4073 Numerical Analysis in Test Notes (Cheat Cheat Sheet) v4.0
MATH 4073 Numerical Analysis in Test Notes (Cheat Cheat Sheet) v4.0
( x) M )
• ea p p * a x b 384 0 j n 1 a x b
p p*
• er
p
• f pn 1
p n p n1
f ' pn 1
vi) Rationale
(1) S j-1 ( x j ) S j ( x j ) f ( x j ) (give 2 equations)
(2) S j-1 ' ( x j ) S j ' ( x j ) (give 1 equation)
(3) S j-1 " ( x j ) S j " ( x j ) (give 1 equation)
(4) Boundary Conditions (give 2 equations)
h (b a ) h 2
b n 1
i) Trapezoidal Rule ba
Numerical Differentiation f ( x)dx
2
f ( a ) 2 f ( x j ) f (b )
12
f " ( ) h
n
a j 1
• 1st Derivative
2h 6
12h 5
12h 30
nd
• 2 Derivative:
f ( x0 h) 2 f ( x0 ) f ( x0 2 h) h 2
f " ( x0 ) f ( 4 )
h 2 12
Numerical Integration
x2 5
h
ii) n=2: Simpson’s Rule
f ( x)dx f ( x0 ) 4 f ( x1 ) f ( x2 ) h f ( 4) ( )
x0
3 90
x3 5
3h
iii) n=3: Simpson’s 3 Rule
f ( x)dx f ( x0 ) 3 f ( x1 ) 3 f ( x2 ) f ( x3 ) 3h f (4) ( )
8 x0
8 80
x2 3
3h
ii) n=1: xx Rule
f ( x) dx f ( x0 ) f ( x1 ) 3h f " ( )
x1
2 4
• Composite
b n
• M N 1 ( h) K 1 h 2 K 2 h 4 K 3 h 6 ...
Gaussian Quadrature f ( x)dx ci f ( xi )
i 1
a
h
b
4 N 1 ( ) N 1 ( h)
• n 2: f ( x)dx f 0.5773502692 f 0.5773502692 N 2 ( h)
2
3
a
b
h
16 N 2 ( ) N 2 (h)
• n 3: f ( x)dx 0.555556 f 0.7745966692 0.88889 f 0 0.555556 f 0.7745966692
a
i) Step of h
N 3 ( h) 2
b
2 15
h
• n 4: f ( x)dx 0.347855 f 0.8611363116 0.652145 f 0.3399810436 4 j 1 N j 1 ( ) N j 1 (h)
a N ( h) 2
j j 1
4 1
0.347855 f 0.8611363116 0.652145 f 0.3399810436
b
• n 5: f ( x)dx 0.236927 f 0.9061798459 0.47863 f 0.5384693101 0.568889 f 0
a
h
0.236927 f 0.9061798459 0.47863 f 0.5384693101 16 N 1 ( ) N 1 (h)
4
N 2 ( h)
b a t (b a) b a
b 1
15
• Transformation of Boundary: f ( x)dx f 2 2 dt h
a 1 256 N 2 ( ) N 2 (h)
ii) Step of h 4
N 3 ( h)
4 255
Richardson’s Extrapolation h
16 N j 1 ( ) N j 1 (h)
j 1
wi h f (t i , wi )
h1 h
ii) Local Truncation Error O(h1 ) f ' i , y ( i ) f ' i , y ( i )
(1 1)! 2
• Order 2
i)
wi 1 wi hT ( 2 ) (t i , wi )
h
wi h f (t i , wi ) f ' (t i , wi )
2
ii) Local Truncation Error
h2 h2
O(h 2 ) f " i , y ( i ) f " i , y ( i )
( 2 1)! 6
• Order 3
i)
wi 1 wi hT (3) (t i , wi )
h h2
wi h f (t i , wi ) f ' (ti , wi ) f " (t i , wi )
2 6
h3 h3
ii) Local Truncation Error O( h 3 ) f (3)
i , y ( i ) f (3)
i , y ( i )
(3 1)! 24
Taylor’s Expansion of 2 variables
• f t , y Pn t , y Rn t , y
0 f t 0 , y0 t t 0 f
t 0 , y0 y y0 f t 0 , y0
t t 0
0! 1! t 1! y
t t0 2 2 f 2 t t 0 y y0 2 f y y0 2 2 f t , y
t 0 , y 0 t 0 , y 0 0 0
2! t 2 2! ty 2! y 2
t t0 3 3 f 3 t t 0 y y0 3 f
2
3 t t 0 y y 0 3 f
2
y y0 3 3 f t , y
t 0 , y 0 t 0 , y 0 t 0 , y 0 0 0
3! t 3 3! t 2 y 3! ty 2 3! y 3
Runge-Kutta Methods
1
• Taylor Method Order 2 a1 4
3
wi 1 wi hT ( 2 ) (t i , wi ) O(h 2 ) a2
4 w w h f (t , w ) 3 f (t 2h , w 2h f (t , w
4
i 1
h h2 2h i
i i i
3
i
3
i
wi h f (t i , wi ) f ' (t i , wi ) f " i , y ( i ) 2
2 6 3
2h
h df h2
wi h f (t i , wi ) * (t , y (t )) (t , y ( t )) ( ti , wi ) f " i , y (
2
i ) 3
2 dt 6
h f f •
dy h2
wi h f (t i , wi ) * (t , y (t )) (t , y (t )) * f " i , y ( i )
2
( t , y ( t ))( ti , wi ) ( t , y ( t )) ( ti , wi )
t y dt 6
h f f h2
wi h f (t i , wi ) * (t , y (t )) (t , y (t )) * f (t i , wi ) f " i , y ( i )
2
( t , y ( t )) ( ti , wi ) ( t , y ( t )) ( ti , wi )
t y 6
• Runge-Kutta Manipulation I
i) Use a f t , y to replace f (ti , wi ) h f ' (ti , wi ) of TM Order 2
1 1 1
2
ii) Taylor Polynomial of Degree 1 about t , y :
f
a1 f t 1 , y 1 a1 f t , y a11 t , y a11 f t , y a1R1 f t 1 , y 1
t y y
iii)
h h f f
f (ti , wi ) f ' (ti , wi ) f (ti , wi ) * (t , y (t )) ( t , y ( t ))( ti , wi ) (t , y (t )) * f (ti , wi ) ( t , y ( t ))( ti , wi )
2 2 t y
iv) Midpoint Method:
a1 1
h h h h2
1 wi 1 wi hf t i , wi f (t i , w )
i f " i , y ( i )
2 2 2 6
1 h f t , y
2
• Runge-Kutta Manipulation II
i) Use a f t , y a f t , y f t , y to replace f (ti , wi ) h f ' (ti , wi ) of TM Order 2
1 2 2 2
2
ii) M-Euler Method:
1
a1
2
a 1 h h2
2 wi 1 wi f (ti , wi ) f (ti 1 , wi hf (ti , wi )) f " i , y ( i )
2 2 6
h
2
2
h
iii) Heun’s Method: