Sie sind auf Seite 1von 4

AMS 147 Computational Methods and Applications

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

The optimal step size is about 10 :

-8

The minimum total error is about 10 :

min ET ( h )  10 8
h

2. Let T (h ) be the numerical approximation to I = a f ( x )dx obtained using the composite


b

trapezoidal rule with step size h. The error is defined as Error (h ) = T (h)  I .

Suppose (x) is infinitely differentiable. What is the order of Error(h)?

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-

AMS 147 Computational Methods and Applications

3. Let T (h ) be the numerical approximation to I = a f ( x )dx obtained using the composite


b

Simpsons rule with step size h. The error is defined as Error (h ) = T (h)  I .

Suppose (x) is infinitely differentiable. What is the order of Error(h)?

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

4. Consider the Euler method for solving y  = F ( y,t) .

Write out the Euler method.

Is the Euler method explicit or implicit?

What is the order of the local truncation error of the Euler method?

What is the order of the global error of the Euler method?

Answer:

yn +1 = yn + hF ( yn , t n )

Euler method is explicit.

Local truncation error = O(h ).

Global error = O(h)

5. Consider the backward Euler method for solving y  = F ( y,t) .

Write out the backward Euler method.

-2-

AMS 147 Computational Methods and Applications

Is the backward Euler method explicit or implicit?

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 )

Backward Euler method is implicit.

Local truncation error = O(h ).

Global error = O(h)

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

step size h. The error is Error (h ) = yn ( h)  y ( nh) .

Since the Euler method is first order accurate, we have

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-

AMS 147 Computational Methods and Applications


Let y n (h ) be the numerical approximation to y ( j h ) obtained using RK4 (the classical fourth
order Runge-Kutta method) with step size h. The error is Error (h ) = yn ( h)  y ( nh) .

Since RK4 is fourth order accurate, we have

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-

Das könnte Ihnen auch gefallen