09.12.2012 Views

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

9.3 0 MANIPULATION 445<br />

Namely, we know a closed <strong>for</strong>m <strong>for</strong> S,: It’s just H,,z+,, - H,z. And we<br />

know a good approximation <strong>for</strong> harmonic numbers, so we just apply it twice:<br />

Hnz+,, = ln(n2 + n) +y +<br />

1 1<br />

2(n2 + n) - 12(n2 + n)2<br />

H,z = lnn2+y+& &+O($J.<br />

+o -$ ;<br />

( 1<br />

Now we can pull out large terms and simplify, as we did when looking at<br />

Stirling’s approximation. We have<br />

ln(n2 +n) = inn’ +ln 1 + i<br />

( ><br />

= lnn’+J--$+&-...;<br />

1<br />

n2 + n<br />

=<br />

1<br />

----<br />

1<br />

+I-...;<br />

n2 n3 n4<br />

1 1<br />

-1+3-... .<br />

(n2 +n)2 = iT n5 n6<br />

So there’s lots of helpful cancellation, and we find<br />

plus terms that are O(n’). A bit of arithmetic and we’re home free:<br />

S, = n-1 - 3-2 _ inp3 + inp4 - &np5 + An+ + o(n-‘).<br />

(9.50)<br />

It would be nice if we could check this answer numerically, as we did<br />

when we derived exact results in earlier chapters. Asymptotic <strong>for</strong>mulas are<br />

harder to verify; an arbitrarily large constant may be hiding in a 0 term,<br />

so any numerical test is inconclusive. But in practice, we have no reason to<br />

believe that an adversary is trying to trap us, so we can assume that the<br />

unknown O-constants are reasonably small. With a pocket calculator we find<br />

that S4 = & + & + & + & = 0.2170107; and our asymptotic estimate when<br />

n = 4 comes to<br />

$(1+$(-t+ $(-;+f(f +;(-& + ;+)))) = 0.2170125.<br />

If we had made an error of, say, & in the term <strong>for</strong> ne6, a difference of h &<br />

would have shown up in the fifth decimal place; so our asymptotic answer is<br />

probably correct.

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

Saved successfully!

Ooh no, something went wrong!