Вы находитесь на странице: 1из 2

D.

Schwendeman
Numerical Computing

Due:
Thursday, 4/28/14

Problem Set 9

1.Text exercises 2 and 3, page 268


i Calculating integrals using Romberg Integration.
We will not give details of every calculation. Rather we shall give a universal formula
for calculating the coefficients. There is a MATLAB code on page 267 that generates
these coefficients.
Rjk =

4k1 Rj,k1 Rj1,k1


4k1 1

R11 = (b a)

f (a) + f (b)
2

(a) R33 = 1.0000056.


(b) R33 = 0.7855
(c) R33 = 2.008323
ii Show that the extrapolation of the composite Trapezoid Rules in R11 and R21 yields
the composite Simpsons Rule (with step size h2 ) in R22 .
R21 =

h2
a+b
[f (a) + f (b) + 2f (
)]
2
2

h2
a+b
4R21 R11
=
[f (a) + f (b) + 4f (
)]
3
3
2
which is exactly Simpsons rule.

b1
b1
1 1 0
0
0
1
1
d1 2
d1 26
0 0 2
4
8

1 3 1 0
0
b2 = 0 b2 = 5

c2 6
0 6 0 2 0 c2 0
0 0 0
2 12
0
1
d2
d2
R22 =

Therefore we have that:


(
S1 (x) = x 2x3 ,
if x [0, 1]
f(x) =
2
3
S2 (x) = 1 5(x 1) 6(x 1) + (x 1) , if x [1, 3]

S1 (x) = 4 + x + 2x2 x3 ,

4
1

f (x) = S2 (x) = 1 (x 1) + (x 1)2 (x 1)3 ,

3
6

2
S3 (x) = 1 + (x 2) + (x 2) (x 2)3 ,
6
2.
S0 = S(a, b) =

ba
a+b
[f (a) + 4f (
) + f (b)]
6
2

for x [0, 1]
for x [1, 2]
for x [1, 3]

(a) Derive an estimate of the error in S1 involving the difference |S0 S1 |

h4
b a 0000

S0 C( ), C =
f ()
2
180
I=

h )4 , C = b a f 0000 ()
S1 C(
4
180
we have that |C| | (S0 S14)256 | E = |C( h )9 | =
Assume that f 0000 () f 0000 (),
4
15h
1
15 |S0 S 1|.
(b) We can then use this formula to estimate the error in each of the following cases
(a)
S0 = S1 =

1
E=0
3

(b)
S0 1.00228 S1 1.0001343 E = 1.43 104
(c)
S0 1.71886 S1 1.718319 E = 3.70136 105
3. Find general solutions for ODEs
(a)
y0 =

3t2 y
1 + t3

y0
3t2
= 3
y
t +1

ln |y| = ln |1 + t3 | + C

y(t) = C|t3 + 1|

(b)
y0 =

p
3t2 1
3
(3+2y)y 0 = 3t2 1 3y+y 2 = t3 t+C y(t) = t3 t + C
3 + 2y
2

4. Solve the system of linear ODEs


(a)


 
 
1 1
1
1
y =
y 1 = 1 2 = 3, v1 =
, v2 =
y(t) = C1 et v1 + C2 e3t v2
4 1
2
2
0

(b)


 
 
1 2
1
2
y =
y 1 = 1 2 = 2, v1 =
, v2 =
y(t) = C1 et v1 +C2 e2t v2
3 4
1
3
0

5. Numerical solution using forward Euler.


For the code, please refer to the course website eulersM ethodExample.m.

Вам также может понравиться