You are on page 1of 3

DS 288 (AUG) 3:0 Numerical Methods Homework–5

DS 288 (AUG) 3:0 Numerical Methods


Homework–5 1
Due date: October 28, 2021 (Thursday); 7:00 A.M.


1. Derive Simpson’s Rule with error term by using
Z x2
f (x)dx = a0 f (x0 ) + a1 f (x1 ) + a2 f (x2 ) + kf (4) (⇠) (1)
x0

Find a0 , a1 , and a2 from the fact that Simpson’s rule is exact for f (x) = xn when
n = 0, 1, 2, and3. Then find k by applying the integration formula to f (x) = x4 . [2
points]

2. Apply Romberg Integration to the following integrals until Rn 1,n 1 and Rn,n agree to
within 10 5 . Report the value of n and the number of function evaluations. Also, compute
the result to that obtained from the Trapezoidal rule for the same number n (note that
you already calculate this value to get Rn,n ). [2 points]
Z 1 Z 1
1/3
(a). x dx; (b). x2 e x dx (2)
0 0

3. Approximate the integrals in Problem 2(a) and 2(b) using Gaussian Quadrature with
n=2, 3, 4, and 5. Report the number of function evaluations and compare the results
with those obtained using Romberg Integration in Problem-2. [2 points]

4. Solve the initial-value problem


dy 1 y
= 2 y2 (3)
dt t t
on the interval 1  t  2 subject to initial conditions y(1) = -1 using Euler’s method with
step-sizes 4t = 0.1(2 n ) for n = 0, 1, 2, 3, and 4 and compare with the exact solution
y(t) = 1/t. Specifically, for each step-size compare your computed value of y(2) with its
analytic counterpart. Repeat the same series of calculations for Modified Euler’s method.
Compare errors. Plot the absolute value of the error for each method versus 1/4t on a
log-log scale. Do the trends that you observe agree with our knowledge of the order of
accuracy (as 4t decreases) of these methods?. [4 points]

1
Posted on: September 15, 2021.

1
H+no"-3ni÷ÉÉ
2

3 ( NE -1262 -22220) 22

¥-¥3aim+¥
203 -
HE + 3xÉxo - 3h02 22

203 -
n ? + 32622 ( Nz -

)
Xo

3
(Korea ) =
-429 ,
g-

T.IE = a.
19--1,3
192--13=902

f =

hgf@• ) +
4dg fat hz find

¥[ fled + 4 f- Cm ) )
+ fcoez)

fz

You might also like