Sei sulla pagina 1di 1

DKE Numerical Mathematics 2019 Graded Assignments

Submit homeworks via the Student Portal. All code must be executable by Matlab. Submit files of code
and computer-generated output. Other working may be hand-written on A4 paper and scanned to a
PDF file (photographs will not be graded), or written using on a computer and submitted both in source
and PDF formats.

1. (Due by 23:59 on Thursday 18th April)


Write Matlab code which uses the secant method to find all three roots of the function f (x) =
1 + xex − 5x2 in the interval [−1, +3] to an estimated accuracy of 10−6 . For each root, also state
the best bracket (bounds) you have found.
2. (Due by 23:59 on Tuesday 30th April)
Write Matlab code to solve a differential equation using the 3rd-order Adams-Bashforth method,
with a given fixed step size. Bootstrap your method using a Runga-Kutta method of appropriate
order.
Apply your both your Runge-Kutta boostrapping and the Adams-Bashforth method to solve the
initial-value problem
ẏ = cos(t) + y − y 3 ; y(0) = 2;
up to time t = 12 using a step-size of h = 0.5. Compute the (absolute) error at t = 12, given that
the exact value is −0.6626337391 (10 dp). What happens to the error if you halve the step size?
Compare the Adams-Bashforth method to your bootstrapping Runge-Kutta method with (i) the
same step size, and (ii) the same number of functon evaluations. Which method performs better?
3. (Due on Thursday 9th May)
TBA

4. (Due on Thursday 16th May)


TBA
5. (Due on Monday 27th May)
TBA

Potrebbero piacerti anche