Anda di halaman 1dari 4

MA20222 Assessed Coursework 2012/13

Set: 12.00 noon Thursday 22nd November 2012. Due: 12.00 noon Thursday 6th December 2012. Expected completion time: About 12 hours total, including writingup. This assignment is worth 25% of the mark for the unit. Figures in square brackets, e.g. [2], represent the marks available for each question, out of a total of 25. Remarks (i) You should not communicate in any way about the assessed coursework with any other person. Your work is to be the result of your own unaided study. This rule may be dierent from other assessed coursework you have been set. Since this is an exam for degree credit, those found cheating will be penalised in accordance with University statutes. (ii) If exceptional circumstances, e.g. disability or illness, prevent you from completing this assignment by the deadline, make sure you contact me or a member of the D.o.S. team at an early stage. E-mail masath or maths-dos (iii) Partial answers to questions will receive partial credit, particularly if they are well justied. (iv) Submit your MATLAB program via moodle in zipped format. (v) Your codes should be written in a form of MATLAB which works on BUCS machines. You may write your codes on other machines, at your own risk. (vi) Post your written work, together with a signed plagiarism cover sheet, in the course postbox in 4W Level, to the right of the main course pigeon-holes. (vii) You may quote results from lectures or problem sheets without proof, provided that you give an accurate reference to the theorem or equation number. Results found in books, journals, or electronic media must be proved from rst principles, and should also be referenced to comply with plagiarism regulations.

RungeKutta methods
Part I: Order conditions: Suppose that we want to approximate the solution
of the scalar autonomous ODE, dy = f (y), t R; y(0) = y0 , (1) dt where f and y are smooth. A general sstage RungeKutta method in this case is of the form
s

ki = f

Un + h
j=1 s

aij kj bi ki ,

1 i s, U0 = y0 .

Un+1 = Un + h
i=1

n N0 ;

The Butcher tableau for such a method is given by c1 c2 . . . a11 a21 . . . a12 a22 . . . a1s a2s . . . ass bs , 0 =
s

where

ci =
j=1

aij ,

1 i s.

cs as1 as2 b1 b2 The truncation error 0 is

y(h) U1 , h and the method is of order p N if and only if 0 = C(y0 )hp + O(hp+1 ). Here, C(y0 ) indicates a sum of derivatives of y or f evaluated at y0 . 1. By expanding both y(h) and U1 as series in powers of h, show that a Runge Kutta method is of order 1 if s bi = 1.
i=1

(2)

Show that a RungeKutta method is of order 2 if, in addition,


s

i=1

1 bi c i = . 2

(3) [4]

2. Verify that (2) and (3) are satised by the implicit midpoint rule,

1 2

1 2

. [1]

The conditions up to order 4 may be found similarly, but with greater labour. A RungeKutta method is of order 3 if, in addition to the conditions found in Q1,
s

bi c 2 i
i=1

1 = 3

&

1 bi aij cj = . 6 i, j=1
s

A RungeKutta method is of order 4 if, in addition,


s

i=1

1 bi c 3 = , i 4

1 bi ci aij cj = , 8 i, j=1

bi aij c2 = j
i, j=1

1 & 12

bi aij ajk ck =
i, j, k=1

1 . 24

(For p 5, the number of order conditions more than doubles with p and also depends on whether f is a scalar or a vector.)

Part II: Higher order: For t R, ODE (1) denes the nonlinear map t by
t y(s) = y(t + s), For h > 0, method s R. c A , denes the nonlinear map h : R R by bT h U0 = U1 ,
(j)

U0 R.

(4)

3. For j {1, 2}, let h be dened by the method Show that the map h (1)h
(2) (1)

c(j) A(j) with sj stages. b(j)T corresponds to a method with tableau, 1(2) := [1, 1, . . . , 1]T Rs2 . [3]

(1 )c(1) (1 )A(1) 0 (2) (2) (1)T (2) (1 )1 + c (1 )1 b A(2) , (1)T (1 )b b(2)T

4. If h is dened by (4) for the method

1 2

1 2

, then

h y0 h y0 = h0 = C(y0 )h3 + O(h4 ). Show that h y0 h h h y0 = C(y0 )(3 + 3 + 3 )h3 + O(h4 ), provided that + + = 1. 3 [5]

5. Let = and = 1 2 in Q4, and nd a value of such that h y0 h y0 = O(h4 ), Show that the tableau for h is
2 1 2

h := h (12)h h .

0 0 1 2 0 , 1 2 2 1 2 [5]

and show that the method has order 4.

Part III: Implementation: Consider the IVP for the simple pendulum,
d2 = sin , dt2 t [0, 30]; (0) = 2, (0) = 0. (5)

1 The energy, E(, ) := 2 cos , should remain constant theoretically. 2 6. Solve (5) using the implicit midpoint rule for h = 0.1. At each timestep tn = nh, use the computed values of (tn ) and (tn ) to evaluate E(tn ) := E((tn ), (tn )) E((0), (0)), where E((0), (0)) = cos (0) = cos(2). Plot E(tn ) against tn . (A Newton tolerance of 1010 is suciently small in Qs 6 & 7.) [5] 7. Repeat Q6 for the method found in Q5. [2]

Anda mungkin juga menyukai