Professional Documents
Culture Documents
EE-303 Numerical Analysis - NOTEBOOK
EE-303 Numerical Analysis - NOTEBOOK
1 Measuring Errors
A. Introduction to errors
1. Numerical method-is a method a numerical method is a
mathematical tool designed to solve numerical problems.
Here we use approximation that’s why we are prone to
committing errors
Types of Errors
A. True Error ( Et )
B. Relative True Error ( Et )
C. Approximate Error ( Ea )
D. Relative Approximate Error ( Ea )
_________________________________________________________________________
x E −x a
Et =
xE
9.5140−10.2646
Et =
9.5140
Et =−0.78894 “RELATIVE TRUE ERROR”
Et =0.78894 “ABSOLUTE RELATIVE
TRUE ERROR”
Et =78.894 % “PERCENT RELATIVE
TRUE ERROR”
APPROXIMATION”
' f ( x +h )−f (x )
f ( x )=
h
f’(2) at h=0.5
NOTE: The lower the value of ‘h’
the better our approximation is.
' f ( 2+ 0.5 )−f (2)
f ( 2 )=
0.5
' f ( 2.5 )−f (2)
f ( 2 )=
0.5
0.5(2.5 ) 0.5 (2)
7e −7 e
f ' ( 2 )=
0.5
' 24.432−19.028
f ( 2 )=
0.5
f ( 2 ) ≅ 9.6639 “PRESENT
'
APPROXIMATION”
Ea =x new−x old
Ea =9.6639−10.2646 Ea =−6307
ASSUMPTIONS:
f(0), f’(0), f’’(0), f’’’(0),…,fn(0) – known values
First Trial:
P(x) is an approximation of
First condition: f(0)=P(0)
the value of f(x) therefore
we can assume that
Example:
f(x)=5 f(x)=5
f(0)=5
-f(0) is constant or a
Second Trial: Function: coefficient.
Condition: P(x)=f(0)+f’(0)x
-Well put f’(0)x so
f(x)=P(x) P(0)= f(0) + f’(0)(0) =0
we could get f’(x).
f’(x)=P’(x) P(0)= f(0)
P’(x)=f(0)+f’(0)x
P’(0)=f(0)+f’(0)x -derivative of a
P’(0)=0+f’(0) constant f(0) is
Fourth Trial:
f(x)=P(x)
f’(x)=P’(x)
f’’(x)=P’’(x)
f’’’(x)=P’’’(x)
Function:
1 1
P(x)=f(0)+f’(0)x+ 2 f’’(0)x2+ 3∙ 2 f’’’(0)x3
1 1
P(0)=f(0)+f’(0)(0)+ 2 f’’(0)(0)2+ 6 f’’’(0)(0)3
P(0)=f(0)
2 1
P’(0)=f(0)+f’(0)+ 2 f’’(0)(x)2+ 6 f’’’(0)(x)3
2 1
P’(0)=f(0)+f’(0)+ 2 f’’(0)(0)2+ 6 f’’’(0)(0)3
P’(0)=f’(0)
NOTATION FORM
∞ n n
f ( 0) x
P ( x )=∑
n=0 n!
Example#2
Find the Maclaurin series for:
f(x)=sin(x) x=0
f(x) ≅ P(x)
1 1 1 1
P(x)=f(0)+f’(0)x+ 2 f’’(0)x2+ 3∙ 2 f’’’(0)x3+ 4 ∙ 3 ∙2 fIV(0)x4+ 5∙ 4 ∙3 ∙ 2
f n (0) x n
f (0)x +
V 5
n!
When n=0 When n=1 When n=2
f(x)=sin(x) f(x)=sin(x) f'(x)=cos(x)
f(x)=sin(0) f'(x)=cos(x) f''(x)=-sin(x)
f''(x)=-sin(0)
f(x)=0 f'(x)= cos(0)
f''(x)=0
f'(x)=1
1 1 1 1
P(x)=f(0)+f’(0)x+ 2 f’’(0)x2+ 3∙ 2 f’’’(0)x3+ 4 ∙ 3 ∙2 fIV(0)x4+ 5∙ 4 ∙3 ∙ 2
f n (0) x n
f (0)x +
V 5
n!
x 3 x5 x 7 x 9 x 11
sin ( x ) ≅ x− + − + − +… EXPANDED FORM
3 ! 5 ! 7! 9 ! 11 !