Docsity

Quiz 6 with Solution for Computational Methods | CMSC 460, Quizzes of Computer Science

Toggle sidebar
bg1
AMSC/CMSC 460 Quiz 6 ,Fall 2007
1. (10) Suppose we use an Adams PECE schme to solve a differential equation
y0=f(t, y) and obtain yP
n+1 = 1.2450 and yC
n+1 = 1.2430. Suppose the error
formula for the predictor is 5h3
12 y(3)(η) and for the corrector is h4
24 y(4)(ξ). What
can you say about the error? (Give an unambiguous statement about what
error you mean and what your estimate of it is.)
Answer:
The error formulas tell us that
yn+1 −yP
n+1 =5h3
12 y(3)(η),
yn+1 −yC
n+1 =h4
24y(4)(ξ).
We can’t compute the left or right-hand sides, but if we subtract the two
equations we obtain
yC
n+1 −yP
n+1 =5h3
12 y(3)(η)−h4
24y(4)(ξ),
and the left-hand side is computable. Assuming that the error in the corrector
is much smaller than the error in the predictor, we have
|yn+1 −yP
n+1| ≈ |yC
n+1 −yP
n+1|= 1.2450 −1.2430 = .002.
This is an approximation to the local error in the predictor: i.e., the differ-
ence between the true solution and the predicted value, assuming that all of
the values used in the predictor formula are correct.
1
pf2

Partial preview of the text

Download Quiz 6 with Solution for Computational Methods | CMSC 460 and more Quizzes Computer Science in PDF only on Docsity!

AMSC/CMSC 460 Quiz 6 , Fall 2007

  1. (10) Suppose we use an Adams PECE schme to solve a differential equation y′^ = f (t, y) and obtain yPn+1 = 1.2450 and ynC+1 = 1.2430. Suppose the error

formula for the predictor is 5 h

3 12 y

(3)(η) and for the corrector is h^4 24 y

(4)(ξ). What

can you say about the error? (Give an unambiguous statement about what error you mean and what your estimate of it is.)

Answer: The error formulas tell us that

yn+1 − yPn+1 =

5 h^3 12

y(3)(η),

yn+1 − yCn+1 =

h^4 24

y(4)(ξ).

We can’t compute the left or right-hand sides, but if we subtract the two equations we obtain

ynC+1 − yPn+1 =

5 h^3 12

y(3)(η) −

h^4 24

y(4)(ξ),

and the left-hand side is computable. Assuming that the error in the corrector is much smaller than the error in the predictor, we have

|yn+1 − yPn+1| ≈ |yCn+1 − ynP+1| = 1. 2450 − 1 .2430 =. 002.

This is an approximation to the local error in the predictor: i.e., the differ- ence between the true solution and the predicted value, assuming that all of the values used in the predictor formula are correct.

2a. (5) Give an important advantage of PECE Adams methods over Runge- Kutta methods.

Answer: PECE uses two function evaluations, regardless of the order of the method. Runge-Kutta uses more function values than this for formulas of order greater than 2.

2b. (5) Consider the differential equation y′^ = f (t, y), with y : R^1 → R^2. Given t 1 and y(t 1 ), how do you test whether the differential equation is stiff at t 1?

Answer: Since y has two components, we need to

  • Compute the 2 × 2 matrix of partial derivatives of f with respect to the two components of y.
  • Evaluate the matrix at t 1 and y(t 1 ).
  • Evaluate the two eigenvalues of the matrix.

If the real parts of the eigenvalues are negative, and one is much less than the other, then the equation is stiff at t 1.