Professional Documents
Culture Documents
Ch4 Truncation Errors Taylor Series
Ch4 Truncation Errors Taylor Series
Faculty of Engineering
Civil Engineering Department
Numerical Analysis
ECIV 3306
Chapter 4
Truncation Errors and Taylor Series
1
Introduction
Truncation errors
Result when approximations are used to
represent exact mathematical procedure
For example:
Taylors Theorem
General Expression
2
( 3)
3
(n)
n
f
'
'
(
x
)
h
f
(
x
)
h
f
(
x
)
h
i
i
i
f ( x i 1) f ( x i ) f ' ( x i )h
.......
Rn
2!
3!
n!
Where:
h xi 1 xi
Rn is the remainder term to account
for all terms from n+1 to infinity.
And
f ( n 1) ( ) n 1
Rn
h
(n 1)!
Taylors Theorem
Any smooth function can be approximated as
a polynomial
Zero-order approximation: only true if xi+1 and xi are
f ( xi 1) f ( xi )
First-order approximation: in form of a straight line
f ( xi 1) f ( xi ) f ' ( xi )h
Second-order approximation:
2
f
'
'
(
x
)
h
i
f ( x i 1 ) f ( x i ) f ' ( x i )h
2!
f ( xi 1) f ( xi ) Ro
f ' ( )
Ro
h
f ( xi 1) f ( xi )
f ( xi 1) f ( xi ) f ' ( xi )h
2!
(3)
'
(x ) - 2.4x - 0.9 , f
(x i )h 3
3!
(0) 0.9
2!
3!
4!
'
10
Taylor Series
In General, the n-th order Taylor Series will be exact
for n-th order polynomial.
For other differentiable and continuous functions,
such as exponentials and sinusoids, a finite number of
terms will not yield an exact estimate. Each additional
term will contribute some improvement.
Truncation error is decreased by addition of terms to
the Taylor series.
If h is sufficiently small, only a few terms may be
required to obtain an approximation close enough to
the actual value for practical purposes.
11
12
Example 2
13
Example 2
14
Example 2
15
Example 3
16
Example 3
x
3.0
3.2
3.4
3.6
3.8
4.0
4.2
4.4
4.6
4.8
5.0
5.2
5.4
5.6
5.8
6.0
6.2
6.4
6.6
6.8
7.0
h
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0
2.2
2.4
2.6
2.8
3.0
3.2
3.4
3.6
3.8
4.0
one term
170
170
170
170
170
170
170
170
170
170
170
170
170
170
170
170
170
170
170
170
170
two terms
170.0
234.8
299.6
364.4
429.2
494.0
558.8
623.6
688.4
753.2
818.0
882.8
947.6
1012.4
1077.2
1142.0
1206.8
1271.6
1336.4
1401.2
1466.0
three terms
170.00
244.52
338.48
451.88
584.72
737.00
908.72
1099.88
1310.48
1540.52
1790.00
2058.92
2347.28
2655.08
2982.32
3329.00
3695.12
4080.68
4485.68
4910.12
5354.00
four terms
170.00
245.22
344.05
470.67
629.26
824.00
1059.06
1338.61
1666.83
2047.90
2486.00
2985.30
3549.97
4184.19
4892.14
5678.00
6545.94
7500.13
8544.75
9683.98
10922.00
five terms
170.00
245.24
344.43
472.62
635.41
839.00
1090.16
1396.23
1765.14
2205.37
2726.00
3336.68
4047.63
4869.66
5814.13
6893.00
8118.80
9504.63
11064.18
12811.69
14762.00
six terms
170.00
245.24
344.44
472.69
635.74
840.00
1092.65
1401.61
1775.62
2224.26
2758.00
3388.22
4127.26
4988.47
5986.23
7136.00
8454.34
9958.99
11668.84
13604.04
15786.00
17
Example 3
18