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.
Recursive Formula<br />
If R(n –1,0)is available, R(n,0) can be computed as<br />
R(n, 0)<br />
1<br />
= R(n −1,<br />
0)<br />
+ h<br />
2<br />
n−<br />
2<br />
1<br />
∑<br />
For n ≥ 1 using h = (b – a)/2 n . Initial starting value is<br />
−<br />
1<br />
k=<br />
1<br />
f[a + ( 2k<br />
−1)h]<br />
1<br />
R ( 0,<br />
0)<br />
= 2<br />
(b − a)[f (a) + f (b)]<br />
The trick is to only sum the function values at every other grid points<br />
Pro<strong>of</strong>. Note that<br />
R<br />
(<br />
n,0)<br />
=<br />
h<br />
2<br />
n<br />
1<br />
∑<br />
− f<br />
(<br />
a<br />
+<br />
i<br />
h<br />
)<br />
+<br />
C<br />
i=<br />
1<br />
with C = h[f(a) + f(b)]/2 and<br />
R(<br />
n − 1,0) = 2h<br />
−<br />
2<br />
n 1<br />
∑ − 1<br />
f ( a + 2 j h)<br />
+ 2C<br />
j=<br />
1<br />
24