Chapter 4: Asymptotic Approximations
Exercise 4.1
Expanding and gives
thus .
Clearly, , so .
Exercise 4.2 🌟
Start by factoring . Let’s show that the second summand is
thus, . We also have
hence, .
Exercise 4.3
Therefore, for .
Exercise 4.4
The O- and o-notations provide ways to express upper bounds (with o being the stronger assertion). Consequently, . By combining the results from the previous two exercises, for fixed, we can conclude (see also section 4.3 of the book)
Alternative Proof
Instead of relying on basic algebraic manipulations involving the O-notation, we can represent the numerator of as a polynomial . Since there are terms in this product, multiplying the from each term gives us a leading factor of . To find the next term (the coefficient of ), we sum the constant terms from each factor
Thus, the numerator expands to
Dividing by gives
The first term is our leading term. All subsequent terms form a polynomial of degree . Therefore, their sum is (see also the previous exercise). An analogous reasoning applies for the case .
Exercise 4.5
Exercise 4.6
The cosine function oscillates between -1 and 1, thus as we have . Clearly, it’s bounded from above, but doesn’t tend to 0. Therefore, it is but not .
Exercise 4.7
The last line follows from Exercise 4.5, thus is exponentially small.
Exercise 4.8
In the last line , since after cancelling one logarithm on both sides, we are left with a constant term "against" a logarithm that grows to infinity. Observe that we don’t care about the base of a logarithm on the RHS, as it’s just a constant multiple of a natural logarithm. Therefore, is exponentially small.
By employing the same reasoning as previously, we see that now grows faster than any constant. Therefore, is exponentially small.
Exercise 4.9 🌟
The absolute error is , whilst the relative error is . We have
For the absolute error is ≈2.6 and the relative error is ≈29.52%.
For the absolute error is ≈13,781 and the relative error is ≈0.02%.
Exercise 4.10
Let be exponentially small, meaning for any fixed , . For any polynomial , where is the degree of the polynomial, we can choose , such that . This concludes the proof.
Exercise 4.11
Chapter 2 of the book explains the Master Theorem with a note that floors/ceilings can be ignored without breaking the asymptotic result. The term implies that every time we recurse, we introduce a small discrepancy due to potential rounding errors. This gives
In a binary recursion tree, where every internal node has 2 children, the number of nodes doubles at every level. The sum of this error across the whole tree is proportional to the number of nodes in the tree
Consequently, , where ideal solution denotes the case when is a power of two. We’ll derive these ideal solutions and see that the extra error has no significance on them (asymptotically speaking).
essentially falls under case 2 of the Master Theorem. We have levels in the recursion tree taking work per level. Therefore, . We cannot use -notation because the term allows for the driving function to be 0 or even negative (see the next exercise).
can also be handled using the summation approach. We have levels in the recursion tree taking work per level. Therefore, .
means that . Dividing by and letting yields . Iterating this recurrence gives , so . Therefore, .
Exercise 4.12
This is a continuation of the previous exercise, where the first case is already covered:
entails that .
entails that .
Exercise 4.13
Both and grow like , and the additive perturbation in the argument of becomes asymptotically negligible. To see this, we just need to iterate the recurrences until hitting the base cases.
For the recursion unfolds as (see also Exercise 2.68)
where eventually, so the sum terminates. Since , each term is , and the sum behaves like a convergent infinite geometric series as
For the recurrence is slightly perturbed
But asymptotically , so each term in the sum is still , and the same geometric series argument applies. Because , the geometric series is "head-dominated" (the first few terms contribute the most to the sum). The errors introduced by the perturbation accumulate at the tail end of the series where the terms are small. See the next section of why/how belongs to the class of functions that permits this reasoning.
Extending the Class of Functions
In order to apply the above logic to a broader class of functions , we would need the following to hold:
The term behaves like , so we can factor out of the sum, just like we did with .
The perturbation disappears for large , since we expect for this class of functions.
If is a positive non-decreasing regularly varying function with index (see Definition 4 in the cited paper), meaning
then we may assume the previously listed properties. This covers most functions polynomial in and . For example, satisfies this, since
Let’s employ the squeeze theorem to prove that we can perturb the arguments without impacting the asymptotic behavior. For any , we can choose large enough, such that the perturbed argument is eventually "sandwiched" between two constant scalings of . The rest follows from being a positive non-decreasing regularly varying function.
The conclusion follows by letting .
Exercise 4.14
According to Exercise 3.17
Thus, , , and , so the approximate solution is as before.
Thus, , , and , so the approximate solution is as before.
Exercise 4.15
According to Exercise 3.18
We have two poles of the same modulus, so we must take the one of highest multiplicity. Thus, , , and , so the approximate solution is as expected.
Exercise 4.16
According to Exercise 3.20
Thus, , , and , so the approximate solution is as expected.
Exercise 4.17 🌟
According to the fundamental theorem of algebra a degree polynomial has exactly roots, counted with multiplicity.
Showing that the Roots are Distinct
We can rewrite as
Observe that for , thus isn’t a root. Consequently, the roots of are exactly the roots of , excluding . A polynomial has multiple roots only if and its derivative share a root.
The unique roots of the derivative are and . Apparently , so isn’t shared. For the other candidate, we have
We would need . But for all , , so the power term grows exponentially. Therefore, all roots of are distinct.
Showing that Exactly One Root has Modulus > 1
Because the coefficients of are real, the singleton dominant root must be a real number. We can verify that and , hence by the intermediate value theorem, there is a real root in .
By using Rouché's theorem on the unit disk, we show that the remaining roots of lie inside the unit circle ; this theorem relates the number of zeros of two functions, and , inside a region. Let’s rearrange the terms of
We focus our attention on a circle of radius (where is a very small positive number). The magnitudes of our functions on the contour line are:
Since , we have , thus . By Rouché's theorem, the polynomial has the same number of roots inside the circle as .
has a root of multiplicity at the origin (). Therefore, has exactly roots strictly inside the circle . Consequently, has exactly roots inside the same disk; recall that we must exclude , which was counted for .
Exercise 4.18
We need to apply the result from the previous exercise. Since the recurrence formula reflects , we know there is a single root (approaches 2 as ) of highest modulus. According to Theorem 4.1, . Wikipedia describes this variant as -acci sequence and provides an expression for the leading term.
Exercise 4.19
According to Exercise 3.55
Thus, , and . We need to compute .
Each factor can be written as
Apparently, and , where . Consequently, . By the general Leibniz rule we have
At all terms with vanish because still contains a factor of . For we have . Thus,
By inserting all components into the formula from Theorem 4.1, we get the required identity of this exercise.
Exercise 4.20
The Python script below generates the extended table. It uses pandas to produce formatted output.
The code displays the following table:
Exercise 4.21
Substitute and expand . Tool support is useful, once the underlying mechanisms are properly understood, to save time and reduce a chance for an error. For example, we can type in WolframAlpha the following command
It produces the requested expansion
Exercise 4.22
Exercise 4.23 🌟
Let’s start with a Taylor expansion of the expression in terms of
A more streamlined version would be stated in terms of , since . By taking in the geometric series, we get . Replacing the factors involving in the above series with the given expansion of gives
Exercise 4.24
Let , so . By using Table 4.2 and expanding each function to within , we get
The computed value is 2.20553, which is to within .
Exercise 4.25
Observe that , so
Table 4.2 has an expansion of the geometric series. By differentiating both sides of that identity, we get
Now, we substitute into our derived series
Vertical bars are used to delineate slots populated with successive natural numbers. Each slot accommodates two digits, enabling this sequence to progress up to the number 97. In other words, we can predict digits in this manner within . The pattern breaks at slot 98 due to the carry from the 100th term:
We can generalize this to generate sequences of integers padded to digits
For example, (8 is missing due to the carry-over from 9).
Exercise 4.26
If we apply the nonasymptotic version of Stirling’s formula to describe , we get
Our equation becomes
where represent the reference, approximate and error terms, respectively.
Since and , we have the following bounds
This gives
Let the relative error be defined such that . This gives
We can assert that .
Exercise 4.27
According to Table 4.4, .
The specific bounds implied by the absolute formula are
The specific bounds implied by the relative formula are
The LHS is truncated to zero as a negative lower bound is meaningless. The RHS is huge, since the assumed constant is too large. In a relative formula, we expect that should decay rapidly even for small problem sizes.
Exercise 4.28
The exact value is .
The specific bounds implied by the relative formula are
Exercise 4.29
Let’s split the original recurrence at the threshold value
Since converges then converges, too. We can rearrange the remainder term as
Hence, , which concludes the proof.
Exercise 4.30
We can apply Borel's integral summation method, which relies on the Laplace transform (see Exercise 3.14). This immediately gives
The derivation uses the exponential integral to craft the "closed-form" solution (see also section 4.8 of the book). The last line follows after employing the substitution .
Exercise 4.31
There is a complementary -notation for the opposite direction with respect to the o-notation. It denotes a strict lower bound (grows strictly faster than). We use it in our list below:
is false, since . We can say that .
is false (see Exercise 4.9). We can say that .
is exponentially small, so is true (see Exercise 4.7).
is true, since .
Exercise 4.32
The Taylor expansion of in terms of is
We can provide a more streamlined version in terms of (see also Exercise 4.23). The book shows the expansion of . We need to replace the factors involving in the expansion of with the given expansion of . We get
Exercise 4.33
We can expand the number of terms for from Table 4.6. The approximation to within is
The approximation to within simply includes that was previously absorbed into . Thus,
Exercise 4.34
Exercise 4.35
Exercise 4.36
A full treatment of this topic is available in the paper Asymptotic Expansions of Central Binomial Coefficients and Catalan Numbers.
Exercise 4.37
Exercise 4.38
Exercise 4.39
Based on the asymptotic expansion, the approximate value of the expression is for large .
Exercise 4.40
The middle term in the penultimate line must be expanded as , where is the argument to the exponential function. We must retain the three asymptotically largest components.
Exercise 4.41
When interest is compounded daily at a 10% annual rate on a $10,000 principal, after 365 days, the amount is . Instead of computing this value directly, let’s apply the result from Exercise 4.39. Here, we have , so the total amount increases to . This is about $51.7 more than what would be paid if interest were paid once a year.
Exercise 4.42
Exercise 4.43
Exercise 4.44
At this point, we could say that the order of growth of is , but this would be a loose bound. Since the first two terms match, we must expand until we find a difference. Let and leverage WolframAlpha to perform the hard work.
Apparently, we have a mismatch at the 4th term, thus the order of growth of is .
Exercise 4.45
By substituting into the expansion of , we get
Exercise 4.46
This exercise is about the asymptotic expansion of the Lambert W function. The cited article contains the full expansion in terms of substitutions and . We sketch the steps leading to that expression using the reversion technique from the book.
Start with the basic equation marked with an asterisk
The first iteration of bootstrapping gives . The second iteration gives . The third iteration gives
By carrying out two additional iterations, we get the equation from the cited article to within the requested accuracy. For the sake of completeness, here is the identity without using symbols and
Exercise 4.47 🌟
By applying the hint from the book, this equation transform into . We already know the reversion of this form from the book:
Now, we just need to express it again in terms of and the original coefficients
Exercise 4.48
is known as the Basel problem. According to the direct comparison test, the sum also converges to some constant . The tail can be approximated using the asymptotic expansion of (see Table 4.6). This gives
We can estimate by using integration by parts to find the leading asymptotic term. Let and . Then and .
This gives
so that is already a good approximation to the constant , just by taking the first 3 terms (together with a correction factor). It is a trivial matter to calculate the value of this constant to any reasonable desired accuracy.
Exercise 4.49
The infinite sum converges to the reciprocal Fibonacci constant . Fibonacci numbers grow exponentially, where is the golden ratio. Consequently, the terms in the tail decay exponentially and the tail sum can be approximated by a geometric series. Thus, .
Exercise 4.50
The tail can be bounded analogously to the example given in the book pertaining to tries. Therefore, .
Exercise 4.51
Here, we need to use the tail, since the terms in a finite sum are rapidly increasing.
Exercise 4.52
Notice the usage of the falling factorial (see also Chapter 3 of the book).
Exercise 4.53
Let , so . This gives
Exercise 4.54
Let , so . We don’t need higher derivatives, since only the first Bernoulli correction is required. This gives
The definite integral can be computed using WolframAlpha by issuing Integrate[1/(1+x^2),{x,0,1}].
Exercise 4.55
Let’s use the formula from the book
The following Python script dumps the value of accurate to 10 decimal places. By uncommenting (adding) additional correction terms, we can attain the same accuracy in third of the time, since we only need to take seven summands from the harmonic sum.
The code prints
Exercise 4.56
We’ve already mentioned in Exercise 4.48 that . Let’s take and compute the Euler-Maclaurin constant
Employing Theorem 4.3 gives
Exercise 4.57
This is a variation of the previous exercise. The infinite sum converges to the Apéry's constant. Without repeating the technical details, we get
Exercise 4.58
Using Theorem 4.3, as in the previous two exercises, we obtain the following asymptotic estimates
The fractional arguments of the Riemann zeta function do not have known simple closed forms, like in Exercise 4.56; they’re typically evaluated numerically.
Exercise 4.59 🌟
The main idea is presented in the article about the asymptotic expansion of the alternating harmonic numbers on Wikipedia. In both subtasks, we separate the terms based on the parity of .
Expansion of
Let’s start by assuming . This gives
When , we’ve
The last line follows by transforming in terms of , as explained in the book (see also Exercise 4.32). But notice the similarity, only the signs are flipped. Therefore, we can combine the two cases into the following generic formula
Expansion of
Let’s start by assuming . This gives (see also the previous exercise about the expansion of )
When , we’ve
As before, we can conclude that the odd case differs only in flipped signs. Thus,
Exercise 4.60
To find the asymptotic behavior of the generalized binomial coefficient, our primary goal is to determine the asymptotic expansion of the ratio as . According to corollary of Theorem 4.3, we’ve
The continuous extension for large is
Substituting the two equations gives
We can apply Taylor expansion on to get
Now, substituting back this expansion and simplifying yields
We get the required result
Exercise 4.61
Replace the asymptotic estimate used in the derivation of Theorem 4.5 with the inequality , valid for all . See the proof of the corollary of Theorem 4.5 for context.
Exercise 4.62
The proofs of the relative bounds for the Ramanujan Q- and R-distributions are literally the same. Stirling’s formula for is available in Table 4.6 in the book.
Notice that the above approximation is valid only for . Under this regime, both Stirling error terms, and , "vanish" for large . Furthermore, the term is absorbed into .
The R-distribution is handled in an analogous fashion starting with
Exercise 4.63
The best approach here is to simply reuse a high-quality implementation of the PMF for the binomial distribution. The following Python snippet demonstrates the typical usage scenario.
Exercise 4.64
If we cannot reach the required accuracy by relying on Theorem 4.6 alone. We must go back to the proof from the book and add more terms to every component in the product. The augmented central binomial coefficient is
The extended product of the Ramanujan Q- and R-distributions is
The last two steps follow from substituting , where is the displacement (hidden constant inside the O-notation) and expanding . Multiplying together the two components, we get
To get an absolute error, we would just distribute the leading term all the way through in the formula above and simplify.
Exercise 4.65

