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

MATH256 Problem Sheet 9

9.1   (a)  Find the leading order error in the five point Newton– Cotes quadrature rule, derived in example 5.5.3.

(b) Suppose this quadrature rule is applied using N subintervals of equal size, and again using 2N subintervals. What is the approximate relationship between the errors in the two cases?

9.2    (a)  Using the formulae in §5.4, determine the node and weight for the one

point Gaussian quadrature rule, and state the resulting approximation

for

Ij  = f(x) dx.

(b)  Calculate the leading order error in the one point Gaussian quadrature rule.

(c)  How do your results relate to problem 8.1?

9.3  Consider the four point Gaussian quadrature rule, with nodes t1 , . . . , t4  and weights w1 , . . . , w4 .

(a) Apply symmetry, and then show that

Sp = 2 | 2(p + 1)w1 t1(p) | t2(p)+ t2(p)] ,

for even p.

(b)  Solve the Legendre polynomial of order 4 to nd t1  and t2 , and then

set S2  = 0 to show that

w1 = 18 | ^30

(c)  Find the values of S4 , S6  and S8 .

You are advised to use Maple for this; the algebra is rather boring. All of the results should be be rational numbers. If they contain square roots, try applying the simplify command.

(d)  Find the leading order error in the four point Gaussian rule for a single subinterval.  Does it offer a significant improvement in accuracy over the three point Gaussian rule? Justify your answer.

9.4   (a) Write a Maple procedure to implement three point Gaussian quadrature. The procedure must take as its arguments a function f , lower and upper bounds a and b and the number of subintervals N , and return as its result the approximate value of the integral I.

(b) Set Digits set to 20, and use your three point Gaussian quadrature procedure to approximate the integral

J =  o1 1 + sin(x)x3e|x3  dx

using N = 10 and N = 50, and calculate the relative errors in these approximations. An accurate value for the integral J can be obtained using

evalf(  Int(  (  1  +  sin( x  )  )  * x^3  *  exp(  -x^3  )  , x  =  0  . .  1  )  )

(c) Again with Digits set to 20, use Simpson’s rule to approximate the integral in part (b), for N = 15 and N = 75, and calculate the relative errors in these approximations.

(d)  In view of your answers to parts (b) and (c), which of the two methods do you think is more accurate?