Summing powers, approximating integrals, and estimating factorials Michael Anshelevich Texas A&M University July 11, 2012 Sums of powers. 1 |+1+ {z. . . + 1} = n. n times Sums of powers. 1 |+1+ {z. . . + 1} = n. n times 1 + 2 + 3 + ... + n = n(n + 1) 2 Sums of powers. 1 |+1+ {z. . . + 1} = n. n times 1 + 2 + 3 + ... + n = 12 + 22 + 32 + . . . + n2 = n(n + 1) 2 n(n + 1)(2n + 1) 6 Sums of powers. 1 |+1+ {z. . . + 1} = n. n times 1 + 2 + 3 + ... + n = n(n + 1) 2 n(n + 1)(2n + 1) 6 n(n + 1) 2 3 3 3 3 1 + 2 + 3 + ... + n = 2 12 + 22 + 32 + . . . + n2 = Sums of powers. 1 |+1+ {z. . . + 1} = n. n times 1 + 2 + 3 + ... + n = n(n + 1) 2 n(n + 1)(2n + 1) 6 n(n + 1) 2 3 3 3 3 1 + 2 + 3 + ... + n = 2 12 + 22 + 32 + . . . + n2 = 110 + 210 + 310 + . . . + n10 =? Sums of powers. 1 |+1+ {z. . . + 1} = n. n times 1 + 2 + 3 + ... + n = n(n + 1) 1 1 = n2 + n. 2 2 2 n(n + 1)(2n + 1) 1 1 1 = n3 + n2 + n. 6 3 2 6 n(n + 1) 2 1 1 1 3 3 3 3 1 + 2 + 3 + ... + n = = n4 + n3 + n2 . 2 4 2 4 12 + 22 + 32 + . . . + n2 = 110 + 210 + 310 + . . . + n10 =? Looks like a polynomial in n. Is it? Which one? Are coefficients positive? What are the denominators? Approximate integration: one point. Z 1 f (x) dx. 0 Approximate integration: one point. Z 1 f (x) dx. 0 If know f and all of its derivatives at 0, ∞ X 1 (k) f (x) = f (0)xk , k! k=0 "∞ #1 Z 1 ∞ X X 1 f (k) (0) (k) k+1 f (x) dx = f (0)x = . (k + 1)! (k + 1)! 0 k=0 0 So Z 1 f (x) dx ≈ 0 for large N . N X f (k) (0) (k + 1)! k=0 k=0 Approximate integration: one point. Z 1 f (x) dx. 0 If know f and all of its derivatives at 0, ∞ X 1 (k) f (x) = f (0)xk , k! k=0 "∞ #1 Z 1 ∞ X X 1 f (k) (0) (k) k+1 f (x) dx = f (0)x = . (k + 1)! (k + 1)! 0 k=0 0 So Z 1 f (x) dx ≈ 0 N X f (k) (0) (k + 1)! k=0 for large N . How good is the approximation? It depends. k=0 Approximate integration: two points. What if know all f (k) (0) and f (k) (1)? Should be more precise; how? Approximate integration: two points. What if know all f (k) (0) and f (k) (1)? Should be more precise; how? Z 1 f (x) dx. 0 Approximate integration: two points. What if know all f (k) (0) and f (k) (1)? Should be more precise; how? Z 1 f (x) dx. 0 Integrate by parts: Z 0 1 1 · f (x) dx= [(x − c)f (x)]10 − Z 1 (x − c)f 0 (x) dx 0 Z 1 = (1 − c)f (1) + cf (0) − (x − c)f 0 (x) dx. | {z } 0 | {z } average remainder Best c? Approximate integration: two points. What if know all f (k) (0) and f (k) (1)? Should be more precise; how? Z 1 f (x) dx. 0 Integrate by parts: Z 0 1 1 · f (x) dx= [(x − c)f (x)]10 − Z 1 (x − c)f 0 (x) dx 0 Z 1 = (1 − c)f (1) + cf (0) − (x − c)f 0 (x) dx. | {z } 0 | {z } average remainder Best c? 1 c= , 2 Z 0 1 1 x− 2 dx = 0. Approximate integration: two points. What if know all f (k) (0) and f (k) (1)? Should be more precise; how? Z 1 f (x) dx. 0 Integrate by parts: Z 0 1 1 Z 1 1 1 1 · f (x) dx= x− f (x) − f 0 (x) dx x− 2 2 0 0 Z 1 1 1 1 = f (1) + f (0) − x− f 0 (x) dx. 2 2 2 | {z } |0 {z } average remainder Good approximation if f 0 ≈ constant, f ≈ linear. Exact if f = linear. Approximate integration: two points. Again: Z 0 1 1 x− 2 1 0 1 2 f (x) dx= x − x+? f (x) 2 0 Z 1 00 1 2 − x − x+? f (x) dx. 0 2 0 Approximate integration: two points. Again: Z 0 1 1 x− 2 1 0 1 2 f (x) dx= x − x+? f (x) 2 0 Z 1 00 1 2 − x − x+? f (x) dx. 0 2 0 Choose ? so that Z 0 1 ?= . 6 1 1 2 x − x+? dx = 0. 2 Bernoulli polynomials. B0 (x) = 1, b0 = 1, 1 B1 (x) = x − , 2 1 b1 = − , 2 1 b2 = . 6 1 B2 (x) = x2 − x + , 6 Bernoulli polynomials. B0 (x) = 1, b0 = 1, 1 B1 (x) = x − , 2 1 b1 = − , 2 1 b2 = . 6 1 B2 (x) = x2 − x + , 6 Z Bn−1 (t) dt = Bn0 (x) = nBn−1 (x), Z 1 Bn (x) dx = 0, 0 Bn (x) = Bernoulli polynomial. bn = Bernoulli number. 1 Bn (x), n bn = Bn (0) The Bernoullis. Jacob Bernoulli Bernoulli polynomials Daniel Bernoulli Bernoulli principle Approximate integration using endpoints. Z 1 Z f (x) dx = B1 (1)f (1) − B1 (0)f (0) − 0 1 B1 (x)f 0 (x) dx. 0 Z 0 1 B1 (x)f 0 (x) dx= 1 B2 (1)f 0 (1) − B2 (0)f 0 (0) 2 Z 1 1 − B2 (x)f 00 (x) dx. 2 0 Approximate integration using endpoints. Z 1 Z f (x) dx = B1 (1)f (1) − B1 (0)f (0) − 0 1 B1 (x)f 0 (x) dx. 0 Z 1 1 B2 (1)f 0 (1) − B2 (0)f 0 (0) 2 0 Z 1 1 − B2 (x)f 00 (x) dx. 2 0 Z 1 1 Bn−1 (x)f (n−1) (x) dx= Bn (1)f (n−1) (1) − Bn (0)f (n−1) (0) n 0 Z 1 1 − Bn (x)f (n) (x) dx. n 0 B1 (x)f 0 (x) dx= Approximate integration using endpoints. Z 1 f (x) dx= 0 f (0) + f (1) 2 N −1 X (−1)(n−1) + Bn (1)f (n−1) (1) − Bn (0)f (n−1) (0) n! n=1 Z (−1)N 1 + BN (x)f (N ) (x) dx. N! 0 | {z } remainder If f (N +1) small, the remainder is small. Not always the case! Remainder zero if f (N ) = 0, f a polynomial. Approximate integration using endpoints. Would like to say that Z 1 f (0) + f (1) f (x) dx= 2 0 ∞ X (−1)(n−1) Bn (1)f (n−1) (1) − Bn (0)f (n−1) (0) . + n! n=1 But: Test for divergence? Bn (0) 6→ 0! n! Approximate integration using endpoints. Would like to say that Z 1 f (0) + f (1) f (x) dx= 2 0 ∞ X (−1)(n−1) Bn (1)f (n−1) (1) − Bn (0)f (n−1) (0) . + n! n=1 But: Bn (0) 6→ 0! n! Test for divergence? Recall Bn (0) = bn . Can find without computing the whole polynomial Bn (x)? Yes. Generating functions. 2 B0 (x) = 1. Z 1 Bn (x) dx = 0, n ≥ 1. 3 Bn0 (x) = nBn−1 (x). 1 0 Generating functions. 2 B0 (x) = 1. Z 1 Bn (x) dx = 0, n ≥ 1. 3 Bn0 (x) = nBn−1 (x). 1 0 Let F (x, z) = ∞ X 1 1 1 Bn (x)z n = B0 (x) + B1 (x)z + B2 (x)z 2 + B3 (x)z 3 + n! 2 6 n=0 be the generating function. Generating functions. 2 B0 (x) = 1. Z 1 Bn (x) dx = 0, n ≥ 1. 3 Bn0 (x) = nBn−1 (x). 1 0 Let F (x, z) = ∞ X 1 1 1 Bn (x)z n = B0 (x) + B1 (x)z + B2 (x)z 2 + B3 (x)z 3 + n! 2 6 n=0 be the generating function. 1 F (x, 0) = 1. Z 1 2 F (x, z) dx = 1. 3 0 ∂ ∂x F (x, z) = Generating functions. 2 B0 (x) = 1. Z 1 Bn (x) dx = 0, n ≥ 1. 3 Bn0 (x) = nBn−1 (x). 1 0 Let F (x, z) = ∞ X 1 1 1 Bn (x)z n = B0 (x) + B1 (x)z + B2 (x)z 2 + B3 (x)z 3 + n! 2 6 n=0 be the generating function. 1 F (x, 0) = 1. Z 1 2 F (x, z) dx = 1. 3 0 ∂ ∂x F (x, z) = zF (x, z). Generating functions. 2 B0 (x) = 1. Z 1 Bn (x) dx = 0, n ≥ 1. 3 Bn0 (x) = nBn−1 (x). 1 0 Let F (x, z) = ∞ X 1 1 1 Bn (x)z n = B0 (x) + B1 (x)z + B2 (x)z 2 + B3 (x)z 3 + n! 2 6 n=0 be the generating function. 1 F (x, 0) = 1. Z 1 2 F (x, z) dx = 1. 3 0 ∂ ∂x F (x, z) = zF (x, z). So F (x, z) = A(z)exz . Appell polynomials. If P0 (x) = 1 and Pn0 (x) = nPn−1 (x), Pn (x) are called Appell polynomials. Appell polynomials. If P0 (x) = 1 and Pn0 (x) = nPn−1 (x), Pn (x) are called Appell polynomials. Paul Appell (1855–1930) Just saw Bernoulli polynomials have this property. Other examples: Appell polynomials. If P0 (x) = 1 and Pn0 (x) = nPn−1 (x), Pn (x) are called Appell polynomials. Paul Appell (1855–1930) Just saw Bernoulli polynomials have this property. Other examples: Pn (x) = xn . Or: Pn (x) = Hermite polynomials. Appell polynomials. If P0 (x) = 1 and Pn0 (x) = nPn−1 (x), Pn (x) are called Appell polynomials. Paul Appell (1855–1930) Just saw Bernoulli polynomials have this property. Other examples: Pn (x) = xn . Or: Pn (x) = Hermite polynomials. Generating function always of the form A(z)exz for some function A(z). Generating function for the Bernoulli polynomials. Z 1= 1 Z F (x, z) dx = 0 0 1 1 A(z)exz dx = A(z) (ez − 1), z so A(z) = ez z −1 and ∞ X z 1 F (x, z) = Bn (x)z n = z exz . n! e −1 n=0 Generating function for the Bernoulli polynomials. Z 1= 1 Z F (x, z) dx = 0 0 1 1 A(z)exz dx = A(z) (ez − 1), z so A(z) = ez z −1 and ∞ X z 1 F (x, z) = Bn (x)z n = z exz . n! e −1 n=0 Bernoulli numbers? ∞ ∞ X X 1 z 1 n bn z = Bn (0)z n = z n! n! e −1 n=0 n=0 Bernoulli numbers. ∞ ∞ X X 1 1 z n bn z = Bn (0)z n = z n! n! e −1 n=0 n=0 z = 3 2 z4 + ... − 1 1 + z + z2 + z6 + 24 = 1 1+ z 2 + z2 6 + z3 24 + ... 1 1 1 4 1 1 1 = 1 − z + z2 − z + z6 − z8 + z 10 + . . 2 12 720 30240 1209600 47900160 Bernoulli numbers. ∞ ∞ X X 1 1 z n bn z = Bn (0)z n = z n! n! e −1 n=0 n=0 z = 3 2 z4 + ... − 1 1 + z + z2 + z6 + 24 = 1 1+ z 2 + z2 6 + z3 24 + ... 1 1 1 4 1 1 1 = 1 − z + z2 − z + z6 − z8 + z 10 + . . 2 12 720 30240 1209600 47900160 b0 1 b1 − 12 b2 1 6 b3 0 b4 1 − 30 b5 0 b6 1 42 b7 0 b8 1 − 30 b9 0 b10 5 66 Bernoulli numbers. Moreover, ∞ ∞ X X 1 z z 1 −z Bn (1)z n = z ez = = Bn (0)(−z)n . = n! e −1 1 − e−z e−z − 1 n! n=0 So Bn (1) = (−1)n Bn (0). n=0 Bernoulli numbers. Moreover, ∞ ∞ X X 1 z z 1 −z Bn (1)z n = z ez = = Bn (0)(−z)n . = n! e −1 1 − e−z e−z − 1 n! n=0 n=0 So Bn (1) = (−1)n Bn (0). But also: ∞ ∞ X X 1 ez 1 1 n Bn (1)z = z z =z 1+ z =z+ Bn (0)z n . n! e −1 e −1 n! n=0 So Bn (1) = Bn (0), B1 (1) = 1 + B1 (0). n=0 Bernoulli numbers. Moreover, ∞ ∞ X X 1 z z 1 −z Bn (1)z n = z ez = = Bn (0)(−z)n . = n! e −1 1 − e−z e−z − 1 n! n=0 n=0 So Bn (1) = (−1)n Bn (0). But also: ∞ ∞ X X 1 ez 1 1 n Bn (1)z = z z =z 1+ z =z+ Bn (0)z n . n! e −1 e −1 n! n=0 n=0 So Bn (1) = Bn (0), B1 (1) = 1 + B1 (0). 1 1 We conclude: B1 (0) = b1 = − , B1 (1) = , 2 2 Bn (0) = Bn (1) = bn , non-zero only if n even. Euler-Maclaurin formula. Z 1 f (x) dx= 0 f (0) + f (1) 2 N −1 X (−1)(n−1) + Bn (1)f (n−1) (1) − Bn (0)f (n−1) (0) n! n=1 Z (−1)N 1 + BN (x)f (N ) (x) dx. N! 0 Euler-Maclaurin formula. Z 1 f (x) dx= 0 f (0) + f (1) 2 N X 1 − b2n f (2n−1) (1) − f (2n−1) (0) (2n)! n=1 Z 1 1 + B2N (x)f (2N ) (x) dx. (2N )! 0 Euler-Maclaurin formula. Z 1 f (x) dx= 0 Z a+1 f (x) dx= a f (0) + f (1) 2 N X 1 − b2n f (2n−1) (1) − f (2n−1) (0) (2n)! n=1 Z 1 1 + B2N (x)f (2N ) (x) dx. (2N )! 0 f (a) + f (a + 1) 2 N X 1 − b2n f (2n−1) (a + 1) − f (2n−1) (a) (2n)! n=1 Z a+1 1 + B2N (x − a)f (2N ) (x) dx. (2N )! a Euler-Maclaurin formula. Z a+1 f (x) dx= a f (a) + f (a + 1) 2 N X 1 − b2n f (2n−1) (a + 1) − f (2n−1) (a) (2n)! n=1 Z a+1 1 + B2N (x − a)f (2N ) (x) dx. (2N )! a Euler-Maclaurin formula. Z a+1 f (x) dx= a Z a a+k f (a) + f (a + 1) 2 N X 1 − b2n f (2n−1) (a + 1) − f (2n−1) (a) (2n)! n=1 Z a+1 1 + B2N (x − a)f (2N ) (x) dx. (2N )! a 1 1 f (x) dx= f (a) + f (a + 1) + . . . + f (a + k − 1) + f (a + k) 2 2 N X 1 − b2n f (2n−1) (a + k) − f (2n−1) (a) (2n)! n=1 Z a+k 1 + B2N ({x − a})f (2N ) (x) dx. (2N )! a Euler-Maclaurin formula. Z a a+k 1 1 f (a) + f (a + 1) + . . . + f (a + k − 1) + f (a + k) f (x) dx = 2 2 N X 1 − b2n f (2n−1) (a + k) − f (2n−1) (a) (2n)! n=1 Z a+k 1 + B2N ({x − a})f (2N ) (x) dx. (2N )! a Euler-Maclaurin formula. Z a+k a Z 1 1 f (a) + f (a + 1) + . . . + f (a + k − 1) + f (a + k) f (x) dx = 2 2 N X 1 − b2n f (2n−1) (a + k) − f (2n−1) (a) (2n)! n=1 Z a+k 1 + B2N ({x − a})f (2N ) (x) dx. (2N )! a a+k f (x) dx = Trapezoid sum + Series + Remainder . a Formula often precise for small N . History. Leonhard Euler (1707–1783) Colin Maclaurin (1698–1746) Remainder term: SimeĢon Denis Poisson (1781–1840) Euler’s tomb and Maclaren plaid. Bernoulli polynomials. Know Bernoulli numbers. How to find Bernoulli polynomials without integration? Bernoulli polynomials. Know Bernoulli numbers. How to find Bernoulli polynomials without integration? B0 (x) = 1 = b0 . Bernoulli polynomials. Know Bernoulli numbers. How to find Bernoulli polynomials without integration? B0 (x) = 1 = b0 . B1 (x) = b0 x + b1 . Bernoulli polynomials. Know Bernoulli numbers. How to find Bernoulli polynomials without integration? B0 (x) = 1 = b0 . B1 (x) = b0 x + b1 . 1 2 B2 (x) = 2 b0 x + b1 x + b2 = b0 x2 + 2b1 x + b2 . 2 Bernoulli polynomials. Know Bernoulli numbers. How to find Bernoulli polynomials without integration? B0 (x) = 1 = b0 . B1 (x) = b0 x + b1 . 1 2 B2 (x) = 2 b0 x + b1 x + b2 = b0 x2 + 2b1 x + b2 . 2 1 2 1 3 B3 (x) = 3 b0 x + 2b1 x + b2 x + b3 = b0 x3 + 3b1 x2 + 3b2 x + b3 . 3 2 Bernoulli polynomials. Know Bernoulli numbers. How to find Bernoulli polynomials without integration? B0 (x) = 1 = b0 . B1 (x) = b0 x + b1 . 1 2 B2 (x) = 2 b0 x + b1 x + b2 = b0 x2 + 2b1 x + b2 . 2 1 2 1 3 B3 (x) = 3 b0 x + 2b1 x + b2 x + b3 = b0 x3 + 3b1 x2 + 3b2 x + b3 . 3 2 n n X X n n k n k Bn (x) = bn−k x Compare with (1 + x) = x . k k k=0 k=0 Sums of powers. Claim: Bk+1 (x + 1) − Bk+1 (x) = xk . k+1 Indeed, for each k ≥ 1 d Bk+1 (x + 1) − Bk+1 (x) Bk (x + 1) − Bk (x = Bk (x + 1) − Bk (x) = k dx k+1 k d k x = kxk−1 , dx and at x = 0 Bk+1 (1) − Bk+1 (0) = 0 = 0k . k+1 Sums of powers. It follows that 1k + 2 k + . . . + nk Bk+1 (n + 1) − Bk+ Bk+1 (2) − Bk+1 (1) Bk+1 (3) − Bk+1 (2) + + ... + = k+1 k+1 k+1 Z n+1 Bk+1 (n + 1) − Bk+1 (1) Bk (x) dx. = = k+1 1 In terms of Bernoulli numbers? k+1 X k+1 Bk+1 (x) = bi xk+1−i , i i=0 so get k 1 X k+1 1 + 2 + ... + n = bi (n + 1)k+1−i . k+1 i k k k i=0 Examples. b0 1 b1 − 12 b2 1 6 b4 1 − 30 b6 1 42 b8 1 − 30 b10 5 66 Examples. b0 1 b1 − 12 b2 1 6 b4 1 − 30 b6 1 42 b8 1 − 30 b10 5 66 1 (n + 1)n 1X 2 1 bi (n + 1)2−i = (n + 1)2 − (n + 1) = . 2 i 2 2 i=0 Examples. b0 1 b1 − 12 b2 1 6 b4 1 − 30 b6 1 42 b8 1 − 30 b10 5 66 1 (n + 1)n 1X 2 1 bi (n + 1)2−i = (n + 1)2 − (n + 1) = . 2 i 2 2 i=0 2 1X 3 1 3 1 3 2 3−i bi (n + 1) = (n + 1) − (n + 1) + (n + 1) 3 3 2 2 i i=0 = (n + 1)(2n2 + n) . 6 Examples. b0 1 b1 − 12 b2 1 6 110 + 210 + . . . + n10 = b4 1 − 30 b6 1 42 b8 1 − 30 b10 5 66 10 1 X 11 bi (n + 1)11−i 11 i i=0 1 = (n + 1)11 + b1 (n + 1)10 + 5b2 (n + 1)9 + 30b4 (n + 1)7 11 + 42b6 (n + 1)5 + 15b8 (n + 1)3 + b10 (n + 1) 1 1 5 1 5 = n11 + n10 + n9 − n7 + n5 − n3 + n. 11 2 6 2 66 Examples. b0 1 b1 − 12 b2 1 6 110 + 210 + . . . + n10 = b4 1 − 30 b6 1 42 b8 1 − 30 b10 5 66 10 1 X 11 bi (n + 1)11−i 11 i i=0 1 = (n + 1)11 + b1 (n + 1)10 + 5b2 (n + 1)9 + 30b4 (n + 1)7 11 + 42b6 (n + 1)5 + 15b8 (n + 1)3 + b10 (n + 1) 1 1 5 1 5 = n11 + n10 + n9 − n7 + n5 − n3 + n. 11 2 6 2 66 Stewart. Riemann Zeta function. Riemann: ∞ X 1 , ζ(p) = np n=1 p real or even complex. Riemann Zeta function. Riemann: ∞ X 1 , ζ(p) = np n=1 p real or even complex. Euler: ∞ X 1 ζ(2k) = n2k n=1 Riemann Zeta function. Riemann: ∞ X 1 , ζ(p) = np n=1 p real or even complex. Euler: ∞ X 1 (−1)k−1 b2k (2π)2k ζ(2k) = = 2(2k)! n2k n=1 Riemann Zeta function. Riemann: ∞ X 1 , ζ(p) = np n=1 p real or even complex. Euler: ∞ X 1 (−1)k−1 b2k (2π)2k ζ(2k) = = 2(2k)! n2k n=1 For example for k = 1, k = 2 ∞ X 1 (2π)2 π2 2 = b = b π = . 2 2 n2 4 6 n=1 ∞ X n=1 1 (2π)4 π4 π4 = (−b ) = (−b ) = . 4 4 n4 48 3 90 Stirling formula. Apply Euler-Maclaurin formula with N = 1 to f (x) = ln x. Stirling formula. Apply Euler-Maclaurin formula with N = 1 to f (x) = ln x. T = N X n=1 1 1 ln n − (ln 1 + ln N ) = ln N ! − ln N . 2 2 Stirling formula. Apply Euler-Maclaurin formula with N = 1 to f (x) = ln x. N X 1 1 ln n − (ln 1 + ln N ) = ln N ! − ln N . 2 2 n=1 Z N Z N 1 1 ln N != ln N + ln x dx + B1 ({x}) dx 2 x 1 1 Z N 1 1 1 = ln N + N ln N − N + 1 + {x} − dx 2 2 x 1 T = Stirling formula. Apply Euler-Maclaurin formula with N = 1 to f (x) = ln x. N X 1 1 ln n − (ln 1 + ln N ) = ln N ! − ln N . 2 2 n=1 Z N Z N 1 1 ln N != ln N + ln x dx + B1 ({x}) dx 2 x 1 1 Z N 1 1 1 = ln N + N ln N − N + 1 + {x} − dx 2 2 x 1 Can show Z ∞ 1 1 1 {x} − dx = (ln 2π) − 1. 2 x 2 1 T = Stirling formula. Apply Euler-Maclaurin formula with N = 1 to f (x) = ln x. N X 1 1 ln n − (ln 1 + ln N ) = ln N ! − ln N . 2 2 n=1 Z N Z N 1 1 ln N != ln N + ln x dx + B1 ({x}) dx 2 x 1 1 Z N 1 1 1 = ln N + N ln N − N + 1 + {x} − dx 2 2 x 1 Can show Z ∞ 1 1 1 {x} − dx = (ln 2π) − 1. 2 x 2 1 T = So ln N ! ≈ 1 1 ln N + N ln N − N + 1 + (ln 2π) − 1 2 2 √ N ! ≈ N N e−N 2πN Stirling formula. √ N ! ≈ N N e−N 2πN Next term: b2 1 1 ln 2πN + , 2 2 N √ 1 N −N N! ≈ N e 2πN 1 + . 12N ln N ! ≈ N ln N − N + Stirling formula. √ N ! ≈ N N e−N 2πN Next term: b2 1 1 ln 2πN + , 2 2 N √ 1 N −N N! ≈ N e 2πN 1 + . 12N ln N ! ≈ N ln N − N + 10! 1010 e−10 ≈ 8; 1010 e−10 10! √ 1010 e−10 20π 10! √ 20π(1 + 1 120 ) ≈ 1.008 ≈ 1.00003.