Exercise 4.66
This is the case when the binomial distribution can be efficiently approximated by a normal distribution centered at (mean). For example, the book already uses such an approximation with in Figure 4.3. More generally, the estimated probability is
Exercise 4.67
The paper The Normal Approximation to the Binomial Distribution shows a full derivation by employing the hint from the book (see section 2); the shift factor is denoted as . At the end, we get a formula similar to the one from Theorem 4.6.
Exercise 4.68 🌟
Theorem 4.7 isn’t appropriate here because the mean isn’t bounded as . The previous exercise handles the case when is fixed. Nonetheless, we can tweak the method from the cited paper to arrive at a different approximation. In other words, the method itself needs to be adapted to a different asymptotic regime.
We list here the recipe for arriving at the final formula:
Our starting point with Stirling's formula is precisely equation (1) in the notes.
The in this exercise is analogous to in the paper. We set . The standard deviation in our new regime is . So, allowing is exactly the same as allowing to deviate by a few standard deviations.
The notes expand and in powers of and . Nonetheless, , hence term's higher-order corrections are negligible compared to the former (only the one contributing to the exponent of matters). Observe that the largest correction cannot hide , since it isn’t a constant anymore. At any rate, this boils down to .
The square root pre-factor is Using the Taylor expansion for small , we get that the dominant correction term becomes .
After incorporating all previously mentioned changes, we obtain (using instead of
If then the relative error is . If then the error jumps to , so we must have at least . Finally, the baseline error term covers the edge case .
Exercise 4.69
This is a variation of the previous exercise, so we don’t repeat all the steps again; the methodology is the same. Let and . The following asymptotic holds:
If then the relative error is . Notice, as in the previous exercise, the explicit baseline error term that covers .
Exercise 4.70
Let so that . This gives
The definite integrals can be easily computed in WolframAlpha.
Exercise 4.71
Let’s follow the hint from the book’s website for this exercise. This gives
Notice that is strictly decreasing as grows and has the same asymptotic approximation as the Q-distribution. Hence, by the same arguments as in the proof of Theorem 4.8, together with the solution of the previous exercise, we can confirm the validity of the approximation of .
Exercise 4.72
The paper On Ramanujan's Q-function by Flajolet et al. elaborates in detail the developments around Q- and R- distributions and provides the proof of this exercise.
Exercise 4.73
Assume is even for simplicity (odd gives the same asymptotic behavior). Let with . We know that most of the probability mass will be concentrated around the mean. We can now apply Theorem 4.6 to get
Here, we’re only working with binomial coefficients rather than distribution. Therefore, we don’t divide by the normalization factor. By leveraging the Laplace method, similarly as in Theorem 4.8, we can uniformly bundle the diminishing tails (far away from the mean) into a single formula.
Exercise 4.74
Theorem 7.4 (Involutions) from the book provides all the details.
Exercise 4.75 🌟
To derive the asymptotic estimate for our sum, we use Stirling's approximation (see Table 4.6) to transform the discrete sum into a continuous integral dominated by a single "peak". This is the main idea behind the Laplace method. We start by dissecting the summand
Observe that it’s nonzero for , so let with . Substituting the approximation for each factorial and simplifying, we get
where
We can find the maximum by typing in WolframAlpha
It outputs . At this specific point, (golden ratio). To see this, we should just raise to the maximum value reported by WolframAlpha. The square of this value is .
Since the function drops rapidly from , we can approximate the sum using the Euler-Maclaurin formula. We expand as a Taylor series around
With the help of WolframAlpha, we can compute symbolically the second derivative and evaluate it at
This gives
The sum is then approximated by the integral
In essence, the Laplace method relies on the fact that as , the function becomes so incredibly "sharp" at the peak that the tails of the distribution become negligible. Therefore, the error introduced by extending the integration limits to is exponentially small. For example, just at some distance from the contribution decreases to only (see also Exercise 4.10).
Exercise 4.76
We’ve a flipped Figure 4.7, where the first terms are negligible, whilst the rest contribute around 1. Using the same bounds as in Theorem 4.10, we get
As noted in Theorem 4.10, the error bound can be tightened all the way down to .
Exercise 4.77
The first terms are significant, whilst the rest drops very quickly to zero. For large , we can approximate this sum with an integral over the whole possible range for . This gives
The second line follows after the substitution , so that
The last integral can be evaluated using integration by parts. Let . Notice that implies . Using and gives
Thus,
Last updated