MA 342N Assignment 3 Due 1 April 2016

advertisement
MA 342N
Assignment 3
Due 1 April 2016
Id:
342N-s2016-3.m4,v 1.2 2016/04/05 10:50:52 john Exp john
1. Find the coefficients for the backwards differentiation formula of order 3.
Solution: Starting from the formal power series identity
hD = − log(1 − h∇h ) = h∇h +
1
1
1
(h∇h )2 + (h∇h )3 + (h∇h )4 + · · ·
2
3
4
we truncate the series after the h3 term:
hD = h∇h +
1
1
(h∇h )2 + (h∇h )3 + O(h4).
2
3
j
Substituting h∇h = 1 − T−h and using the fact that T−h
= T−jh gives
hD =
9
2
11 18
− T−h + T−2h − T−3h + O(h4).
6
6
6
6
Applying both sides to an arbitrary function y and evaluating at an
arbitrary point x,
hy ′ (x) =
18
9
2
11
y(x) − y(x − h) + y(x − 2h) − y(x − 3h) + O(h4).
6
6
6
6
If we neglect the error term we get a solution method of order 3 by
assuming y satisfies the differential equation y ′(x) = F (x, y(x)) and
specialising to x = xn = nh:
hF (xn , yn ) =
11
18
9
2
yn − yn−1 + yn−2 − yn−3.
6
6
6
6
1
Id:
342N-s2016-3.m4,v 1.2 2016/04/05 10:50:52 john Exp john 2
This is usually written in the equivalent form
yn+3 −
9
2
6
18
yn+2 + yn+1 − yn = hF (xn+3 , yn+3) .
11
11
11
11
The fact that the local discretisation error is really O(h4 ) as the formal
calculation suggests follows from the theorem proved in the notes.
2. Find the coefficients for the 4th order Adams-Moulton formula.
Solution: This is largely similar to the previous problem, but we start
from the identity
h∇h
hD
− log(1− h∇h )
1
1
19
1
2
3
4
(h∇h ) −
(h∇h ) −
(h∇h ) + · · · hD
= 1 − h∇h −
2
12
24
720
= h∇h .
Again we truncate after the h3 term, apply the resulting identity to
an arbitrary y at an abitrary x, substitute 1 − T−h for h∇h , neglect
the error term, and specialise to solutions of the differential equation
evaluated at xn to obtain, in order,
1
1
1
1 − h∇h −
(h∇h )2 −
(h∇h )3 hD = h∇h + O(h5 ),
2
12
24
19
5
1
9
+ T−h − T−2h + T−3h hD = 1 − T−h + O(h5 ),
24 24
24
24
9 ′
19 ′
5 ′
1 ′
h
y (x) + y (x − h) − y (x − 2h) + y (x − 3h)
24
24
24
24
= y(x) − y(x − h) + O(h5 ),
and
h
19
9
F (xn , yn ) + F (xn−1 , yn−1)
24
24
1
5
− F (xn−2 , yn−2 ) + F (xn−3 , yn−3 ) = yn − yn−1
24
24
or, as it’s more usually written,
yn+3 − yn+2 = h
9
19
F (xn+3 , yn+3) + F (xn+2 , yn+2 )
24
24
5
1
− F (xn+1 , yn+1 ) + F (xn , yn ) .
24
24
Id:
342N-s2016-3.m4,v 1.2 2016/04/05 10:50:52 john Exp john 3
3. Find the coefficients for the 3rd order Adams-Bashforth method.
Solution: Similar to the previous two problems, except with
h∇h
T−h hD
−(1 − h∇
h ) log(1 − h∇h )
1
5
3
2
3
= 1 + h∇h + (h∇h ) + (h∇h ) + · · · T−h hD
2
12
8
= h∇h .
This leads to
1
5
1 + h∇h + (h∇h )2 T−h hD = h∇h + O(h4 ),
2
12
16
5
23
T−h − T−2h + T−3h hD = 1 − T−h + O(h4),
12
12
12
16 ′
5 ′
23 ′
y (x − h) − y (x − 2h) + y (x − 3h)
h
12
12
12
= y(x) − y(x − h) + O(h4),
23
16
5
h
F (xn−1 , yn−1) − F (xn−2 , yn−2 ) + F (xn−3 , yn−3 ) = yn −yn−1 ,
12
12
12
and
yn+3 − yn+2 = h
16
5
23
F (xn+2 , yn+2 ) − F (xn+1 , yn+1 ) + F (xn , yn ) .
12
12
12
Download