06.09.2021 Views

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 4. NUMERICAL QUADRATURE AND DIFFERENTIATION 144<br />

and the <strong>in</strong>tegral simplifies as − h5<br />

90 f (4) (ξ) for some ξ ∈ (a, b). In summary, we obta<strong>in</strong><br />

where ξ ∈ (a, b).<br />

∫ b<br />

a<br />

f(x)dx = h 3 [f(x 0)+4f(x 1 )+f(x 2 )] − h5<br />

90 f (4) (ξ)<br />

Exercise 4.1-1:<br />

any n.<br />

Prove that the sum of the weights <strong>in</strong> Newton-Cotes rules is b − a, for<br />

Def<strong>in</strong>ition 66. The degree of accuracy, or precision, of a quadrature formula is the largest<br />

positive <strong>in</strong>teger n such that the formula is exact for f(x) =x k , when k =0, 1, ..., n, or<br />

equivalently, for any polynomial of degree less than or equal to n.<br />

Observe that the trapezoidal and Simpson’s rules have degrees of accuracy of one and<br />

three. These two rules are examples of closed Newton-Cotes formulas; closed refers to the<br />

fact that the end po<strong>in</strong>ts a, b of the <strong>in</strong>terval are used as nodes <strong>in</strong> the quadrature rule. Here is<br />

the general def<strong>in</strong>ition.<br />

Def<strong>in</strong>ition 67 (Closed Newton-Cotes). The (n+1)-po<strong>in</strong>t closed Newton-Cotes formula uses<br />

nodes x i = x 0 + ih, for i =0, 1, ..., n, where x 0 = a, x n = b, h = b−a,<br />

and n<br />

w i =<br />

∫ xn<br />

x 0<br />

l i (x)dx =<br />

∫ xn<br />

x 0<br />

n<br />

∏<br />

j=0,j≠i<br />

x − x j<br />

x i − x j<br />

dx.<br />

The follow<strong>in</strong>g theorem provides an error formula for the closed Newton-Cotes formula.<br />

A proof can be found <strong>in</strong> Isaacson and Keller [12].<br />

Theorem 68. For the (n +1)-po<strong>in</strong>t closed Newton-Cotes formula, we have:<br />

•ifn is even and f ∈ C n+2 [a, b]<br />

∫ b<br />

a<br />

f(x)dx =<br />

n∑<br />

i=0<br />

w i f(x i )+ hn+3 f (n+2) (ξ)<br />

(n +2)!<br />

∫ n<br />

0<br />

t 2 (t − 1) ···(t − n)dt,<br />

•ifn is odd and f ∈ C n+1 [a, b]<br />

∫ b<br />

a<br />

f(x)dx =<br />

n∑<br />

i=0<br />

w i f(x i )+ hn+2 f (n+1) (ξ)<br />

(n +1)!<br />

∫ n<br />

0<br />

t(t − 1) ···(t − n)dt

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!