taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.9-21

Exercise 1.2.9-21

not stated yet in Lean solution written

RatingHM30
MarkersHM (needs higher mathematics)
KindInformal: the exercise has no formal statement, so Lean does not state it from the written solution
SectionSection 1.2.9 of Volume 1. Companion chapter: Generating functions

The task

Set up the generating function of ⟨n!⟩\langle n!\rangle and study it.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Test the convergence with the ratio of consecutive terms.

Hint 2

Find a differential equation by comparing the coefficients of zmz^{m} in GG and z2G′+zGz^2G'+zG.

Solution

Show the solution

Let G(z)=∑n≥0n! znG(z)=\sum_{n\ge0}n!\,z^n. The ratio of consecutive coefficients is n+1→∞n+1\to\infty, so the radius of convergence is 00. Thus GG is not a function of zz near 00. It is a formal power series, and the operations of Section 1.2.9 still apply.

A differential equation. The coefficient of zmz^m (m≥1m\ge1) in z2G′z^2G' is (m−1)(m−1)!(m-1)(m-1)! and in zGzG it is (m−1)!(m-1)!, and the sum is m (m−1)!=m!m\,(m-1)!=m!. Hence

z2G′(z)+zG(z)=G(z)−1,orz2G′+(z−1)G+1=0.z^2G'(z)+zG(z)=G(z)-1,\qquad\text{or}\qquad z^2G'+(z-1)G+1=0.

This is the recurrence am=m am−1a_m=m\,a_{m-1} in series form.

An integral. From n!=∫0∞tne−tdtn!=\int_0^\infty t^ne^{-t}dt a function with the same expansion is F(z)=∫0∞e−t1−zt dtF(z)=\int_0^\infty\frac{e^{-t}}{1-zt}\,dt, defined for z<0z<0 (and for complex zz off the positive real axis). Put z=−xz=-x and u=t+1/xu=t+1/x. Then F(−x)=1xe1/xE1(1/x)F(-x)=\frac1xe^{1/x}E_1(1/x), where E1(y)=∫y∞e−uu−1duE_1(y)=\int_y^\infty e^{-u}u^{-1}du. So F(z)=−1ze−1/zE1(−1/z)F(z)=-\frac1ze^{-1/z}E_1(-1/z) for z<0z<0.

The relation with the series. For z<0z<0, 11−zt=∑n<N(zt)n+(zt)N1−zt\frac1{1-zt}=\sum_{n<N}(zt)^n+\frac{(zt)^N}{1-zt}, and 0<11−zt≤10<\frac1{1-zt}\le1. Integrate, with the weight e−te^{-t}: F(z)=∑n<Nn! zn+RN,∣RN∣≤N! ∣z∣N.F(z)=\sum_{n<N}n!\,z^n+R_N,\qquad|R_N|\le N!\,|z|^N. So ∑n!zn\sum n!z^n is the asymptotic expansion of FF as z→0−z\to0^-. For z=−0.1z=-0.1 the sum of the terms with N=6N=6 is 0.91520.9152 and F=0.915633…F=0.915633\ldots, with the error 0.00043<6!⋅10−6=0.000720.00043<6!\cdot10^{-6}=0.00072. The best truncation is near N≈1/∣z∣N\approx1/|z|, and the error there is of the order of e−1/∣z∣e^{-1/|z|}.

Uniqueness. The function FF satisfies the same equation. Put u(t)=1/(1−zt)u(t)=1/(1-zt), so that zu2=u′zu^2=u' and z2tu2=z(u2−u)z^2tu^2=z(u^2-u). Then z2F′=∫0∞e−t z2tu2 dt=∫0∞e−tu′ dt−zFz^2F'=\int_0^\infty e^{-t}\,z^2tu^2\,dt=\int_0^\infty e^{-t}u'\,dt-zF, and integration by parts gives ∫0∞e−tu′dt=F−1\int_0^\infty e^{-t}u'dt=F-1. So z2F′+zF=F−1z^2F'+zF=F-1. The solutions of the homogeneous equation z2y′=(1−z)yz^2y'=(1-z)y are y=Ce−1/z/zy=Ce^{-1/z}/z, and these tend to infinity as z→0−z\to0^- unless C=0C=0. So FF is the only solution of the equation that stays bounded as z→0−z\to0^-.

The exponential generating function of ⟨n!⟩\langle n!\rangle is ∑nzn=1/(1−z)\sum_nz^n=1/(1-z), which converges for ∣z∣<1|z|<1. So the divergence belongs to the ordinary generating function only. Multiplication of GG by zz shifts the sequence, and z d/dzz\,d/dz multiplies n!n! by nn, so ∑nn⋅n! zn=zG′\sum_nn\cdot n!\,z^n=zG'.

Remarks

The series ∑n! zn\sum n!\,z^n is the standard example of a divergent but useful asymptotic series, and the integral above is its Borel sum. The difference between consecutive truncations, N!∣z∣NN!|z|^N, is the size of the first omitted term.

This solution is drafted, and a person has not reviewed it yet. The source.

In Lean

not stated yet The exercise is not stated in Lean yet.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.