Module 1 - Introduction To Numerical Methods PDF
Module 1 - Introduction To Numerical Methods PDF
k =0 k!
f ' (c ) f '' (c ) f (n ) (c )
f ( x ) = f (c ) + (x − c ) + + (x − c ) + + (x − c )n + Rn (x )
2
1! 2! n!
f (n +1) (a )
Rn (x ) = (x − a )n+1 The function Rn(x) represents the error
(n + 1)! where a is a value between x and c.
TAYLOR SERIES
Examples of Taylor Series
Because the higher derivatives of
n
1
some functions repeat in a = x k = 1 + x + x 2 + x3 +
recognizable pattern we are able to 1 − x k =0
k 2 3
get a few "standard" Taylor Series x x x x
ex = = 1+ + + +
expansions. k = 0 k! 1! 2! 3!
sin x =
n
(− 1) x 2 k +1
k
x3 x5
= x − +
k = 0 (2k + 1)! 3! 5!
cos x =
n
( − 1) x 2 k
k
x2 x4
= 1− +
k =0 (2k )! 2! 4!
TRUE ERROR AND RELATIVE ERROR
1
0.333333
3
2 1.4142...
TRUE ERROR AND RELATIVE ERROR
Why measure errors?
• To determine the accuracy of numerical results.
• To develop stopping criteria for iterative algorithms.
TRUE ERROR AND RELATIVE ERROR
MEASURE OF ERRORS:
EXAMPLE
• Let the true value of p be 3.1415926535898 and its approximation be
3.14 as usual. Compute the absolute error and relative error of such an
approximation.