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

Math 551 Section 01

Summer 2023

Chapter 15 Homework 6 due on Monday, July 10th at 11:59 PM

Notes: Try to answer all the questions by demonstrating all the steps of your calculations. Please submit your homework on Gradescope. This homework assignment covers Sections 15.1-15.2. Answer all the questions by demonstrating all the steps of your calculations. The MATLAB m-file for Problem 1 is posted on Blackboard.

1.  (25 points) Evaluate by hand the denite integrals below. Subsequently, approx- imate them by using the composite Trapezoidal rule Itrap (h) for N = 2, 4, 8, 16, 32 and 64, where h = (b - a)/N .

To do so, use and modify the MATLAB trap .m whose rst line should read function  [  y  ]  =  trap(  f,  a, b,  N  )

Include a copy of your code. For each of the cases above make a table with columns:

● column 1: N

● column 2: h

● column 3: Itrap (h) (this is the approximation, i.e., the output y)

● column 4:  lerrorl (this is the absolute error)

● column 5:  lerrorl/h2 1

(a)  (6 points) If  =       (3x + 1) dx.

0

1

(b)  (7 points) If  =      xe尸北2  dx.

0

(c)  (6 points) If  =        (cos (x) + 1) dx. 0

(d)  (6 points) Are the numbers in the last column converging, and if so, what does this mean?  Specifically, comment on the behavior of the error for (a) and (b).  If your code is correct, you will notice that for (c) the last column is not converging, and that the approximation is very accurate. Can you explain briey why?

2.  (35 points)  Consider the following integral

2

If  =       ln (x) dx.

1

(a)  (14 points) Approximate the integral by using the composite Trapezoidal rule Itrap (h) with four subintervals and bound the error

E(f) = -  (b - a)h2 .

(b)  (14 points) Approximate the integral by using the composite Simpson rule ISimp (h) with four subintervals and bound the error

f (4) (η)

180

(c)  (7 points) Find the exact value of the integral If  =   12 ln (x) dx.  Compute the (absolute) error by comparing the approximate values in (a) and (b) with the exact value from calculus.

3.  (25 points)  Consider the Simpsons rule:

ISimp  =  f (a) + 4f  + f (b),    with   h =  .               (1)

This approximation satisfies:

f (4) (η)

90

for some η e [a, b] which implies that Simpson’s rule is exact if f (x) is a polynomial of degree <= 3, i.e., pn (x) for 0 < n < 3.

(a)  (15 points) Derive Simpson’s rule, i.e., Eq. (1).

(b)  (10 points) Consider f (x) = x3 . Then, find ISimp  (by hand!) which approximates

b

If  =      f (x) dx. Is the answer exact? Justify your answer.

a

4.  (15 points) Let  f (x)  e  C2 [a, b].   Upon employing the basic  quadrature  error formula that we discussed in class, show that:

The error in the Trapezoidal rule is given by

E(f) = -  (b - a)3 .

for some η e [a, b].

Hint : Besides the quadrature error formula, you should utilize (wherever appropriate !) the following important theorems:

Theorem 1 (Mean Value Theorem)  Let f (x)  be  continuous for x  e  [a, b]  and differentiable for x e (a, b) .  Then, there is at least one point, denoted by ξ e (a, b) for which:

f (b) - f (a)

b - a     .

Theorem 2 (Integral Mean Value Theorem)  Let w(x)  be  either non-negative or non-positive and integrable function on [a, b] and let f (x) be continuous on [a, b] .

Then

b                                                    b

w(x)f (x) dx = f (ξ)      w(x) dx,

a                                                    a

for some ξ e [a, b] .