Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MATH20602

Numerical Analysis 1

Problem Sheet 5

Part A

(5.1)    In this problem we construct a non-linear function for which the trapezium rule gives a more accurate result than Simpson’s rule.

Calculate the errors in the trapezium rule and Simpson’s rule approximations of

1                                       1

:4 d:?    and         :5 d:!

                                      

Find the value of a constant  such that the trapezium rule gives the exact value for

1

=       ╱:5 _ 扌:4d:!

Determine also an interval for 扌, such that the trapezium rule gives a more accurate result for Ⅰ than Simpson’s rule.

(5.2)    The Newton-Cotes formula with n = 3 on the interval [_1? 1] is

1

f (:) d: ≈ Ⅰ3 (f) = 2 f (_1) + 21 f (_1}3) + 22 f (1}3) + 23 f (1)?      (1)

- 1

where the weights 2k  are the integrals of the Lagrange basis functions Lk (:), and the quadrature nodes are :  = _1, :1  = _1}3, :2  = 1}3, and :3  = 1. Using the fact that formula (1) is exact for polynomials of degree 3, show that the weights satisfy the relations

2 + 21 = 1?

2 + 1 21 = 1

and hence determine all four of the weights.

This approach provides an alternative to evaluation of the integrals  1-1 Lk (:) d:.

Part B

(5.3)    Consider the function f (:) = e-x }: and the integral

2 e-x

Suppose that we would like to estimate the error made in approximating this integral, by both the composite trapezium rule and the composite Simpson’s rule, with equispaced nodes : ? :1 ? ! ! ! ? :n .

1. How large should n be to ensure that the approximation error via the composite trapezium rule is below 10-5 ?

2. How large should n =  2m be to ensure that the approximation error via the composite Simpson’s rule is below 10-5 ?

(5.4)    Obtain a bound for the tail  b2 of the improper integral

2  e-x2   

Hence nd a value of ó such that   2  agrees with   尸(b) up to an error of at most 10-5 .

Why is this sort of truncation useful in quadrature?

(5.5)    In the improper integral

1

:- 1/2ex d:?

the integrand is unbounded near to : = 0. Show how a change of variable can be used to circumvent this issue, and comment on the implications for quadrature of such an integral.