



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Solutions to midterm review problems related to the stability and local truncation error analysis of difference methods for approximating solutions to ordinary differential equations. Topics covered include consistency, convergence, stability, and the root condition for multistep methods, as well as the backward euler method and its stability. The document also includes problems on finding the local truncation error and deriving approximations for the first and second derivatives of a function.
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!




These sample review problems do not necessarily represent the content, length, or depth
of the material you will be tested on.
Among other things, it is also a good idea to go over the homework sets.
Main Concepts
A one-step difference equation method with local truncation error τi(h) at the ith step is
said to be consistent if
lim h→ 0
max 1 ≤i≤N
|τi(h)| = 0. (1)
A one-step difference equation method is said to be convergent if
lim h→ 0
max 1 ≤i≤N
|wi − y(ti)| = 0, (2)
where yi is the exact solution and wi is the approximation obtained from the difference
method. Recall that for Euler’s method, we have
max 1 ≤i≤N
|wi − y(ti)| ≤
M h
|e
L(b−a) − 1 |, (3)
and, therefore, Euler’s method is convergent with the linear (first order) rate of conver-
gence of O(h).
A method is stable if its results depend continuously on the initial data.
Problem: To approximate the initial value problem
y
′ = f (t, y) (4)
for t > 0, consider a multistep method
wi+1 = 2wi− 1 − wi + h
f (ti, wi) +
f (ti− 1 , wi− 1 )
Is this method stable?
Solution: For a multistep method to be stable, it has to satisfy the root condition. A
multistep method is said to satisfy the root condition if all roots λi of the characteristic
polynomial P (λ) (for a general form of P (λ) see equation (5.57) in the book) are such
that |λi| ≤ 1, and if |λi| = 1, then λi is simple.
The characteristic polynomial of the following multistep method
wi+1 + wi − 2 wi− 1 = h
f (ti, wi) +
f (ti− 1 , wi− 1 )
is
P (λ) = −2 + λ + λ
2 ,
which has roots
λ 1 = 1, λ 2 = − 2.
Thus this multistep method does not satisfy the root condition, and therefore is unstable.
X
Note that a quick way of writing a characteristic polynomial is to associate the coefficient
a 0 to the leftmost grid point in the method’s stencil. In the example above, the leftmost
grid point has an index i − 1, and therefore, a 0 = −2, a 1 = 1, a 2 = 1.
Problem: Show that the Backward Euler (or Implicit Euler) method
wi+1 = wi + hf (ti+1, wi+1)
is A-stable.
Solution: The region R of absolute stability is R = {hλ ∈ C | |Q(hλ)| < 1 }, where
wi+1 = Q(hλ)wi. A numerical method is said to be A-stable if its region of stability R
contains the entire left half-plane.
In other words, in order to show that the method is A-stable, we need to show that
when it is applied to the scalar test equation y
′ = λy = f , whose solutions tend to zero
for λ < 0, all the solutions of the method also tend to zero for a fixed h > 0 as i → ∞.
For the Backward Euler method, we have
wi+1 = wi + hλwi+1,
wi+1 − hλwi+1 = wi,
wi+1(1 − hλ) = wi,
wi+1 =
1 − hλ
wi,
wi+1 =
1 − hλ
)n+
w 0.
Thus,
Q(hλ) =
1 − hλ
Note that for Re(hλ) < 0, |Q(hλ)| < 1. Therefore, the region of absolute stability R for
the Backward Euler method contains the entire left half-plane, and hence, the method is
A-stable.
Note that the region of absolute stability contains the interval (2, +∞).
Boundary Value Problems
Given the second-order boundary-value problem
y
′′ (x) = p(x)y
′ (x) + q(x)y(x) + r(x),
a ≤ x ≤ b,
y(a) = α, y(b) = β,
the differential equation to be approximated at the interior points xi is
y
′′ (xi) = p(xi)y
′ (xi) + q(xi)y(xi) + r(xi). (6)
It might be helpful to know how to derive the following approximations to the first and
second derivatives of y(xi) (pages 656-657 in the book). Expanding y(xi+1) and y(xi− 1 ) in
Taylor polynomials about xi, and doing some arithmetic manipulations (as in the book),
we obtain the following formulas:
y
′′ (xi) =
h^2
y(xi+1) − 2 y(xi) + y(xi− 1 )
h
2
y
′′′′ (ξi),
y
′ (xi) =
2 h
y(xi+1) − y(xi− 1 )
h
2
y
′′′ (ηi).
The approximation to (6) is therefore:
( −wi+1 + 2wi − wi− 1
h^2
wi+1 − wi− 1
2 h
Problem: Write the discretization of the following boundary value problem
y
′′ = −
x
y
′
x^2
y −
x^2
log x,
1 ≤ x ≤ 2 ,
y(1) = −
, y(2) = log 2,
in matrix-vector notation Aw = b.
Solution: At the interior points xi, for i = 1, 2 ,... , N , the differential equation to be
approximated is
y
′′ (xi) = −
xi
y
′ (xi) +
x^2 i
y(xi) −
x^2 i
log xi. (8)
Since
y
′′ (xi) =
y(xi+1) − 2 y(xi) + y(xi− 1 )
h^2
h
2
y
(4) (ξi),
y
′ (xi) =
y(xi+1) − y(xi− 1 )
2 h
h
2
y
′′′ (ηi),
we can write the numerical approximation to (8) as
wi+1 − 2 wi + wi− 1
h
2
xi
wi+1 − wi− 1
2 h
x
2 i
wi = −
x
2 i
log xi. (9)
Multiplying both sides of (9) by −h
2 gives
−(wi+1 − 2 wi + wi− 1 ) −
2 h
xi
(wi+1 − wi− 1 ) +
2 h
2
x
2 i
wi =
2 h
2
x
2 i
log xi.