Beruflich Dokumente
Kultur Dokumente
Exercise #5
1. Consider the total error of the first order numerical differentiation method in the IEEE double
precision system
E T ( h) =
fl( f (x + h )) fl( f ( x ))
f ( x)
h
Exact
value
Numerical value
obtained with
finite precision
By selecting a proper step size h we can achieve the minimum total error.
What is the order of magnitude of the optimal step size?
What is the order of magnitude of the minimum total error?
Answer:
arg min ET ( h ) 10 8
-8
-8
min ET ( h ) 10 8
h
trapezoidal rule with step size h. The error is defined as Error (h ) = T (h) I .
When the exact value I is unknown, we cannot calculate the error using
h
Error (h ) = T (h) I . Write out how to use T (h ) and T to estimate Error (h ) .
2
Answer:
( )
Error ( h ) = O h 2
Error ( h )
h
T (h) T
2
1
1
2
-1-
Simpsons rule with step size h. The error is defined as Error (h ) = T (h) I .
When the exact value I is unknown, we cannot calculate the error using
h
Error (h ) = T (h) I . Write out how to use T (h ) and T to estimate Error (h ) .
2
Answer:
( )
Error ( h ) = O h 4
Error ( h )
h
T (h) T
2
1
1
2
What is the order of the local truncation error of the Euler method?
Answer:
yn +1 = yn + hF ( yn , t n )
-2-
What is the order of the local truncation error of the backward Euler method?
What is the order of the global error of the backward Euler method?
Answer:
yn +1 = yn + hF ( yn +1 , t n +1 )
y = F ( y,t )
6. Let y (t ) be the exact solution of
.
y (0) = y 0
Let y n (h ) be the numerical approximation to y (nh ) obtained using the Euler method with
y n (h ) y (nh ) = c1 h + o(h )
y 2n
h
h
y (nh) = c1 + o(h )
2
2
When the exact solution y (nh ) is unknown, we cannot calculate the error using
h
Error (h ) = yn ( h) y ( nh) . Write out how to use y n (h ) and y2n to estimate Error (h ) .
2
Answer:
h
yn ( h ) y2n
2
Error ( h )
1
1
2
y = F ( y,t )
7. Let y (t ) be the exact solution of
.
y (0) = y 0
-3-
yn ( h ) y ( nh ) = c4 h 4 + o ( h )
4
h
h
y2n y ( nh ) = c4 + o ( h )
2
2
When the exact solution y (nh ) is unknown, we cannot calculate the error using
h
Error (h ) = yn ( h) y ( nh) . Write out how to use y n (h ) and y2n to estimate Error (h ) .
2
Answer:
Error ( h )
h
yn ( h ) y2n
2
1
1
2
-4-