Some asymptotic calculations
Overview
Section 1.2.11.3 of TAOCP defines three sums. and have and terms, and has infinitely many terms. Each term is a product of fractions that are close to at first and then fall. The question is how large each sum is when is large. The answer is the same for the three sums to first order: each is close to . The sums differ in the second term, which is for , for and for .
The section proves the result for and through the incomplete gamma function . Eq. (4) says that is . Eq. (9) says that is times . Theorem A then gives the size of for large . The proof of Theorem A splits the integral at , treats the upper tail by the substitution and treats the short middle part by a Taylor expansion. The sum needs another idea: it compares a sum with an integral by the trapezoid form of Euler's formula.
The ideas
and are two halves of one exponential series. The terms of are the first terms of , and the terms of are the rest, each scaled by . This gives eq. (4) at once. The size of is by Stirling's formula, so each of the two is about half of this.
The incomplete gamma function measures the cut. The partial sum of the series for equals times the fraction of that the integral of misses beyond . This is eq. (5) and eq. (9). With the cut is at the peak of the integrand, and the fraction is close to .
Near its peak the integrand is a Gaussian. The function has its peak at . A change of variable that turns into moves the work to a power series in . Watson's lemma then turns each power into a gamma value.
A short interval needs only a Taylor series. The piece of the integral from to has a length that does not grow. There the exponent is , and a few terms are enough.
A sum can be turned into an integral. The terms of are close to after Stirling's formula. The sum of these is the integral plus the half of the last term plus a small remainder. The integral is again a value of .
C1 follows the order of the section. Each numbered equation of the section has its own block, and the five-term forms of , and are Theorems C1.1.2.11.3.27 to C1.1.2.11.3.29. C1 adds two blocks that the section has only as text or exercises: the change of variable of Lemma C1.1.2.11.3.11 and Watson's lemma (Lemma C1.1.2.11.3.16).
Definitions, results and proofs
Definition C1.1.2.11.3.1 (the sum , TAOCP eq. 1.2.11.3(1)). For an integer let
Node: TACDQGD0S2 · Lean: TAOCP.S1_2_11.P · status: not stated yet
Explanation. The term is . The term is for . The sum has nonzero terms. The terms are positive and they first fall slowly and then fast.
Example. For the terms for are , , , , and . The sum is . The exact values for small are , , and .
Proof. The definition is a formula, and a formula has no proof. The check of the terms for is a calculation: for the term is , and for the term is .
Definition C1.1.2.11.3.2 (the sum , TAOCP eq. 1.2.11.3(2)). For an integer let
Node: TAWARCR6R7 · Lean: TAOCP.S1_2_11.Q · status: not stated yet
Explanation. The -th term is , a product of factors. The first factor is . The last term has and equals .
Example. For the terms are , , , and . The sum is . Also , , and .
Proof. The factor form follows from . For and the product is .
Definition C1.1.2.11.3.3 (the sum , TAOCP eq. 1.2.11.3(3)). For an integer let
Node: TARR5ZVXYG · Lean: TAOCP.S1_2_11.R · status: not stated yet
Explanation. The -th term is a product of factors with . Each factor is below , so the terms decrease. The ratio of the term to the term is , so the series converges.
Example. For the first terms are , , , , , . The sum of the whole series is .
Proof. The term of the sum is . For the term equals , since . The series converges by the comparison with a geometric series: for the ratio of two terms is at most .
Theorem C1.1.2.11.3.4 (the sum of and , TAOCP eq. 1.2.11.3(4)). For every integer ,
Node: TA49N7ZT9R · Lean: TAOCP.S1_2_11.eq4_QR · status: not stated yet
Explanation. The right side is about by Stirling's formula, since . If and have the same size, each is about . The proof shows that the two sums are two parts of the series of .
Example. For , . The right side is .
Proof. In put . Then runs from to , and since . So . In put . Then and runs from to infinity. The two ranges of do not overlap, and together they are all . So .
Theorem C1.1.2.11.3.5 (Taylor's formula with the integral remainder, TAOCP eq. 1.2.11.3(5)). Let be an integer and let have continuous derivatives on an interval that contains and . Then
Node: TAC9XV0GX3 · status: not stated yet
Explanation. The sum is the Taylor polynomial of degree at , and the integral is the exact error. The section uses the case . There every derivative is , and the formula with in place of says
So the tail of the exponential series is times an integral of , and this is the incomplete gamma function of the next definition.
Example. Take , and . The left side of the second display is . The integral has the value , and one sixth of it is . For , and the formula says , and indeed the integral is .
Proof. Induction on . For the claim is , which is the fundamental theorem of calculus after the change . Suppose the claim holds for , with the remainder . Integrate it by parts with and , so that and . This gives
The first term on the right is the term of the sum, so the claim holds for . For the case replace by , then put and take out of the integral.
Definition C1.1.2.11.3.6 (the incomplete gamma function, TAOCP eq. 1.2.11.3(6)). For and let
Node: TAM8ZK8DEJ · status: not stated yet
Explanation. The integral converges at for , since is integrable there. As the value tends to . This is why has its name. By the case of Theorem C1.1.2.11.3.5, for an integer ,
Example. , and . For and the displayed relation says , and indeed .
Proof. The case of Theorem C1.1.2.11.3.5 gives . So . For the first claim: on and . Therefore exists for and increases with .
Theorem C1.1.2.11.3.7 (the power series of , TAOCP eq. 1.2.11.3(7)). For and ,
Node: TAHHR66KSW · status: not stated yet
Explanation. The series is the integral of the series of , term by term. It converges for all and it is useful for small . For large it has large terms of both signs and loses digits.
Example. For and the series is . The partial sums are , , , , , and the limit is .
Proof. On the series converges uniformly, and is integrable. So the series times can be integrated term by term. Since , the claim follows.
Theorem C1.1.2.11.3.8 (the series of , TAOCP eq. 1.2.11.3(8)). For and ,
Node: TADV1EVMP5 · status: not stated yet
Explanation. All terms are positive. There is no loss of digits for any . This is the series that gives in the next theorem.
Example. For and the series is . The left side is .
Proof. Let be the sum of the series. The ratio of two terms is , so the series converges for all , and it can be differentiated term by term. The derivative of is for , and for . So . Hence . As the value tends to , since . Integrating from gives .
Theorem C1.1.2.11.3.9 ( in terms of , TAOCP eq. 1.2.11.3(9)). For every integer ,
Node: TADZYKRXBK · status: not stated yet
Explanation. With Theorem C1.1.2.11.3.4 and the relation after Definition C1.1.2.11.3.6 this gives . So both and depend on the one number , which is the part of the Gamma integral that lies to the left of its peak.
Example. For : and . The product is .
Proof. Put in Theorem C1.1.2.11.3.8. Since ,
Multiply by . The right side becomes .
Theorem C1.1.2.11.3.10 (the split of the ratio, TAOCP eq. 1.2.11.3(10)). For and real with ,
Node: TAVKMMJZAZ · status: not stated yet
Explanation. The first integral is the upper tail beyond the peak at . The second integral is signed: it is negative when . The tail needs a change of variable. The middle part has a bounded length and needs a Taylor series. For the sums, and .
Example. For and the left side is . The tail is and the middle part is . So .
Proof. By definition . Write . This holds for both signs of . Divide by .
Lemma C1.1.2.11.3.11 (the change of variable , TAOCP Section 1.2.11.3, text before eq. (11)). Let for . Then is a continuous, strictly increasing function of with and as . For every real and every ,
Node: none
Explanation. The substitution removes the factor from the integrand, since all of its dependence on goes into the exponent . The price is the factor , which is large near and must be written as a function of (Lemma C1.1.2.11.3.13).
Example. For the value is . For : and . The slope is , so .
Proof. The derivative is . It is positive for , so is strictly increasing. Also , and since . Take exponentials of to get the first equation. The inverse of is .
Theorem C1.1.2.11.3.12 (the tail integral after the substitution, TAOCP eq. 1.2.11.3(11)). For let . Let be the function of that Lemma C1.1.2.11.3.11 defines. Then
Node: TAK2P03SBW · status: not stated yet
Explanation. The first form puts the lower limit at and shows the factor that sets the scale. The second form is a Laplace integral: the weight is , which has total mass , and the function that it averages is .
Example. For the ratio has the value . A direct quadrature of gives the same value.
Proof. Put . Then , runs from to as runs from to , and . This is the first form. The second form follows from Lemma C1.1.2.11.3.11, which gives .
Lemma C1.1.2.11.3.13 (the series for , TAOCP eq. 1.2.11.3(12)). Let with . For small there is a unique . It has the first series below, and has the second series, with .
Node: TAG5N33C8A · status: not stated yet
Explanation. The coefficient of is . The terms come in powers of , since near . The second display is the series that Theorem C1.1.2.11.3.17 integrates term by term.
Example. For the exact root is . The series for with the five terms gives . The second display gives against the exact value . The difference is , and the next term is .
Proof. The expansion gives . So with . The function is analytic near with . Its first terms are
Since at , the inverse function is analytic near , and . Put this series in the display above and compare the coefficients of . For it gives . For it gives , so . For it gives , so . For it gives , so . The same step for gives . The uniqueness of holds since is strictly increasing (Lemma C1.1.2.11.3.11).
For the second display write . The reciprocal of the bracket is . So . Add and put . The powers are , , and . The coefficients become , and . The constant is .
Theorem C1.1.2.11.3.14 (the far part of the tail integral, TAOCP eq. 1.2.11.3(13)). Let be the function of that Lemma C1.1.2.11.3.11 defines, and let be fixed. Then the integral below is as . More precisely, for every ,
Node: TAVKJ30ZB5 · status: not stated yet
Explanation. The series of Lemma C1.1.2.11.3.13 holds only for small , so the integral of Theorem C1.1.2.11.3.12 is cut at a small . This theorem says that the part beyond does not matter: it falls faster than every power , so it is absorbed by any error term of the form .
Example. Take and . The root of is , so the constant is . The integral has the value , and the bound is .
Proof. The function of Lemma C1.1.2.11.3.11 is strictly increasing, so its inverse is increasing too. For this gives and . Hence the integral is positive and at most .
Theorem C1.1.2.11.3.15 (a Laplace integral of a power, TAOCP eq. 1.2.11.3(14)). For and ,
Node: TAJ7BS8GDF · status: not stated yet
Explanation. This is the only integral that the method needs. It turns the power into the power and a gamma value.
Example. For and the integral is . The right side is .
Proof. Put . Then and . So the integral is . The integral converges since .
Lemma C1.1.2.11.3.16 (Watson's lemma, TAOCP Section 1.2.11.3, exercises 19 and 20). Let be a function on with for some . Let , and . First claim: if for , then as . Second claim: if is bounded on and for , then as
Node: none
Explanation. Only the values of near decide the integral, since the weight kills the rest. The second claim says that the expansion of near can be integrated term by term. This is the tool of Theorem C1.1.2.11.3.17. The condition on says that the integral exists, and it holds for every that grows at most like a power.
Example. Let . Then . For the value is , and times it is . This is bounded, as the first claim says with , and it tends to .
Proof. For the first claim split the integral at . On let . Then . On and for the bound holds. So . This is , since an exponential beats every power.
For the second claim let . On the bound is , with . On the function grows at most like a power of , so is integrable and the first claim applies. It gives , and the factor gives . The remaining terms are exact by Theorem C1.1.2.11.3.15 with , which is above for .
Theorem C1.1.2.11.3.17 (the size of the tail integral, TAOCP eq. 1.2.11.3(15)). As ,
Node: TA7TJQDG3J · status: not stated yet
Explanation. The leading term is , and it is half of . So the tail is about half of the whole integral, as the symmetry of the peak suggests. The constant is the first correction.
Example. For the bracket has the five terms , , , and . Their sum is . The exact value is . The difference is , well inside .
Proof. Apply Lemma C1.1.2.11.3.16 to the second form of Theorem C1.1.2.11.3.12 with and . By Lemma C1.1.2.11.3.13, has the expansion with and the error on a short interval . On the proof of Theorem C1.1.2.11.3.14 gives , so is bounded there, and the part of the integral beyond is by that theorem. The coefficients are , , , and . The gamma values are , , , and . The products are , then , then , then and . The error is .
Lemma C1.1.2.11.3.18 (the middle integral after the shift, TAOCP eq. 1.2.11.3(16)). For and real with , let . Then
Node: TA3GKQW5EX · status: not stated yet
Explanation. The shift puts the peak at . The factor is at and it falls slowly when is large. For the integral over is oriented from down to , and it is negative.
Example. For and the ratio is . For the ratio is .
Proof. Put . Then and . The limits and become and .
Theorem C1.1.2.11.3.19 (the size of the middle integral, TAOCP eq. 1.2.11.3(17)). For fixed real , as ,
Node: TA2HMW6KBH · status: not stated yet
Explanation. The first term is the length of the interval. The correction is of order and has the sign of . Both and are allowed.
Example. For and the bracket is , and the exact ratio is . For the bracket is , and the exact ratio is . The differences are of the size times a constant.
Proof. Let . The series of the logarithm gives , so
and the is uniform for . Expand the exponential: with . The result is . Integrate from to : the terms give , , and . The integral of an function over an interval of fixed length is . Lemma C1.1.2.11.3.18 supplies the factor .
Theorem C1.1.2.11.3.20 (the scale factor, TAOCP eq. 1.2.11.3(18)). As ,
Node: TAW2XR1EWM · status: not stated yet
Explanation. This is the reciprocal of Stirling's series for the real argument . The theorem is the link between the sizes of and and the ratio of the incomplete gamma function to the complete one.
Example. For the exact value is . The three terms give . The difference is . The next term of the series is times , and this is at .
Proof. Theorem C1.1.2.11.2.21 gives with , and . Since , . So . Take the reciprocal. Then . Let . Then , and .
Theorem C1.1.2.11.3.21 (Theorem A, TAOCP Theorem 1.2.11.3A). For fixed and large ,
Node: TAADTS71HC · status: not stated yet
Explanation. At the peak the ratio is , as it must be. The shift moves the cut to the right of the peak when and so raises the ratio, by about . The terms of order and cancel.
Example. For : at the exact ratio is and the three terms give . At the values are and . The scaled difference times (exact minus formula) is at and at . This is a constant, so the error is of order . For the ratio at is , and the formula gives .
Proof. Write and . By Theorem C1.1.2.11.3.10, the ratio is , where and are the brackets of Theorems C1.1.2.11.3.17 and C1.1.2.11.3.19. Collect the powers of in :
- : .
- : .
- : .
- : .
- : .
In the powers and have the coefficients and . The error of is and the factor turns it into . The error of is , and the error of is times a bracket of size , so . So has the constant , the term and the term .
Theorem C1.1.2.11.3.22 (the expansion of the ratio, TAOCP eq. 1.2.11.3(19)). For fixed real , as ,
Node: TAYSC8E1TP · status: not stated yet
Explanation. The ratio is the probability that a gamma random variable with shape is at most . The term of order vanishes at . So the median of this distribution, the point where the ratio is , lies at , and not at the peak of the density. At the coefficient of is . Since the derivative of the right side in is about , the median is close to .
Example. For and the exact ratio is , and the formula gives . The exact median for is , and .
Proof. This is the conclusion of Theorem C1.1.2.11.3.21. At the coefficient is .
Theorem C1.1.2.11.3.23 (the terms of after Stirling's formula, TAOCP eq. 1.2.11.3(20)). For ,
Node: TAEEFV9391 · status: not stated yet
Explanation. The first form has the index of Definition C1.1.2.11.3.1. The second form replaces by its Stirling series, so that becomes a sum of the type . The -term holds uniformly for .
Example. For the terms for are , , , and , and they sum to . With the factor the second form gives . Without the correction, with the factor , it gives .
Proof. In Definition C1.1.2.11.3.1 put . The term for is , and () gives for . This is the first form. Next, , and by Theorem C1.1.2.11.2.19, . So . The is uniform for , since the ratio is a bounded function that tends to .
Theorem C1.1.2.11.3.24 (the sum of by Euler's formula, TAOCP eq. 1.2.11.3(21)). Let be an integer, let and let . Then
Node: 1.2.11.3-(21) · Lean: not yet stated
Explanation. This is Euler's summation formula of Section 1.2.11.2 with , applied to on . The term is the half of the last term, and is . The point of the formula is that the integral is a value of the incomplete gamma function and that is small.
Example. For the sum is . The integral is , the half term is , the term with is , and . A direct quadrature of the integral that defines gives the same value . Indeed .
Proof. Write . Lemma C1.1.2.11.2.2, applied on each interval and summed over , gives
The function is continuous, has period , equals at the integers and has the derivative between them. Integration by parts gives . Here , since . Finally , so and .
Theorem C1.1.2.11.3.25 (the sum as an incomplete gamma value, TAOCP eq. 1.2.11.3(22)). As ,
Node: 1.2.11.3-(22) · Lean: not yet stated
Explanation. The integral of Theorem C1.1.2.11.3.24 is by Definition C1.1.2.11.3.6. The term with and the remainder are both smaller than the half term by a factor of order , so they go into the . The value is the case , of Theorem A.
Example. The difference of the two sides without the term, divided by , is for and for . These are close to , which is and : the term with is most of the difference, and is much smaller.
Proof. Let and . The term is at most . It remains to show that . Since , . The second derivative is . Let . Then on and on , since . So rises from to and then falls to , and . Next , and , since has its maximum at . Also , since . Hence .
Lemma C1.1.2.11.3.26 (a power with a shifted base, TAOCP eq. 1.2.11.3(23)). For fixed real and , as ,
Node: 1.2.11.3-(23) · Lean: not yet stated
Explanation. The factor tends to , and the lemma gives the first correction. The proofs below use it to move between the scales and with . With it says .
Example. For , and the exact ratio is , and . For and the ratio is against .
Proof. For take logarithms. The series of the logarithm gives . So the logarithm of the ratio is , and .
Theorem C1.1.2.11.3.27 (the size of , TAOCP eq. 1.2.11.3(24)). As ,
Node: 1.2.11.3-(24) · Lean: not yet stated
Explanation. The leading term is the same as for and below, and the constant is . The proof below derives the first two terms in full and the third term with one bound that it only sketches. The last two terms need one more term of every expansion in the proof. They follow from exercise 14, which treats sums of the form in general, and this chapter checks them only by computation.
Example. For the exact value is . The five terms are , , , and , with the sum . The difference, times , is , and for , and , so it stays bounded. With four terms the difference, times , is , and , close to .
Proof. Let , , and .
Step 1: the factor of Stirling. Write . By Theorem C1.1.2.11.2.18 with , the number equals with , so it lies between and , and . By Theorem C1.1.2.11.3.23, with and . The function rises and then falls. Each term below the peak is at most the integral of over the next unit interval, each term above the peak is at most the integral over the previous one, and at most two terms remain. So , and .
Step 2: the main sum. By Theorem C1.1.2.11.3.25, . Theorem A with and gives , and Theorem C1.1.2.11.3.20 gives . By Lemma C1.1.2.11.3.26, , and . So and .
Step 3: the first two terms. By Theorem C1.1.2.11.2.19, . Since , Steps 1 and 2 give .
Step 4: the third term. Every error of order in Step 3 must now be found up to . Three facts are needed. First, by Theorem C1.1.2.11.2.19, and the method of Steps 1 and 2 with Theorem A at , gives . Second, by Theorems C1.1.2.11.3.20 and C1.1.2.11.2.19 and Lemma C1.1.2.11.3.26 with and . Third, the remainder of Theorem C1.1.2.11.3.24 is . This is a sharper bound than in Theorem C1.1.2.11.3.25. It comes from one more integration by parts, which turns into with . This chapter does not write out the bound for that integral. Its size is confirmed by computation: is at and at . With these facts, contributes , and contributes . The terms and change only by . The coefficient of is .
Theorem C1.1.2.11.3.28 (the size of , TAOCP eq. 1.2.11.3(25)). As ,
Node: 1.2.11.3-(25) · Lean: not yet stated
Explanation. lies above by about and below by about . The terms with half-integer powers of are the same for and , since they come from . The terms with integer powers have opposite signs.
Example. For the exact value is , and the five terms give . The difference, times , is , and for , and .
Proof. Let , and . By Theorems C1.1.2.11.3.4 and C1.1.2.11.3.9, and . Theorem A with and gives , since . Now and . Since ,
By Theorem C1.1.2.11.2.19, . Multiply term by term. The product is , since . The product is . The product is . The product of and is . Since , the difference is the claim.
Theorem C1.1.2.11.3.29 (the size of , TAOCP eq. 1.2.11.3(26)). As ,
Node: 1.2.11.3-(26) · Lean: not yet stated
Explanation. With Theorem C1.1.2.11.3.28 this gives , and , which is Stirling's series for .
Example. For the exact value is , and the five terms give . The difference, times , is , and for , and . The value is , and , and .
Proof. In the proof of Theorem C1.1.2.11.3.28, . The four products found there give the claim, now with the plus sign on .
Algorithms and programs
Section 1.2.11.3 has no algorithm and no program. The sums have short exact procedures. Each of and has finitely many rational terms, so exact arithmetic gives it. has terms and , and the ratio of two terms is below once , so a loop that stops when is below the wanted error finds . All the exact values and the checks in this chapter come from these procedures, from the identity of Theorem C1.1.2.11.3.4 and from numerical integration of the integrals and .
The exercises
The table has the exercises of Section 1.2.11.3. The kind is the class of spec 06.3, and the indexer of S0 fixes it in the map.
| Exercise |
Rating |
Markers |
Kind |
Lean |
Solution |
| 1.2.11.3-1 |
20 |
HM |
K1 |
not yet stated |
X1, 1.2.11.3-1 |
| 1.2.11.3-2 |
20 |
HM |
K1 |
not yet stated |
X1, 1.2.11.3-2 |
| 1.2.11.3-3 |
20 |
M |
K1 |
not yet stated |
X1, 1.2.11.3-3 |
| 1.2.11.3-4 |
10 |
▶ HM |
K1 |
not yet stated |
X1, 1.2.11.3-4 |
| 1.2.11.3-5 |
24 |
HM |
K1 |
not yet stated |
X1, 1.2.11.3-5 |
| 1.2.11.3-6 |
20 |
▶ HM |
K1 |
not yet stated |
X1, 1.2.11.3-6 |
| 1.2.11.3-7 |
30 |
▶ HM |
K3 |
not yet stated |
X1, 1.2.11.3-7 |
| 1.2.11.3-8 |
30 |
HM |
K1 |
not yet stated |
X1, 1.2.11.3-8 |
| 1.2.11.3-9 |
36 |
▶ HM |
K3 |
not yet stated |
X1, 1.2.11.3-9 |
| 1.2.11.3-10 |
34 |
HM |
K3 |
not yet stated |
X1, 1.2.11.3-10 |
| 1.2.11.3-11 |
35 |
▶ HM |
K3 |
not yet stated |
X1, 1.2.11.3-11 |
| 1.2.11.3-12 |
20 |
HM |
K3 |
not yet stated |
X1, 1.2.11.3-12 |
| 1.2.11.3-13 |
42 |
HM |
K1 |
not yet stated |
X1, 1.2.11.3-13 |
| 1.2.11.3-14 |
39 |
▶ HM |
K1 |
not yet stated |
X1, 1.2.11.3-14 |
| 1.2.11.3-15 |
20 |
HM |
K1 |
not yet stated |
X1, 1.2.11.3-15 |
| 1.2.11.3-16 |
24 |
M |
K1 |
not yet stated |
X1, 1.2.11.3-16 |
| 1.2.11.3-17 |
29 |
HM |
K3 |
not yet stated |
X1, 1.2.11.3-17 |
| 1.2.11.3-18 |
25 |
M |
K3 |
not yet stated |
X1, 1.2.11.3-18 |
| 1.2.11.3-19 |
30 |
HM |
K1 |
not yet stated |
X1, 1.2.11.3-19 |
| 1.2.11.3-20 |
30 |
HM |
K1 |
not yet stated |
X1, 1.2.11.3-20 |
Notes on the exercises. Each note uses the results proved above.
- Exercise 1 is Theorem C1.1.2.11.3.5, proved by induction on .
- Exercise 2 is Theorem C1.1.2.11.3.7, and exercise 3 is Theorem C1.1.2.11.3.8. A second proof of exercise 3 multiplies the series of Theorem C1.1.2.11.3.7 by . The coefficient of is . This equals by partial fractions.
- Exercise 4 is Theorem C1.1.2.11.3.14.
- Exercise 5 is the bound on in the proof of Theorem C1.1.2.11.3.25: .
- Exercise 6 is Lemma C1.1.2.11.3.26.
- Exercise 7: put and expand the exponent in powers of . The result is
For and the integral is and the seven terms give . The difference is , which is times , and the next term has the coefficient .
- Exercise 8: for the remainder of the series of after the term is . This is . The truncated exponent is at most for large , so multiplies a bounded integrand. Integrating over a length gives the error . This is exactly when , which is the stated value of . For Tricomi's case and give , and the substitution gives the second form.
- Exercise 9: Let and . For , including negative with integer ,
For the ratio is . For Theorem C1.1.2.11.3.21 with applies. The proof integrates by parts twice with and . This gives , and the last integral is . Then divide by and use Theorem C1.1.2.11.3.20. For and the exact value of the ratio, divided by , is , and the bracket is . The difference times is .
- Exercise 10: with and the integral is . Since , the exponent is , and the integral of the leading part is . So the leading term of the difference over is . For , and the exact ratio to this term is . The second term of the expansion is not worked out in this chapter.
- Exercise 11: for the factor makes the terms of both sums geometric. The -th term of and of is . Since , both sums equal . For and the sums are and , and the formula gives . The case is not worked out in this chapter.
- Exercise 12: put . Then for . So , and . For both sides are .
- Exercise 13: Theorems C1.1.2.11.3.28 and C1.1.2.11.3.29 give . This is the form of Ramanujan's result up to the size of the remainder. The sharp bounds are not proved in this chapter. The value defined by the identity is , , , and for , and all five lie in the interval.
- Exercise 14: Part (a) is the substitution in the sum. It gives , and . Part (e) is the result. For its first terms are the terms of in Step 2 of the proof of Theorem C1.1.2.11.3.27. For and the sum divided by the four terms of part (e) is . The tail bounds of parts (b) to (d) are not written out in this chapter.
- Exercise 15: put . The integral is . Integration by parts gives . So the integral is . By Theorems C1.1.2.11.3.4 and C1.1.2.11.3.9 the first part is . So the integral is . For it is .
- Exercise 16: write , where is the falling power and for . Let for , with . Split the terms into and . For the term is a polynomial in of degree , and it is at . The -th difference of a polynomial of degree below is , and is that difference up to the sign . For and the only nonzero term is , and it is . So the sum is . For both sides are .
- Exercise 17: put . The -th term of is , so with . This is the sum of Theorem C1.1.2.11.3.23 turned around, and Steps 1 to 3 of the proof of Theorem C1.1.2.11.3.27 apply to it. Take and the upper sum. The integral from to is , and Theorem A with gives . The edge term adds . So . The values are and , against and from the two terms. The sum is close to , so is to as is to .
- Exercise 18: both identities are and , with . Exact arithmetic confirms them for . For the first sum is and the second is . A proof is not given in this chapter.
- Exercise 19 is Lemma C1.1.2.11.3.16, first claim.
- Exercise 20: by exercise 15 and , . By Lemma C1.1.2.11.3.11 this is . With and the derivative is . The function is bounded for . The second claim of Lemma C1.1.2.11.3.16 with and the terms gives . Since , this is the claim. For the term is , and for it is . For the five terms give , and .
Lean
The Lean code of tamnd/taocp-lean at main has the file TAOCP/V1/S1_2_11.lean, in the namespace TAOCP.S1_2_11. It defines the three sums and states one identity. The Node lines name the declarations.
TAOCP.S1_2_11.P, TAOCP.S1_2_11.Q and TAOCP.S1_2_11.R are the sums of eqs. (1), (2) and (3). In Q the quotient is Nat.descFactorial, which is exact. R is a tsum.
TAOCP.S1_2_11.P_two and TAOCP.S1_2_11.Q_two check that .
TAOCP.S1_2_11.eq4_QR is eq. (4), for .
Not yet stated: the Node lines that say "Lean: not yet stated". They include the incomplete gamma function, Theorem A and the asymptotic series for , and .
Notes and history
The three sums have a long history. Ramanujan stated results equivalent to Theorems C1.1.2.11.3.28 and C1.1.2.11.3.29 for and in the Journal of the Indian Mathematical Society in 1911 and 1912. His series for is , which is the series for , since by Theorem C1.1.2.11.3.4. The first two terms agree with Theorems C1.1.2.11.3.28 and C1.1.2.11.3.29. The third term is confirmed by exact computation at and . Ramanujan treated with the substitution , which turns it directly into a sum of Gaussian moments. The method of this section, which splits the Gamma integral at its peak, is due to R. Furch, in the Zeitschrift für Physik in 1939. His question was the shift for which is half of , and Theorem C1.1.2.11.3.22 shows that this shift tends to . The asymptotic value of was first found by H. B. Demuth in his Stanford thesis of 1956, by another method. Exercise 20 gives a shorter route for through Watson's lemma.
The expansion of was extended to complex arguments by Tricomi, in the Mathematische Zeitschrift in 1950. Exercise 8 gives his real result for the middle integral.
Three different methods appear in this section: the incomplete gamma function for and , the series inversion of Lemma C1.1.2.11.3.13 with Watson's lemma, and Euler's formula for . Exercise 14 gives a fourth method that treats all three sums in one scheme.
The project has no errata of Section 1.2.11.3 to report.
Section 1.2.11.3 of TAOCP studies three sums, , and , that look alike and have the same size, about . The section finds their size with three different tools: the incomplete gamma function, a change of variable and a power series, and a comparison of a sum with an integral. This chapter of C1 proves each equation of the section, supplies the steps that the section leaves open, and checks every series against exact values.