Lecture 4 - Computer Science Department - University of Kentucky
Lecture 4 - Computer Science Department - University of Kentucky
Lecture 4 - Computer Science Department - University of Kentucky
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