Numerical Analysis: X F Initial DX X G X F

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

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 )


f (xn )
x n +1 = x n −
f ′( x n )

3.3. Secant Method , 2 initial (x n −1 , x n )


f ( x n )( x n − x n −1 )
x n +1 = x n −
f ( x n ) − f ( x n −1 )

4. Definite integration
b
A = ∫ f (x )dx
a

b−a
h=
n
4.1. Trapezoidal Method
h⎡ n −1

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 ′′(x )dx
b
f ′( x )
a
f ′′ = a
=
b−a b−a

1
4.2. Simpson’s 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
b
f (3 ) ( x )
( )
4

a
f (4 ) = a
=
b−a b−a

3
4.3. Simpson’s Method
8
⎡ ⎤
n−2 n −3
h⎢ n −1

A = ⎢ f (a ) + 3 ∑ f (a + ih ) + 3 ∑ f (a + ih ) + 2 ∑ f (a + ih ) + f (b )⎥
3 i =1 i =2 i =3
⎢ ⎥
⎣ i =1, 4 , 7.. i = 2 , 5,8... i =3, 6 , 9... ⎦
n = 3,6,9...

e≤
(b − a )h 4 f (4 )
− 80
b

∫ f (x )dx
b
f (3 ) ( x )
( )
4

a
f (4 ) = 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


y ( xi + h ) = y ( xi ) + (k1 + 2k 2 + 2k 3 + k 4 )
1
6
k1 = hf ( xi , y i )
⎛ h k ⎞
k 2 = hf ⎜ xi + , y i + 1 ⎟
⎝ 2 2⎠
⎛ h k ⎞
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 )
∑ (P ( x ) − y )
2
Minimized i i

For polynomial degree 2, P( x ) = a 0 + a1 x


⎡ n

∑x i ⎤ ⎡a0 ⎤ ⎡ ∑ yi ⎤
⎥⎢ ⎥ = ⎢ ⎥
⎢⎣ ∑ x i ∑x ⎥⎦ ⎣ a 1 ⎦ ⎣ ∑ x i y i ⎦
2
i

For polynomial degree 3, P ( x ) = a 0 + a1 x + a 2 x 2


⎡ n ∑x ∑x ⎤ ⎡a ⎤ ⎡
⎥⎢ 0 ⎥ ⎢ ∑ i ⎥
2
y ⎤
⎢ i i

⎢ ∑ xi ∑x ∑x i ⎥ ⎢ a1 ⎥ = ⎢ ∑ x i y i ⎥
2 3
i
⎢ 4 ⎥
⎢ a ⎥ ⎢⎣ ∑ x i 2 y i ⎥⎦
⎢⎣ ∑ x i ∑x ∑x
2 3
i ⎥⎣ 2 ⎦
i

6.2. Continues function, f ( x )
1

∫ (P(x ) − f (x ))
2
Minimized dx
−1

P( x ) = a 0 P0 ( x ) + a1 P1 ( x ) + a1 P1 ( x ) + ... , x ∈ [− 1,1]
P0 ( x ) = 1
P1 ( x ) = x

P2 ( x ) =
1
2
(3x 2 − 1)
P3 ( x ) = (5 x 3 − 3x )
1
2
P4 ( x ) = (35 x 4 − 30 x 2 + 3)
1
8
P5 ( x ) = (63x 5 − 70 x 3 + 15 x )
1
8
2k + 1
1
f ( x )Pk ( x )dx
2 −∫1
ak =

You might also like