Description
2. (5 points) Exercise 1.1 of the book by Arieh Iserles. Only prove convergence of the implicit
midpoint rule (1.12). You do not need to prove convergence of the theta method (1.13).
3. Consider the scalar linear problem y
0 = f(y), y(0) = 1, t ∈ [0, t?
], where f(y) = ay with
a < 0.
(a) (1 point) Write down Euler’s method for this problem.
(b) (3 points) Now take a = −2 and t
? = 100. To prove that Euler’s method is convergent,
we proved that
|en,h| ≤ c
λ
(exp(t
?λ) − 1)h,
where λ is the Lipschitz constant associated with f(y) and c a constant bounding the
O(h
2
) term in the Taylor series expansion of y(tn+1) (see the proof of Theorem 1.1 of
the Arieh Iserles book). A reasonable choice is c = 2 (see page 7 of Arieh Iserles book).
Find a value for λ and therefore a bound for the norm of the error of the form |en,h| ≤ αh
with α ∈ R
+. Is this bound of any use in practice?
(c) (4 points) An improved error bound is given by
|en,h| ≤ 1
2
t
?
a
2h.
Prove this error bound. With a = −2 and t
? = 100, compare this error bound to that
found in (b).
Hint: Show that
|en,h| = |(1 + ah)
n − exp(anh)|.
Then use that for −1 x ≤ 0, and n = 0, 1, 2, … that
exp(nx) −
1
2
nx2
exp((n − 1)x) ≤ (1 + x)
n ≤ exp(nx).
2
4. We are given the following ODE:
y
00 + by0 + cy = 0, t ∈ [0, 1], y(0) = 1, y0
(0) = 0,
where b
2 = 4c.
(a) (1 point) Find the exact solution to the above problem.
(b) (1 point) Write the above second-order ODE as a system of first order ODEs.
(c) (5 points) Implement Euler’s method to solve the system of first order ODEs. Take
b = 10. In 3 separate figures plot both the numerical solution and the exact solution. In
Figure 1 use h = 0.5, in Figure 2 use h = 0.05 and in Figure 3 use h = 0.005.
(d) (2 points) Let the error on a grid with time step h be defined as:
Eh = max
0≤nh≤1
|yn,h − y(nh)|
For h = 0.5, h = 0.05 and h = 0.005 compute Eh. You will see that the error satisfies
Eh = O(h
p
). What is p? Explain your answer.
(e) (5 point) Write down the theta-method for the system of first order ODEs of question
(b). Repeat questions (c) and (d) but instead of the Euler method, use the θ-method
with θ = 0.5. Which of the two methods discussed here converges faster to the exact
solution? Explain your answer.
5. The Lorenz equations are a simplified model of convection in the earths atmosphere, and is
given by
dx
dt =σ(y − x)
dy
dt =x(ρ − z) − y
dz
dt =xy − βz
where σ, ρ and β are system parameters.
(a) (5 points) Take σ = 10, ρ = 28 and β = 8/3. Implement Euler’s method to solve
the Lorenz equations. Let t ∈ [0, 50] and take h = 0.002. As initial condition take
(x0, y0, z0) = (1, 0, 0). Plot the solution where the horizontal axis is x and the vertical
axis is z.
(b) (1 point) Repeat question (a) but with ρ = 14.
(c) (2 points) Search online or in a textbook for the definitions of ’chaos’, ’strange attractor’, ’Lorentz attractor’, etc. to explain the plots found in questions (a) and (b). (A
short two or three sentence explanation is sufficient.)
3