E S 2 C3 T

advertisement
C3 THEORY OF COMPUTATIONAL DYNAMICS
EXAMPLE SHEET 2
Stars indicate level of difficulty.
1.
Obtain an explicit error estimates for the modified Euler method (Q17, Ex. Sheet 1) and the 2nd
order Runge-Kutta scheme given in lectures: i.e. compute constants K1 and K2 such that
1
≤
| xt+h - xt - hF(xt + 2hF(xt)) |
K1h3
1
≤
| xt+h - xt - 2h[F(xt) + F(xt + hF(xt))] |
2.
K2h3
Consider the numerical scheme obtained by taking two steps of the 2 nd order Runge-Kutta
1
scheme, each with step size 2h. Write down an expression for xt+h - xt, and hence compare the
accuracy of this method to a 4t h order Runge-Kutta of step size h. How many function
evaluations per time step of size h does each of these schemes require.
1
1
3***. The 4th order Runge-Kutta scheme is given by A = F(xt), B = F(xt + 2hA), C = F(xt + 2hB), D = F(xt +
hC). Verify that (assuming I haven’t made any mistakes!)
1
1
1 3
48
1
1
1
B
=
F + 2hFF' + 8h2F 2 F'' +
C
=
F + 2hFF' + 8h2F 2 F'' + 4h2F(F')2 +
D
=
F + hFF' + 2h2F 2 F'' + 2h2F(F')2 + 8h3F 2 F'F'' + 6h3F 3 F''' +
1
h F 3 F''' + O(h4)
1
3 3
16
h F 2 F'F'' +
5
1 3
48
h F 3 F''' + O(h4)
1
1 3
4
h F(F')3 + O(h4)
1
Hence, using Q15. Ex. Sheet 1, verify that xt+h = xt + 6h(A + 2B + 2C +D) + O(h5).
I suggest you do B by hand, and use Mathematica for the remaining expressions.
4.
C3 May 1994, Q1.
5.
C3 May 1995, Q1.
6.
Suppose x(t)∈Rn satisfies the linear differential equation
dx(t )
dt
=
A.x(t)
where A is an n×n matrix. Suppose thatx(0) is an eigenvector of A, i.e. A.x(0) = λx(0) for some
λ ∈R. Show that x(t) = e λtx(0), and hence deduce that the eigenspaces of A are invariant under
the flow generated by this equation.
Show that the Euler, modified Euler (Q17, Ex. Sheet 1) and 2nd and 4t h order Runge-Kutta
schemes all preserve the eigenspaces. For x(t) an eigenvector, compare the exact solution of the
equation with that obtained from these schemes.
C3 Exercise Sheet 2
7.
2
This question investigates the convergence of the secant method. Let x* be the root of F : R → R
and suppose that {xi} is a sequence generated by the secant scheme, so that
xi+1
=
x i−1 − x i
F (x i−1 ) − F (x i )
xi - F(xi)
a) Let εi = xi - x* and show that
εi+1
εi - F(xi)
=
x i−1 − x i
F (x i−1 ) − F (x i )
b) Hence show that
εi+1
 F (x i ) − F (x *)

x i−1 − x i
εi 1 −

xi − x *
F (x i−1 ) − F (x i ) 

=
c) Thus deduce that
εi+1
εi εi-1
=
d) Show that
 F (x i ) − F (x *) F (x i−1 ) − F (x i ) 
−
 x −x*

x i−1 − x i
x i−1 − x i
i


x * − x i−1
F (x i−1 ) − F (x i )
F (x i−1 ) − F (x i )
= F'(x*) + O(εi) + O(εi-1 ) and
x i−1 − x i
 F (x i ) − F (x *) F (x i−1 ) − F (x i ) 
−
 x −x*

x i−1 − x i
i


x * − x i−1
=
1
2
F''(x*) + O(εi) + O(εi-1 )
e) Conclude that if εi and εi-1 are sufficiently small, then there exists a constant K > 0 such that
|εi+1 |
K |εi| |εi-1 |
≤
f) Let ei = K |εi|. Show that e i+1 ≤ e i ei-1 . Using induction, or otherwise, show
≤
ei
e 0p e 1p
i-1
i
where pi is the ith Fibonacci number, given by pi+1 = pi + pi-1 , with p0 = 0, p1 = 1.
g) Let e = max {e 0,e 1}. Show that e i ≤ e p
i+1
h) Write down a 2×2 matrix such that
 pi 


 p i+1 
p 
A  i−1 
 pi 
=
By finding the eigenvectors and eigenvalues, or otherwise, show that pi ~ γi-1 , where γ is the
golden mean
γ
=
1
2
(√5+1)
j) Hence deduce that if e is sufficiently small, there exists a constant c > 0 such that
ei
≤
c eγ
i
Download