Assignment 3 MAT2009419
Assignment 3 MAT2009419
Assignment 3
1
2. Determine a, b and c such that the quadrature formula
2
3. (a) Gauss quadrature on [ 1, 1] with three node points is given by
p ! p !
5 15 5 15
G3 (f ) = f + af (0) + f
9 5 9 5
Determine the value of constant a and then use this quadrature formula to approximate
Z 1
ln x2 + 2009(2x 1)2 tan(2x 1) dx.
0
[5]
(b) The three-point quadrature rule with error term is given by
Z 1 p ! p !
5 15 5 15
f (x)dx = f + af (0) + f + kf (6) (⇠)
1 9 5 9 5
with a constant a found in part (a). Determine the constant k. [5]
3
4. The following are three di↵erent methods for solving y 0 (t) = f (t, y(t)):
t
(A) yn+1 = yn + 2
[f (tn , yn ) + f (tn + t, yn + tf (tn , yn ))] ,
t t
(B) yn+1 = yn + tf tn + 2
, yn + 2
f (tn , yn ) ,
t
(C) yn+1 = yn + 2
[f (tn , yn ) + f (tn+1 , yn+1 )] .
Consider the problem
y 0 = i y, y(0) = y0 , (1)
p
where i = 1, 2 R, y0 2 C.
(a) Show that you will have the same recursive relationship between yn and yn+1 when you
apply either method (A) or method (B) to solve (1). [4]
(b) When method (A) or method (B) is applied to solve (1), prove that as long as y0 6= 0,
6= 0, for any fixed t, |yn | ! 1 as n ! 1. [3]
(c) Prove that if you apply method (C) to solve (1), you will always have |yn | = |y0 |. [3]
4
5. Recall that the r-th order Adams-Bashforth scheme for y 0 (t) = f (t, y(t)), y(0) = y0 has the
following form
yn+1 yn
= a1 fn + a2 fn 1 + · · · + ar fn+1 r , (2)
t
where fk = f (tk , yk ) for k = n, ..., n + 1 r and tk = n t. Derive the 2nd order Adams-
Bashforth scheme. [10]
5
6. Consider a di↵erential equation of first order
The method
Ps
ki = f (t0 + ci t, y0 + t j=1 aij kj ) i = 1, ..., s
P (3)
y1 = y0 + t si=1 bi ki
Ps
is called an s-stage Runge-Kutta method, where bi , aij are real numbers and ci = j=1 aij .
We are only considering the time stepping from t0 to t1 = t0 + t. Once (t1 , y1 ) is obtained,
it replaces (t0 , y0 ) and the process repeats.
Note that the notations here are di↵erent from the ones we used in the lecture notes
since the ki here is the approximation of y 0 at t0 + ci t. In other words, we let v(t) = y 0 (t)
Rt
and rewrite the original ODE as v(t) = f (t, y0 + t0 v(s)ds) for t 2 [t0 , t0 + t].
For s a positive integer and c1 , ..., cs distinct real numbers (typically between 0 and 1),
a collocation method tries to find a polynomial u(t) of degree s that satisfies
u(t0 ) = y0 (initial value)
(4)
u0 (t0 + ci t) = f (t0 + ci t, u(t0 + ci t)), i = 1, ..., s.
Then, the numerical solution for the collocation method is
y1 = u(t0 + t) (5)
and t1 = t0 + t. Once (t1 , y1 ) is obtained, it replaces (t0 , y0 ) and the process repeats.
Prove that the collocation method above is an s-stage Runge-Kutta method with coeffi-
cients Z Z
ci 1
aij = `j (t)dt, bj = `j (t)dt, i, j = 1, ..., s,
0 0
where `j (t) is the Lagrange polynomial
Y t ck
`j (t) = .
k6=j
cj ck