Professional Documents
Culture Documents
Chapter 1 Lecture 2
Taylor Series
Taylor Series
f (x)
f ( xi 1 )
f ( xi )
h
xi
xi 1
f ( xi 1 ) f ( xi h)
f " ( xi ) 2 f " ' ( xi ) 3
f ( n ) ( xi ) n
f ( xi ) f ' ( xi )h
h
h ...
h Rn
2!
3!
n!
Taylor Series
Rn
where h xi 1 xi and
terms from n+1 to infinity:
Rn
k n 1
f ( k ) ( xi ) k f ( n 1) ( ) n 1
h
h
k!
(n 1)!
xi and xi 1.
where
Rn O (h n 1 )
O(h n 1 )
Taylor Series
f ( xi 1 ) f ( xi )
f ( xi 1 ) f ( xi ) f ' ( xi )h
The second-order Taylor series approx. is
and so on.
f ( xi 1 ) f ( xi ) f ' ( xi )h
f " ( xi ) 2
h
2!
Taylor Series
Substitute xi 1 xi h and thus h x xi we get
f " ( xi )
f ( n ) ( xi )
2
f ( x) f ( xi ) f ' ( xi )( x xi )
( x xi ) ...
( x xi ) n Rn
2!
n!
This series is called Taylor series expansion of f(x)
around the point xi.
f ( x)
f ( xi )
xi
h
Maclaurin Series
xi 0
f " ( 0) 2
f ( n ) ( 0) n
f ( x ) f ( 0) f ' ( 0) x
x ...
x ...
2!
n!
This series is called Maclaurin series expansion of f(x).
Example 1
Solution
The step size
h xi 1 xi 1 0 1
We have
f (0) 1.2
( 3)
(4)
( x) 2.4 x 0.9
f ( 3) (0) 0.9
( x) 2.4
f ( 4 ) (0) 2.4
Solution
The true value of f(x) at
xi 1 1
is
Solution
The second-order approx. is
f " (0) 2
h 0.45
2!
Solution
Et | 0.2 0.2 | 0
Example 2
f ( x) cos x
at
xi 1 3
Solution
h xi 1 xi 3 4 12
The step size
xi 1 3
The true value at
is f ( 3 ) cos( 3 ) 0.5
f ( xi 1 ) f ( xi )
f ( 3 ) f ( 4 ) cos( 4 ) 0.707106781
0.5 0.707106781
100% 41.4%
0.5
Solution
The first-order approx. is
f ( xi 1 ) f ( xi ) f ' ( xi )h
f ( 3 ) f ( 4 ) f ' ( 4 )( 12
) cos( 4 ) sin( 4 )( 12
) 0.521986659
0.5 0.521986659
100% 4.40%
0.5
Solution
The second-order approx. is
f " ( xi ) 2
h
2!
cos( 4 ) 2
f ( 3 ) cos( 4 ) sin( 4 )( 12 )
( 12 ) 0.497754491
2
f ( xi 1 ) f ( xi ) f ' ( xi )h
0.5 0.497754491
100% 0.449%
0.5
Solution
The third-order approx. is
f ( 3 ) cos( 4 ) sin( 4 )( 12 )
( 12 )
( 12 )
2!
3!
0.499869147
f ( xi 1 ) f ( xi ) f ' ( xi )h
0.5 0.499869147
t
100% 0.0262%
0.5
Solution
The fifth-order approx. is
cos( 4 ) 2 sin( 4 ) 3
f ( ) cos( ) sin( )( )
( 12 )
( 12 )
2!
3!
cos( 4 ) 4 sin( 4 ) 5
( 12 )
( 12 ) 0.500000304
4!
5!
12
Example 3
t 0.5
f (t )
t 3e t
Example 3
Solution
(a) Here
f (t ) t 3et
f ( 0) 0
f ' ( 0) 0 t
f " ( 0) 0
f ( 3) (t ) (6 18t 9t 2 t 3 )e t
f (3) (0) 6
f ( 4 ) (0) 24
f (5) (0) 60
f ( 6) (0) 120
f (t ) t 3 t 4 12 t 5 16 t 6
Solution
k f (0.5) (0.5) e
0.206090158
f (t ) t 3
0.206090158 0.125
100% 39.35%
0.206090158
Solution
Second estimate:
f (t ) t 3 t 4
k f (0.5) (0.5) 3 (0.5) 4 0.1875
0.206090158 0.1875
100% 9.0204%
0.206090158
0.1875 0.125
100% 33.33% s 10%
0.1875
Solution
Third estimate:
f (t ) t 3 t 4 12 t 5
k f (0.5) (0.5)3 (0.5) 4 12 (0.5)5 0.203125
0.206090158 0.203125
100% 1.4388%
0.206090158
0.203125 0.1875
100% 7.6923% s 10%
0.203125
Solution