Beruflich Dokumente
Kultur Dokumente
c 2012 Brooks/Cole, Cengage Learning
Outline
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 2/1
Outline
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 3/1
Local Truncation Error
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 4/1
Local Truncation Error
Note
We really want to know how well the approximations generated by
the methods satisfy the differential equation, not the other way
around.
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 4/1
Local Truncation Error
Note
We really want to know how well the approximations generated by
the methods satisfy the differential equation, not the other way
around.
However, we dont know the exact solution so we cannot generally
determine this, and the local truncation will serve quite well to
determine not only the local error of a method but the actual
approximation error.
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 4/1
Local Truncation Error
Definition of LTE
The difference method
w0 =
wi+1 = wi + h(ti , wi ), for each i = 0, 1, . . . , N 1,
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 5/1
Local Truncation Error
Definition of LTE
The difference method
w0 =
wi+1 = wi + h(ti , wi ), for each i = 0, 1, . . . , N 1,
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 6/1
Local Truncation Error
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 6/1
Local Truncation Error
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 6/1
Local Truncation Error
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 7/1
Local Truncation Error
h2 00
y (ti+1 ) = y (ti ) + hf (ti , y (ti )) + y (i )
2
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 7/1
Local Truncation Error
h2 00
y (ti+1 ) = y (ti ) + hf (ti , y (ti )) + y (i )
2
so that the LTE is
h 00
i+1 (h) = y (i ), for some i in (ti , ti+1 )
2
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 7/1
Local Truncation Error
h2 00
y (ti+1 ) = y (ti ) + hf (ti , y (ti )) + y (i )
2
so that the LTE is
h 00
i+1 (h) = y (i ), for some i in (ti , ti+1 )
2
When y 00 (t) is known to be bounded by a constant M on [a, b], this
implies
h
|i+1 (h)| M
2
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 7/1
Local Truncation Error
h2 00
y (ti+1 ) = y (ti ) + hf (ti , y (ti )) + y (i )
2
so that the LTE is
h 00
i+1 (h) = y (i ), for some i in (ti , ti+1 )
2
When y 00 (t) is known to be bounded by a constant M on [a, b], this
implies
h
|i+1 (h)| M
2
so the local truncation error in Eulers method is O(h).
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 7/1
Outline
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 8/1
Using Taylors Theorem
Motivation
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 9/1
Using Taylors Theorem
Motivation
One way to select difference-equation methods for solving
ordinary differential equations is in such a manner that their local
truncation errors are O(hp ) for as large a value of p as possible,
...
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 9/1
Using Taylors Theorem
Motivation
One way to select difference-equation methods for solving
ordinary differential equations is in such a manner that their local
truncation errors are O(hp ) for as large a value of p as possible,
...
while keeping the number and complexity of calculations of the
methods within a reasonable bound.
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 9/1
Using Taylors Theorem
Motivation
One way to select difference-equation methods for solving
ordinary differential equations is in such a manner that their local
truncation errors are O(hp ) for as large a value of p as possible,
...
while keeping the number and complexity of calculations of the
methods within a reasonable bound.
Eulers method was derived by using Taylors Theorem with n = 1
to approximate the solution of the differential equation.
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 9/1
Using Taylors Theorem
Motivation
One way to select difference-equation methods for solving
ordinary differential equations is in such a manner that their local
truncation errors are O(hp ) for as large a value of p as possible,
...
while keeping the number and complexity of calculations of the
methods within a reasonable bound.
Eulers method was derived by using Taylors Theorem with n = 1
to approximate the solution of the differential equation.
Can we extend this technique of derivation to larger values of n in
order to find methods for improving the convergence properties of
difference methods?
Numerical Analysis (Chapter 5) Higher-Order Taylor Methods J D Faires & R L Burden 9/1
Higher-Order Taylor Methods
Assumption
The solution y (t) to the initial-value problem
y 0 = f (t, y ), a t b, y (a) = ,
y 0 = f (t, y ), a t b, y (a) = ,
h2 00 hn hn+1 (n+1)
y (ti+1 ) = y (ti ) + hy 0 (ti ) + y (ti ) + + y (n) (ti ) + y (i )
2 n! (n + 1)!
y 0 (t) = f (t, y (t)), y 00 (t) = f 0 (t, y (t)), ... y (k ) (t) = f (k 1) (t, y (t))
y 0 (t) = f (t, y (t)), y 00 (t) = f 0 (t, y (t)), ... y (k ) (t) = f (k 1) (t, y (t))
h2 00 hn hn+1 (n+1)
y (ti+1 ) = y (ti ) + hy 0 (ti ) + y (ti ) + + y (n) (ti ) + y (i )
2 n! (n + 1)!
y 0 (t) = f (t, y (t)), y 00 (t) = f 0 (t, y (t)), ... y (k ) (t) = f (k 1) (t, y (t))
h2 00 hn hn+1 (n+1)
y (ti+1 ) = y (ti ) + hy 0 (ti ) + y (ti ) + + y (n) (ti ) + y (i )
2 n! (n + 1)!
gives
h2 0
y (ti+1 ) = y (ti ) + hf (ti , y (ti )) + f (ti , y (ti )) +
2
hn hn+1 (n)
+ f (n1) (ti , y (ti )) + f (i , y (i ))
n! (n + 1)!
Derivation (Contd)
Derivation (Contd)
The difference-equation method corresponding to
h2 0
y (ti+1 ) = y (ti ) + hf (ti , y (ti )) + f (ti , y (ti )) +
2
hn hn+1 (n)
+ f (n1) (ti , y (ti )) + f (i , y (i ))
n! (n + 1)!
w0 =
wi+1 = wi + hT (n) (ti , wi ), for each i = 0, 1, . . . , N 1
where
h 0 hn1 (n1)
T (n) (ti , wi ) = f (ti , wi ) + f (ti , wi ) + + f (ti , wi )
2 n!
y 0 = y t 2 + 1, 0 t 2, y (0) = 0.5
d
f 0 (t, y (t)) = (y t 2 + 1) = y 0 2t = y t 2 + 1 2t
dt
d
f 0 (t, y (t)) = (y t 2 + 1) = y 0 2t = y t 2 + 1 2t
dt
so
h 0
T (2) (ti , wi ) = f (ti , wi ) + f (ti , wi )
2
d
f 0 (t, y (t)) = (y t 2 + 1) = y 0 2t = y t 2 + 1 2t
dt
so
h 0
T (2) (ti , wi ) = f (ti , wi ) + f (ti , wi )
2
h
= wi ti2 + 1 + (wi ti2 + 1 2ti )
2
d
f 0 (t, y (t)) = (y t 2 + 1) = y 0 2t = y t 2 + 1 2t
dt
so
h 0
T (2) (ti , wi ) = f (ti , wi ) + f (ti , wi )
2
h
= wi ti2 + 1 + (wi ti2 + 1 2ti )
2
h
= 1+ (wi ti2 + 1) hti
2
w0 = 0.5
w0 = 0.5
h 2
wi+1 = wi + h 1 + wi ti + 1 hti
2
w0 = 0.5
h 2
wi+1 = wi + h 1 + wi ti + 1 hti
2
0.2 2
= wi + 0.2 1 + (wi 0.04i + 1) 0.04i
2
w0 = 0.5
h 2
wi+1 = wi + h 1 + wi ti + 1 hti
2
0.2 2
= wi + 0.2 1 + (wi 0.04i + 1) 0.04i
2
= 1.22wi 0.0088i 2 0.008i + 0.22
All the approximations and their errors are shown in the following table.
f 0 (t, y (t)) = y t 2 + 1 2t
f 0 (t, y (t)) = y t 2 + 1 2t
d
f 00 (t, y (t)) = (y t 2 + 1 2t)
dt
f 0 (t, y (t)) = y t 2 + 1 2t
d
f 00 (t, y (t)) = (y t 2 + 1 2t) = y 0 2t 2
dt
f 0 (t, y (t)) = y t 2 + 1 2t
d
f 00 (t, y (t)) = (y t 2 + 1 2t) = y 0 2t 2
dt
= y t 2 + 1 2t 2
f 0 (t, y (t)) = y t 2 + 1 2t
d
f 00 (t, y (t)) = (y t 2 + 1 2t) = y 0 2t 2
dt
= y t 2 + 1 2t 2 = y t 2 2t 1
f 0 (t, y (t)) = y t 2 + 1 2t
d
f 00 (t, y (t)) = (y t 2 + 1 2t) = y 0 2t 2
dt
= y t 2 + 1 2t 2 = y t 2 2t 1
d
and f 000 (t, y (t)) = (y t 2 2t 1)
dt
f 0 (t, y (t)) = y t 2 + 1 2t
d
f 00 (t, y (t)) = (y t 2 + 1 2t) = y 0 2t 2
dt
= y t 2 + 1 2t 2 = y t 2 2t 1
d
and f 000 (t, y (t)) = (y t 2 2t 1) = y 0 2t 2
dt
f 0 (t, y (t)) = y t 2 + 1 2t
d
f 00 (t, y (t)) = (y t 2 + 1 2t) = y 0 2t 2
dt
= y t 2 + 1 2t 2 = y t 2 2t 1
d
and f 000 (t, y (t)) = (y t 2 2t 1) = y 0 2t 2
dt
= y t 2 2t 1
h 0 h2 h3 000
T (4) (ti , wi ) = f (ti , wi ) + f (ti , wi ) + f 00 (ti , wi ) + f (ti , wi )
2 6 24
h 0 h2 h3 000
T (4) (ti , wi ) = f (ti , wi ) + f (ti , wi ) + f 00 (ti , wi ) + f (ti , wi )
2 6 24
h
= wi ti2 + 1 + (wi ti2 + 1 2ti )
2
h2 h3
+ (wi ti2 2ti 1) + (wi ti2 2ti 1)
6 24
h 0 h2 h3 000
T (4) (ti , wi ) = f (ti , wi ) + f (ti , wi ) + f 00 (ti , wi ) + f (ti , wi )
2 6 24
h
= wi ti2 + 1 + (wi ti2 + 1 2ti )
2
h2 h3
+ (wi ti2 2ti 1) + (wi ti2 2ti 1)
6 24
h h2 h3 h2
2 h
= 1+ + + (wi ti ) 1 + + (hti )
2 6 24 3 12
h h2 h3
+1+
2 6 24
w0 = 0.5,
h h2 h3 h2
2 h
wi+1 = wi + h 1 + + + (wi ti ) 1 + + hti
2 6 24 3 12
h h2 h3
+1+
2 6 24
for i = 0, 1, . . . , N 1.
for each i = 0, 1, . . . , 9.
All the approximations and their errors are shown in the following table.
Theorem
If Taylors method of order n is used to approximate the solution to
with step size h and if y C n+1 [a, b], then the local truncation error is
O(hn ).
Proof (1/2)
Proof (1/2)
When deriving Taylor Methods, we obtained the expression
h2 00 hn hn+1 (n+1)
y (ti+1 ) = y (ti ) + hy 0 (ti ) + y (ti ) + + y (n) (ti ) + y (i )
2 n! (n + 1)!
Proof (1/2)
When deriving Taylor Methods, we obtained the expression
h2 00 hn hn+1 (n+1)
y (ti+1 ) = y (ti ) + hy 0 (ti ) + y (ti ) + + y (n) (ti ) + y (i )
2 n! (n + 1)!
h2 0 hn
yi+1 yi hf (ti , yi ) f (ti , yi ) f (n1) (ti , yi )
2 n!
hn+1 (n)
= f (i , y (i ))
(n + 1)!
Proof (2/2)
h2 0 hn
yi+1 yi hf (ti , yi ) f (ti , yi ) f (n1) (ti , yi )
2 n!
hn+1 (n)
= f (i , y (i ))
(n + 1)!
Proof (2/2)
So the local truncation error is
yi+1 yi hn
i+1 (h) = T (n) (ti , yi ) = f (n) (i , y (i ))
h (n + 1)!
for each i = 0, 1, . . . , N 1.
h2 0 hn
yi+1 yi hf (ti , yi ) f (ti , yi ) f (n1) (ti , yi )
2 n!
hn+1 (n)
= f (i , y (i ))
(n + 1)!
Proof (2/2)
So the local truncation error is
yi+1 yi hn
i+1 (h) = T (n) (ti , yi ) = f (n) (i , y (i ))
h (n + 1)!
w0 =
wi+1 = wi + hT (n) (ti , wi ), for each i = 0, 1, . . . , N 1
where
h 0 hn1 (n1)
T (n) (ti , wi ) = f (ti , wi ) + f (ti , wi ) + + f (ti , wi )
2 n!
Return to Example on Taylors 2nd Order Method