22.07.2014 Views

Lecture 4 - Computer Science Department - University of Kentucky

Lecture 4 - Computer Science Department - University of Kentucky

Lecture 4 - Computer Science Department - University of Kentucky

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Let h be the interval length<br />

Error Analysis (5)<br />

x i h<br />

∫<br />

+ f<br />

(x)dx =<br />

[f (x<br />

)<br />

+<br />

f (x<br />

x i 2<br />

1<br />

)] −<br />

h<br />

12<br />

=<br />

i i+1<br />

f"(<br />

ξ<br />

)<br />

1 3<br />

Sum over all subintervals to get the composite trapezoid rule<br />

b<br />

−1<br />

x<br />

−1<br />

−1<br />

i<br />

∫ = ∑ ∫<br />

+ 1<br />

f ( x)<br />

dx f ( x)<br />

x = ∑ [ f ( xi<br />

) + f ( xi<br />

+ 1)]<br />

− ∑<br />

a<br />

n<br />

i=<br />

0<br />

x<br />

i<br />

h<br />

2<br />

n<br />

i=<br />

0<br />

3<br />

h<br />

12<br />

n<br />

i=<br />

0<br />

f "( ξ )<br />

i<br />

Note that h=(b-a)/n, we use Intermediate-Value Theorem <strong>of</strong> Continuous<br />

Functions,<br />

3 1<br />

1<br />

h n −<br />

n−<br />

b − a 2 ⎡1<br />

− ∑ f "( ξi<br />

) = − h<br />

12 i<br />

12<br />

⎢ ∑<br />

= 0 ⎣n<br />

i<br />

=<br />

0<br />

⎤<br />

f "( ξi<br />

) ⎥ ⎦<br />

i i ⎦<br />

= −<br />

b − a<br />

12<br />

h<br />

2<br />

f<br />

"( ζ )<br />

18

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

Saved successfully!

Ooh no, something went wrong!