NUMERICAL ANALYSIS 1. Differentiation f ( x ) = g ′( x ) =
g (x ) − g (x − h ) h
2. Integration f ( x ) = ∫ g ( x )dx , initial f ( x )
f (x + h ) = f (x ) +
h [g (x ) + g (x + h )] 2
3. Solving non-linear equation , f ( x ) = 0 3.1. Bisection Method if f (a ) f (b ) < 0 , x ∈ [a, b] a+b c= 2 if f (a ) f (c ) < 0 , x ∈ [a, c ] or if f (c ) f (b ) < 0 , x ∈ [c, b]
3.2. Newton’s Method , 1 initial ( x n )
x n +1 = x n −
f (xn ) f ′( x n )
3.3. Secant Method , 2 initial (x n −1 , x n )
x n +1 = x n −
f ( x n )( x n − x n −1 ) f ( x n ) − f ( x n −1 )
4. Definite integration b
A = ∫ f (x )dx a
b−a h= n
4.1. Trapezoidal Method n −1 h⎡ ⎤ A = ⎢ f (a ) + 2∑ f (a + ih ) + f (b )⎥ 2⎣ i =1 ⎦ n = 1,2,3... e≤
(b − a )h 2 f ′′ − 12 b
f ′′ =
∫ f ′′(x )dx a
b−a
4.2. Simpson’s
f ′( x ) =
b a
b−a
1 Method 3
⎡ ⎤ n −1 n−2 h⎢ ⎥ A = ⎢ f (a ) + 4 ∑ f (a + ih ) + 2 ∑ f (a + ih ) + f (b )⎥ 3 i =1 i=2 ⎢ ⎥ i = odd i = even ⎣ ⎦ n = 2,4,6... e≤
(b − a )h 4 f (4 ) − 180 b
( ) ∫ f (x )dx
f (3 ) ( x )
4
f (4 ) =
a
b−a
4.3. Simpson’s
=
b a
b−a
3 Method 8
⎡ ⎤ n−2 n −3 n −1 h⎢ ⎥ A = ⎢ f (a ) + 3 ∑ f (a + ih ) + 3 ∑ f (a + ih ) + 2 ∑ f (a + ih ) + f (b )⎥ 3 i =1 i =3 i =2 ⎢ ⎥ i =1, 4 , 7.. i =3, 6 , 9... i = 2 , 5,8... ⎣ ⎦ n = 3,6,9... e≤
(b − a )h 4 f (4 ) − 80 b
( ) ∫ f (x )dx
f (3 ) ( x )
4
f (4 ) =
a
b−a
=
b−a
b a
5. Solving differential equation y ′( x ) = f ( x, y ) , initial y( x0 ) = y 0 5.1. Euler’s Method y ( xi + h ) = y ( xi ) + hf ( xi , y i ) 5.2. Runge-Kutta Method 1 y ( xi + h ) = y ( xi ) + (k1 + 2k 2 + 2k 3 + k 4 ) 6 k1 = hf ( xi , y i ) k ⎞ h ⎛ k 2 = hf ⎜ xi + , y i + 1 ⎟ 2 2⎠ ⎝ k ⎞ h ⎛ k 3 = hf ⎜ xi + , y i + 2 ⎟ 2 2⎠ ⎝ k 4 = hf ( xi + h, y i + k 3 ) 6. Interpolation polynomial 6.1. Discrete data , (xi , y i ) Minimized
∑ (P ( x ) − y ) i
2
i
For polynomial degree 2, P( x ) = a 0 + a1 x ⎡ n ⎢ ⎢⎣ ∑ x i
∑x ∑x
i 2
i
⎤ ⎡a0 ⎤ ⎡ ∑ yi ⎤ ⎥⎢ ⎥ = ⎢ ⎥ ⎥⎦ ⎣ a 1 ⎦ ⎣ ∑ x i y i ⎦
For polynomial degree 3, P ( x ) = a 0 + a1 x + a 2 x 2 ⎡ n ⎢ ⎢ ∑ xi 2 ⎢ ⎢⎣ ∑ x i
∑x ∑x ∑x
i 2
i
i
3
∑x ∑x ∑x
⎤ ⎡a ⎤ ⎡ y ⎤ ⎥⎢ 0 ⎥ ⎢ ∑ i ⎥ i ⎥ ⎢ a1 ⎥ = ⎢ ∑ x i y i ⎥ 4 ⎥ ⎢ a ⎥ ⎢⎣ ∑ x i 2 y i ⎥⎦ i ⎥⎣ 2 ⎦ ⎦ 2
i
3
6.2. Continues function, f ( x ) 1
Minimized
∫ (P(x ) − f (x ))
2
dx
−1
P( x ) = a 0 P0 ( x ) + a1 P1 ( x ) + a1 P1 ( x ) + ... , x ∈ [− 1,1]
P0 ( x ) = 1 P1 ( x ) = x
1 (3x 2 − 1) 2 1 P3 ( x ) = (5 x 3 − 3x ) 2 1 P4 ( x ) = (35 x 4 − 30 x 2 + 3) 8 1 P5 ( x ) = (63x 5 − 70 x 3 + 15 x ) 8 1 2k + 1 ak = f ( x )Pk ( x )dx 2 −∫1 P2 ( x ) =