360 ARITHMETIC 45.3 L4. Output A (which is
360 ARITHMETIC 45.3 L4. Output A (which is the value of the next partial quotient). Replace the co- efficients (an, a,-~, . . . , ac) by (–a~, -al,. . , -a,) and return to Ll. (This step replaces f(z) by a polynomial whose roots are reciprocals of those of f.) For example, starting with f(s) = x3 -2, the algorithm will output 1 (changing f(z) to x3 -3s -33: - 1); then 3 (changing f(z) to 10~~ -62 -62 -1); etc. 14. [A&!.%!] (A. Hurwitz, 1891.) Show that the following rules make it possible to find the regular continued fraction expansion of 2X, given the partial quotients of X: 2/2a, b, c, . . . / = /a, 2b + 2/c,. . . //; 2/ 2a + 1, b, c, . . . / = /a, 1,l + 2/b -1, c, . . . //. Use this idea to find the regular continued fraction expansion of ie, given the expansion of e in (13). b 15. [?&?I] (R. W. Gosper.) Generalizing exercise 14, design an algorithm that com- putes the continued fraction Xc + /XI, X2, . . . / for (az + b)/(cz + d), given the con- tinued fraction xc +/XI, x2, . . . / f or x, and given integers a, b, c, d with ad # bc. Make your algorithm an on-line coroutine that outputs as many Xk as possible before in- putting each x3. Demonstrate how your algorithm computes (9 7% + 39)/(-62x -25) when 5 = -1 + /5,1,1,1,2,1,2/. 16. [HMs0] (L. Euler, 1731.) Let fc(z) = (e* -e-*)/(eZ + e- ) = tanhz, and let fn+r(z) = l/fn(z) -(2n + 1)/z. Prove that, for all n, fn(z) is an analytic function of the complex variable z in a neighborhood of the origin, and it satisfies the differential equation f;(z) = 1 -fn(z)2 -2nf,(z)/z. Use this fact to prove that tanh z = /z-l, 32-l) 52-l, 7z- , . . . /. Then apply Hurwitz s rule (exercise 14) to prove that e–lln = / 1, (2m + 1)n -1, I/, m 2 0. (This notation denotes the infinite continued fraction / 1, n -1, 1, 1, 3n -1, 1, 1, 5n -1, 1, . /.) Also find the regular continued fraction expansion of e- fn when n > 0 is odd. b 17. [M.%?s] (a) Prove that /XI, -x2/ = /ZI -1,1,x2 -l/. (b) Generalize this identity, obtaining a formula for /XI, -x2, 23, -x4,. . . , x2,+1, -xzn/ in which all partial quotients are positive integers when the x s are large positive integers. (c) The result of exercise 16 implies that tan 1 = /l, -3,5, -7,. . . /. Find the regular continued fraction expansion of tan 1. 18. [M40] Develop a computer program to find as many partial quotients of x as possible, when x is a real number given with high precision. Use your program to calculate the first one thousand or so partial quotients of Euler s constant 7, based on D. W. Sweeney s 3566-place value [Math. Comp. 17 (1963), 170-1781. (According to the theory in the text, we expect to get about 0.97 partial quotients per decimal digit. Cf. Algorithm 4.5.2L and the article by J. W. Wrench, Jr. and D. Shanks, Math. Comp. 20 (1966), 444-447.) 19. [MZ?O] Prove that F(x) = log,(l + x) satisfies Eq. (24). 20. [HiVZ O] Derive (36) from (35).