Generating Functions for Special Functions

A generating function is a single closed-form kernel G(x,t)=∑nfn(x) tnG(x,t)=\sum_n f_n(x)\,t^n whose Taylor or Laurent expansion in an auxiliary variable tt has the members of an entire family of special functions as its coefficients. Read off the coefficient of tnt^n and you peel one function, fn(x)f_n(x), off the family; the other powers of tt hold the rest. The astonishing fact that makes this a working tool is that for the classical families of mathematical physics — Legendre, Hermite, Laguerre and Chebyshev polynomials, and the Bessel functions — this kernel is elementary: an algebraic root, or an exponential. The whole infinite list is stored in one short formula. That compactness pays off because operations on the family become operations on the kernel. "Shift the index by one" is "multiply by tt"; "differentiate the whole family" is "∂x\partial_x of the kernel". Differentiating GG in tt and matching coefficients hands you the three-term recurrence in a few lines; differentiating in xx gives the differential recurrences; substituting a special value of xx gives values like Pn(1)=1P_n(1)=1; and a contour integral of GG becomes a Schläfli-type integral representation. One object, worked with elementary calculus, delivers the recurrences, differential equation, and integral forms — for every member at once. The physics is not decoration but the source. The Legendre kernel is literally the inverse distance 1/∣r−r′∣1/|\mathbf r-\mathbf r'| expanded in the radial ratio — the multipole expansion of the Newtonian and Coulomb potentials. The Bessel kernel is the Jacobi–Anger identity resolving a plane wave into cylindrical partial waves; the Hermite kernel is, up to normalisation, the coherent state of the quantum oscillator. In each case the special functions are the natural expansion coefficients of a familiar physical object, and the generating function is that object wearing its mathematical face.

Key takeaways
  • A generating function is one closed-form kernel G(x,t)=∑nfn(x) tnG(x,t)=\sum_n f_n(x)\,t^n whose power-series coefficients in the dummy variable tt are the members of a special-function family.
  • The same kernel yields, by differentiation and simple algebra in tt, the recurrence relations, special values, and integral representations of the whole family — no need to work member by member.
  • Legendre polynomials come from (1−2xt+t2)−1/2=∑nPn(x) tn(1-2xt+t^2)^{-1/2}=\sum_n P_n(x)\,t^n, which is exactly the multipole expansion of the inverse distance 1/∣r−r′∣1/|\mathbf r-\mathbf r'|.
  • Integer-order Bessel functions come from the Laurent kernel e(x/2)(t−1/t)=∑n=−∞∞Jn(x) tne^{(x/2)(t-1/t)}=\sum_{n=-\infty}^{\infty}J_n(x)\,t^n, encoding the Jacobi–Anger plane-wave decomposition.
  • Hermite and Laguerre polynomials come from e2xt−t2e^{2xt-t^2} and (1−t)−1e−xt/(1−t)(1-t)^{-1}e^{-xt/(1-t)}, tying the harmonic oscillator and the Coulomb radial problem to compact kernels.
  • Care is needed on the convergence region of tt and on the integer-versus-noninteger distinction: a Laurent kernel produces only integer orders.
  • Key idea: encode a whole family {fn(x)}\{f_n(x)\} as the coefficients of one closed-form kernel G(x,t)=∑nfn(x) tnG(x,t)=\sum_n f_n(x)\,t^n; then every recurrence, special value, and integral representation follows from elementary operations on GG rather than on each fnf_n separately.
The core insight

Encode a whole family {fn(x)}\{f_n(x)\} as the coefficients of one closed-form kernel G(x,t)=∑nfn(x) tnG(x,t)=\sum_n f_n(x)\,t^n; then every recurrence, special value, and integral representation is obtained by elementary operations on GG rather than on each fnf_n separately.

Where this lives today

Generating functions are the theoretical licence behind the numerical evaluation of special functions everywhere in computational physics. The three-term recurrences they produce — Bonnet's for Legendre, the pure Hermite relation, the Bessel order-recurrence — are how libraries such as SciPy, GSL, and Boost actually compute PnP_n, HnH_n, LnL_n, and JnJ_n: forward recurrence for polynomials, and Miller's backward recurrence for Bessel functions, both far more stable at large order than any closed form. The multipole side of the same coin became an algorithm: Greengard and Rokhlin's Fast Multipole Method (1987) uses the Legendre and spherical-harmonic multipole expansions to reduce an NN-body potential sum from O(N2)O(N^2) to O(N)O(N), and now drives astrophysical gravity solvers and molecular-dynamics electrostatics. The Jacobi–Anger expansion is measured in radio engineering: a frequency-modulated signal has a sideband spectrum whose amplitudes are exactly Jn(β)J_n(\beta) of the modulation index β\beta, so the carrier vanishes at the zeros of J0J_0 (the first "carrier null" at β≈2.405\beta\approx 2.405 is a standard bench calibration). And in quantum optics the Hermite kernel is the oscillator's coherent state, its coefficient structure giving the Poissonian photon statistics behind laser theory and squeezed light.

The physical picture

Think of tt as a bookkeeping handle and G(x,t)G(x,t) as a master ledger: each power tnt^n has one special function filed against it, and reading the coefficient of tnt^n retrieves that member. The first figure makes this literal for the Legendre family, whose kernel is the humble algebraic root (1−2xt+t2)−1/2(1-2xt+t^2)^{-1/2}.

Figure
The master-ledger picture: the single Legendre kernel (1−2xt+t²)^(−1/2) expands as P₀ + P₁t + P₂t² + ⋯, and reading off the coefficient of tⁿ retrieves one polynomial — P₀ = 1, P₁ = x, P₂ = (3x²−1)/2, P₃ = (5x³−3x)/2, P₄ = (35x⁴−30x²+3)/8
One kernel stores a whole family: read the coefficient of tⁿ to get Pₙ(x) G(x,t) = (1 − 2xt + t²)^(−1/2) expand t⁰P₀ = 1 t¹P₁ = x t²P₂ = (3x² − 1)/2 t³P₃ = (5x³ − 3x)/2 t⁴P₄ = (35x⁴ − 30x² + 3)/8 an algebraic root stores an infinite list of polynomials ∂ₜ of the kernel → recurrence; ∂ₓ → derivative rules

The kernels are not arbitrary bookkeeping devices; they are physically meaningful objects — an inverse distance, a plane wave, a coherent-state overlap — and the special functions are the coefficients those quantities produce when expanded in a natural small parameter. The second figure shows the flagship case with real numbers: two position vectors separated by an angle, the exact inverse distance, and the Legendre series creeping up to it.

Figure
The Legendre kernel is the multipole expansion of the inverse distance between a field point and a source. With r = 2, r′ = 1, γ = 60° so x = cos γ = 0.5 and t = r′/r = 0.5, the exact value is 1/√3 = 0.5774, and the partial sums S_N = (1/r)·Σ Pₙ(x)tⁿ close in on it: 0.500, 0.625, 0.609, 0.582, 0.573, 0.5769 → 0.5774
The punchline: 1/|r − r′| = (1/r) Σ Pₙ(cos γ)(r′/r)ⁿ → 1/√3 = 0.5774 O r = 2 (field point) r′ = 1 (source) γ = 60° |r − r′| = √3 x = cos γ = 0.5, t = r′/r = 0.5 S₀ = 0.500 S₁ = 0.625 S₂ = 0.609 S₃ = 0.582 S₄ = 0.573 S₆ = 0.5769 exact 1/√3 = 0.5774

The core equations

The whole subject rests on one definition: a generating function is a power series in an auxiliary variable whose coefficients are the functions you care about. The variable tt carries no physical meaning of its own.

G(x,t)=∑nfn(x) tn(1)G(x,t)=\sum_{n} f_n(x)\,t^n \qquad (1)

where: G(x,t)G(x,t) — the generating function (closed-form kernel); fn(x)f_n(x) — the nn-th member of the family; tt — auxiliary expansion variable (a bookkeeping peg, not a physical quantity); nn — index summed over N0\mathbb{N}_0 (Taylor) or Z\mathbb{Z} (Laurent). Reading: the family is recovered as fn(x)=1n! ∂tnG∣t=0f_n(x)=\tfrac{1}{n!}\,\partial_t^n G|_{t=0}, and everything below avoids that term-by-term extraction. For the Legendre family the kernel is an algebraic square root — the inverse-distance expansion that generates the multipole series of electrostatics and gravitation.

(1−2xt+t2)−1/2=∑n=0∞Pn(x) tn,∣t∣<1(2)(1-2xt+t^2)^{-1/2}=\sum_{n=0}^{\infty}P_n(x)\,t^n,\qquad |t|<1 \qquad (2)

where: Pn(x)P_n(x) — Legendre polynomial of degree nn; xx — argument, equal to cos⁡γ\cos\gamma in the multipole context; ∣t∣<1|t|<1 — radius of convergence (with t=r′/rt=r'/r, the condition r′<rr'<r). Reading: identify t=r′/rt=r'/r and x=cos⁡γx=\cos\gamma and the left side becomes r / ∣r−r′∣r\,/\,|\mathbf r-\mathbf r'|, so the PnP_n are the multipole coefficients themselves. The Hermite kernel is entire, and the 1/n!1/n! weight in its expansion is the fingerprint of an exponential generating function tied to the harmonic oscillator.

e2xt−t2=∑n=0∞Hn(x)n! tn(3)e^{2xt-t^2}=\sum_{n=0}^{\infty}\frac{H_n(x)}{n!}\,t^n \qquad (3)

where: Hn(x)H_n(x) — physicists' Hermite polynomial of degree nn; the n!n! denominator marks this as an exponential generating function. Reading: because the kernel is e2xt−t2e^{2xt-t^2}, differentiating in tt or xx just multiplies by a linear factor, so both recurrences fall out in one line each. The Laguerre kernel governs the radial Coulomb problem; its rational exponent makes it the least obvious of the classical kernels.

11−texp⁡ ⁣(−xt1−t)=∑n=0∞Ln(x) tn,∣t∣<1(4)\frac{1}{1-t}\exp\!\Big(\frac{-xt}{1-t}\Big)=\sum_{n=0}^{\infty}L_n(x)\,t^n,\qquad |t|<1 \qquad (4)

where: Ln(x)L_n(x) — Laguerre polynomial of degree nn; orthogonal with weight e−xe^{-x} on [0,∞)[0,\infty). Reading: differentiate-and-match here gives the recurrence (n+1)Ln+1=(2n+1−x)Ln−nLn−1(n+1)L_{n+1}=(2n+1-x)L_n-nL_{n-1}. The Bessel kernel is different in kind: it is a Laurent series, with negative powers of tt present, producing integer-order functions running over all of Z\mathbb{Z}.

e(x/2)(t−1/t)=∑n=−∞∞Jn(x) tn,t≠0(5)e^{(x/2)(t-1/t)}=\sum_{n=-\infty}^{\infty}J_n(x)\,t^n,\qquad t\neq 0 \qquad (5)

where: Jn(x)J_n(x) — Bessel function of the first kind, integer order nn; t≠0t\neq0 — the kernel is singular at t=0t=0, forcing a Laurent rather than Taylor series. Reading: the t−1t^{-1} in the exponent is exactly why only integer orders appear — a Laurent series has no term tνt^\nu with non-integer ν\nu. Setting t=eiθt=e^{i\theta} in the Bessel kernel collapses it to the Jacobi–Anger expansion of a plane wave into cylindrical harmonics.

eixsin⁡θ=∑n=−∞∞Jn(x) einθ(6)e^{ix\sin\theta}=\sum_{n=-\infty}^{\infty}J_n(x)\,e^{in\theta} \qquad (6)

where: θ\theta — angular variable; the substitution t=eiθt=e^{i\theta} turns t−1/tt-1/t into 2isin⁡θ2i\sin\theta. Reading: this is a Fourier series whose coefficients are the Bessel functions, so a plane wave incident on a cylinder is automatically a sum of angular-momentum channels labelled by nn. Finally, because coefficient extraction is a contour integral, every generating function is also an integral representation waiting to be read off by Cauchy.

fn(x)=12πi∮CG(x,t)t n+1 dt(7)f_n(x)=\frac{1}{2\pi i}\oint_C \frac{G(x,t)}{t^{\,n+1}}\,\mathrm{d}t \qquad (7)

where: CC — a closed contour encircling t=0t=0 once counterclockwise; the integrand's residue at t=0t=0 is precisely the coefficient of tnt^n. Reading: applied to the Bessel kernel with t=eiθt=e^{i\theta} this gives the classical integral Jn(x)=1π∫0πcos⁡(nθ−xsin⁡θ) dθJ_n(x)=\tfrac1\pi\int_0^\pi\cos(n\theta-x\sin\theta)\,\mathrm{d}\theta — an integral representation obtained for free.

Derivation AThe Legendre kernel is the inverse-distance multipole expansion

The goal of this derivation is to show that equation (2) is not an abstract definition but the multipole expansion of the Newtonian and Coulomb potentials: the algebraic root (1−2xt+t2)−1/2(1-2xt+t^2)^{-1/2} is literally rr times the inverse distance 1/∣r−r′∣1/|\mathbf r-\mathbf r'| once the auxiliary variables are given their physical meaning, and the Legendre polynomials are exactly the coefficients that organise a source into monopole, dipole, quadrupole and higher terms. We start from the geometric inverse distance, factor out the larger radius, recognise the kernel, and read off the physics.

Step 1. Write the distance between a field point at r\mathbf r and a source point at r′\mathbf r' using the law of cosines, ∣r−r′∣=r2−2rr′cos⁡γ+r′2|\mathbf r-\mathbf r'|=\sqrt{r^2-2rr'\cos\gamma+r'^2}, where γ\gamma is the angle between the two vectors. Why: the potential of a point source is 1/∣r−r′∣1/|\mathbf r-\mathbf r'|, so this square root is the only object we need to expand.

Step 2. For a field point outside the source (r>r′r>r'), pull the larger radius out of the root: 1/∣r−r′∣=(1/r)(1−2(r′/r)cos⁡γ+(r′/r)2)−1/21/|\mathbf r-\mathbf r'|=(1/r)\big(1-2(r'/r)\cos\gamma+(r'/r)^2\big)^{-1/2}. Why: this exposes a dimensionless small parameter r′/r<1r'/r<1, which is exactly the convergence variable tt the generating function needs.

Step 3. Identify t=r′/rt=r'/r and x=cos⁡γx=\cos\gamma; the bracket is precisely the Legendre kernel of equation (2). Why: the mathematical identity and the physical expression are now the same object, so the coefficients of the expansion must be the same functions.

Step 4. Expand with (2) to get 1/∣r−r′∣=(1/r)∑n=0∞Pn(cos⁡γ) (r′/r)n1/|\mathbf r-\mathbf r'|=(1/r)\sum_{n=0}^{\infty}P_n(\cos\gamma)\,(r'/r)^n, the multipole series: n=0n=0 is the monopole 1/r1/r, n=1n=1 the dipole ∝1/r2\propto 1/r^2, n=2n=2 the quadrupole ∝1/r3\propto 1/r^3, and so on. Why: this is why PnP_n appear everywhere in electrostatics and gravitation — they are the angular shape of each multipole, delivered ready-made by the generating function. *At r=2, r′=1, γ=60∘r=2,\ r'=1,\ \gamma=60^\circ the exact value 1/3=0.57741/\sqrt3=0.5774 is reproduced by the partial sums 0.500,0.625,0.609,0.582,0.573,…0.500,0.625,0.609,0.582,0.573,\dots of the figure, converging as expected for t=0.5<1t=0.5<1.*

Go deeper · Derivation B · 1 minBonnet's three-term recurrence by differentiating the kernel
Derivation BBonnet's three-term recurrence by differentiating the kernel

The goal here is to demonstrate the signature technique of the whole subject: differentiate the generating function once with respect to the auxiliary variable tt, clear denominators to get a first-order differential equation in tt, substitute the series, and match the coefficient of a single power of tt. The output is Bonnet's recurrence relation, the three-term relation that every numerical library uses to evaluate Legendre polynomials, obtained without ever writing down a single PnP_n explicitly. The same four moves work for every classical family.

Step 1. Differentiate the Legendre kernel G=(1−2xt+t2)−1/2G=(1-2xt+t^2)^{-1/2} in tt: ∂tG=(x−t)(1−2xt+t2)−3/2=x−t1−2xt+t2 G\partial_t G=(x-t)(1-2xt+t^2)^{-3/2}=\dfrac{x-t}{1-2xt+t^2}\,G, rewriting the 3/23/2 power as the 1/21/2 power times one factor of the bracket. Why: expressing ∂tG\partial_t G as a rational multiple of GG turns an infinite family of relations into one differential equation in tt.

Step 2. Clear the denominator: (1−2xt+t2) ∂tG=(x−t) G(1-2xt+t^2)\,\partial_t G=(x-t)\,G, a first-order linear ODE relating GG and ∂tG\partial_t G. Why: this single equation secretly contains every recurrence in the family; matching powers of tt will unpack it.

Step 3. Insert the series G=∑nPntnG=\sum_n P_n t^n and ∂tG=∑nnPntn−1\partial_t G=\sum_n nP_n t^{n-1} on both sides: (1−2xt+t2)∑nnPntn−1=(x−t)∑nPntn(1-2xt+t^2)\sum_n nP_n t^{n-1}=(x-t)\sum_n P_n t^n. Why: now both sides are explicit power series in tt, and equating like powers is pure bookkeeping.

Step 4. Collect the coefficient of tnt^n. The left side contributes (n+1)Pn+1−2xn Pn+(n−1)Pn−1(n+1)P_{n+1}-2xn\,P_n+(n-1)P_{n-1}; the right side contributes x Pn−Pn−1x\,P_n-P_{n-1}. Why: the shift of index inside each term is where the recurrence's structure comes from — multiplying by tt raised each index, exactly the "shift the index" rule.

Step 5. Move everything to one side and simplify: (n+1)Pn+1(x)−(2n+1) x Pn(x)+n Pn−1(x)=0(n+1)P_{n+1}(x)-(2n+1)\,x\,P_n(x)+n\,P_{n-1}(x)=0, Bonnet's recurrence. Why: with only P0=1P_0=1 and P1=xP_1=x as seeds, this generates the entire family and is numerically far more stable than the closed forms. *For n=1n=1 the relation gives 2P2=3x⋅x−12P_2=3x\cdot x-1, so P2=12(3x2−1)P_2=\tfrac12(3x^2-1), the standard Legendre polynomial; higher nn regenerate P3=12(5x3−3x)P_3=\tfrac12(5x^3-3x) and P4=18(35x4−30x2+3)P_4=\tfrac18(35x^4-30x^2+3).*

Go deeper · Derivation C · 1 minBessel recurrences and parity from the Laurent kernel
Derivation CBessel recurrences and parity from the Laurent kernel

The aim of this derivation is to show that the same differentiate-and-match recipe survives the passage to a Laurent series, and that a discrete symmetry of the Bessel kernel — invariance under t→−1/tt\to-1/t — hands over the negative-order relation J−n=(−1)nJnJ_{-n}=(-1)^nJ_n that would otherwise require the series definition. Together the recurrence and the parity are all one needs to tabulate JnJ_n for every integer order from just J0J_0 and J1J_1, both from the single kernel e(x/2)(t−1/t)e^{(x/2)(t-1/t)} with no integral in sight.

Step 1. Differentiate G=e(x/2)(t−1/t)G=e^{(x/2)(t-1/t)} in tt: ∂tG=x2(1+t−2)G\partial_t G=\tfrac{x}{2}\big(1+t^{-2}\big)G, straight from the exponent. Why: as with Legendre, ∂tG\partial_t G is a simple multiple of GG, so one relation encodes the whole order-ladder.

Step 2. Substitute the Laurent series G=∑nJntnG=\sum_n J_n t^n on both sides: ∑nnJntn−1=x2∑nJn(tn+tn−2)\sum_n nJ_n t^{n-1}=\tfrac{x}{2}\sum_n J_n\big(t^n+t^{n-2}\big). Why: negative powers are now in play, but matching a fixed power of tt still works identically.

Step 3. Match the coefficient of tn−1t^{n-1}: nJn=x2(Jn−1+Jn+1)nJ_n=\tfrac{x}{2}\big(J_{n-1}+J_{n+1}\big), i.e. Jn−1(x)+Jn+1(x)=2nx Jn(x)J_{n-1}(x)+J_{n+1}(x)=\dfrac{2n}{x}\,J_n(x). Why: this is the order-recurrence, the workhorse for stepping up and down in Bessel order.

Step 4. Exploit the kernel's symmetry: replacing t→−1/tt\to-1/t leaves the exponent x2(t−1/t)\tfrac{x}{2}(t-1/t) unchanged, so G(x,−1/t)=G(x,t)G(x,-1/t)=G(x,t); expanding the left side gives ∑n(−1)nJnt−n\sum_n(-1)^nJ_n t^{-n}, and matching powers with ∑nJntn\sum_n J_n t^n yields J−n(x)=(−1)nJn(x)J_{-n}(x)=(-1)^n J_n(x). Why: a symmetry of the generating function becomes an exact identity among its coefficients, delivering all negative orders for free. *The recurrence at n=1n=1 reads J0(x)+J2(x)=(2/x)J1(x)J_0(x)+J_2(x)=(2/x)J_1(x), the standard relation; the parity gives J−1=−J1J_{-1}=-J_1, consistent with the tabulated Bessel values.*

Limiting cases

Each classical family corresponds to a distinct closed-form kernel, and recognising the kernel is the whole game — the region of convergence and the orthogonality weight are read off from its analytic type.

CaseResultMeaning
Legendre(1−2xt+t2)−1/2=∑n=0∞Pn(x) tn, ∣t∣<1(1-2xt+t^2)^{-1/2}=\sum_{n=0}^{\infty}P_n(x)\,t^n,\ \vert t\vert<1Algebraic kernel; the multipole/inverse-distance expansion; PnP_n orthogonal on [−1,1][-1,1] with weight 11.
Hermite (physicists')e2xt−t2=∑n=0∞Hn(x)n! tne^{2xt-t^2}=\sum_{n=0}^{\infty}\frac{H_n(x)}{n!}\,t^nEntire in tt (no radius limit); weight e−x2e^{-x^2} on (−∞,∞)(-\infty,\infty); harmonic-oscillator eigenstates.
Laguerre11−t e−xt/(1−t)=∑n=0∞Ln(x) tn, ∣t∣<1\frac{1}{1-t}\,e^{-xt/(1-t)}=\sum_{n=0}^{\infty}L_n(x)\,t^n,\ \vert t\vert<1Rational-exponent kernel; weight e−xe^{-x} on [0,∞)[0,\infty); radial Coulomb wavefunctions.
Bessel (integer order)e(x/2)(t−1/t)=∑n=−∞∞Jn(x) tn, t≠0e^{(x/2)(t-1/t)}=\sum_{n=-\infty}^{\infty}J_n(x)\,t^n,\ t\neq0Laurent series (negative powers present); Jacobi–Anger expansion; only integer orders appear.
Chebyshev TnT_n1−xt1−2xt+t2=∑n=0∞Tn(x) tn, ∣t∣<1\frac{1-xt}{1-2xt+t^2}=\sum_{n=0}^{\infty}T_n(x)\,t^n,\ \vert t\vert<1Rational kernel; weight (1−x2)−1/2(1-x^2)^{-1/2} on [−1,1][-1,1]; Tn(cos⁡θ)=cos⁡nθT_n(\cos\theta)=\cos n\theta.

Worked examples

1 · Multipole convergence: recovering 1/√3 from the Legendre series (fully worked)

A field point sits at radius r=2r=2 and a unit source at r′=1r'=1, with γ=60∘\gamma=60^\circ between them. Use the Legendre generating function to compute 1/∣r−r′∣1/|\mathbf r-\mathbf r'| and check it against the exact geometric value.

Step 1. Fix the variables. x=cos⁡60∘=0.5x=\cos 60^\circ=0.5 and t=r′/r=0.5<1t=r'/r=0.5<1, so the series (2) converges. The exact distance is ∣r−r′∣=22−2⋅2⋅1⋅0.5+12=4−2+1=3|\mathbf r-\mathbf r'|=\sqrt{2^2-2\cdot2\cdot1\cdot0.5+1^2}=\sqrt{4-2+1}=\sqrt3, giving the target 1/3=0.57741/\sqrt3=\mathbf{0.5774}.

Step 2. Evaluate the Legendre polynomials at x=0.5x=0.5: P0=1P_0=1, P1=0.5P_1=0.5, P2=12(3⋅0.25−1)=−0.125P_2=\tfrac12(3\cdot0.25-1)=-0.125, P3=12(5⋅0.125−3⋅0.5)=−0.4375P_3=\tfrac12(5\cdot0.125-3\cdot0.5)=-0.4375, P4=18(35⋅0.0625−30⋅0.25+3)=−0.28906P_4=\tfrac18(35\cdot0.0625-30\cdot0.25+3)=-0.28906.

Step 3. Build the partial sums SN=1r∑n=0NPn(0.5) (0.5)nS_N=\tfrac1r\sum_{n=0}^{N}P_n(0.5)\,(0.5)^n. The terms Pn(0.5)(0.5)nP_n(0.5)(0.5)^n are 1, 0.25, −0.03125, −0.05469, −0.01807,…1,\ 0.25,\ -0.03125,\ -0.05469,\ -0.01807,\dots, so the running sums (times 1r=0.5\tfrac1r=0.5) are S0=0.500, S1=0.625, S2=0.609, S3=0.582, S4=0.573S_0=0.500,\ S_1=0.625,\ S_2=0.609,\ S_3=0.582,\ S_4=0.573.

Step 4. Two more terms (P5(0.5)=0.08984, P6(0.5)=0.32324P_5(0.5)=0.08984,\ P_6(0.5)=0.32324) give S6=0.5769S_6=\mathbf{0.5769}, within 0.1%0.1\% of the exact 1/3=0.57741/\sqrt3=0.5774. The convergence is oscillatory (the coefficients alternate in sign) and geometric-fast only because t=0.5t=0.5; a source closer to the field point (t→1t\to1) converges painfully slowly, which is why multipole expansions are used for well-separated charges. The Legendre series reproduces 1/∣r−r′∣=1/3=0.57741/|\mathbf r-\mathbf r'|=1/\sqrt3=0.5774, term by term as monopole + dipole + quadrupole + ⋯

2 · Building the Hermite polynomials by recurrence (fully worked)

Use only the generating function e2xt−t2e^{2xt-t^2} — never a table — to produce H0H_0 through H4H_4 and verify the differential recurrence Hn′=2nHn−1H_n'=2nH_{n-1}.

Step 1. Read the two seeds directly from the kernel's low-order expansion: e2xt−t2=1+(2x)t+⋯e^{2xt-t^2}=1+(2x)t+\cdots, so H0=1H_0=\mathbf{1} and H1=2xH_1=\mathbf{2x}.

Step 2. Apply the pure recurrence Hn+1=2xHn−2nHn−1H_{n+1}=2xH_n-2nH_{n-1} (the Hermite analogue of Bonnet, from Derivation B's method). For n=1n=1: H2=2x(2x)−2⋅1⋅1=4x2−2H_2=2x(2x)-2\cdot1\cdot1=\mathbf{4x^2-2}.

Step 3. For n=2n=2: H3=2x(4x2−2)−2⋅2⋅(2x)=8x3−4x−8x=8x3−12xH_3=2x(4x^2-2)-2\cdot2\cdot(2x)=8x^3-4x-8x=\mathbf{8x^3-12x}. For n=3n=3: H4=2x(8x3−12x)−2⋅3⋅(4x2−2)=16x4−24x2−24x2+12=16x4−48x2+12H_4=2x(8x^3-12x)-2\cdot3\cdot(4x^2-2)=16x^4-24x^2-24x^2+12=\mathbf{16x^4-48x^2+12}.

Step 4. Check the differential recurrence. H3′=24x2−12H_3'=24x^2-12, and 2⋅3⋅H2=6(4x2−2)=24x2−122\cdot3\cdot H_2=6(4x^2-2)=24x^2-12 — they agree. Likewise H4′=64x3−96x=2⋅4⋅H3=8(8x3−12x)H_4'=64x^3-96x=2\cdot4\cdot H_3=8(8x^3-12x). Both recurrences are consistent; the entire Hermite family is generated from H0=1H_0=1, H1=2xH_1=2x and the kernel, with no closed-form evaluation of any polynomial.

3 · A Bessel sum rule from Jacobi–Anger

The plane-wave identity (6) has unit modulus on the left, ∣eixsin⁡θ∣=1|e^{ix\sin\theta}|=1. Turn this into a normalisation on the Bessel functions and test it numerically at x=1x=1.

Step 1. Take the squared modulus of (6) and average over one period. Since ∣eixsin⁡θ∣2=1|e^{ix\sin\theta}|^2=1, Parseval's theorem for the Fourier series ∑nJn(x)einθ\sum_n J_n(x)e^{in\theta} gives 12π∫−ππ1 dθ=∑n=−∞∞Jn(x)2=1\tfrac{1}{2\pi}\int_{-\pi}^{\pi}1\,\mathrm{d}\theta=\sum_{n=-\infty}^{\infty}J_n(x)^2=1.

Step 2. Fold the negative orders in with the parity J−n=(−1)nJnJ_{-n}=(-1)^nJ_n (so J−n2=Jn2J_{-n}^2=J_n^2): the sum rule becomes J0(x)2+2∑n=1∞Jn(x)2=1J_0(x)^2+2\sum_{n=1}^{\infty}J_n(x)^2=1.

Step 3. Evaluate at x=1x=1 using tabulated values J0(1)=0.7652, J1(1)=0.4401, J2(1)=0.1149, J3(1)=0.01956J_0(1)=0.7652,\ J_1(1)=0.4401,\ J_2(1)=0.1149,\ J_3(1)=0.01956. Then J02=0.5855J_0^2=0.5855, 2J12=0.38732J_1^2=0.3873, 2J22=0.026412J_2^2=0.02641, 2J32=0.0007652J_3^2=0.000765. The running total is 0.5855+0.3873+0.02641+0.000765=0.99997≈10.5855+0.3873+0.02641+0.000765=0.99997\approx 1, confirming the sum rule — energy conservation for a plane wave in cylindrical channels is nothing but ∑nJn2=1\sum_n J_n^2=1.

Physics of the portrait

The generating function is not one person's theorem but a method that crystallised over 150 years, as each new special function turned out to be the coefficient list of some elementary kernel. The portrait below traces the idea from its combinatorial birth to its role as the organising principle of the whole special-function zoo.

Origins · 1 mingenerating function and how this was discovered
GF
generating function
the master kernel G(x,t) = Σ fₙ(x) tⁿ · special functions of mathematical physics

The generating function began as a bookkeeping trick and became a unifying principle. Leonhard Euler used power series in the 1740s to encode integer sequences — the coefficients of ∏k(1−tk)−1\prod_k(1-t^k)^{-1} count partitions — establishing the core move of storing an infinite list as one analytic object. The physical payoff arrived with potential theory: in 1782 Adrien-Marie Legendre, studying the gravitational attraction of spheroids, expanded the inverse distance 1/∣r−r′∣1/|\mathbf r-\mathbf r'| and met the polynomials that bear his name as the coefficients of the radial ratio — the multipole expansion, discovered as a generating function before anyone called it that. Pierre-Simon Laplace systematised the method and coined the term fonction génératrice in his 1812 Théorie analytique des probabilités, showing that recurrences, sums, and asymptotics all flow from operations on the kernel. Friedrich Bessel, analysing planetary perturbations in 1824, arrived at the functions JnJ_n through the expansion of e(x/2)(t−1/t)e^{(x/2)(t-1/t)}, the archetypal Laurent-type generating function; Jacobi and Anger then read the same kernel at t=eiθt=e^{i\theta} as the plane-wave decomposition now named for them. Charles Hermite (1864) and Edmond Laguerre (1879) completed the classical roster with the oscillator and Coulomb polynomials, each defined most cleanly by its exponential kernel, and Ludwig Schläfli recast the coefficient formula as a contour integral, joining generating functions to integral representations. The modern viewpoint is the synthesis of all these strands: the special functions of physics are the coefficient lists of a small handful of elementary kernels, from which recurrences, differential equations, orthogonality, and integral forms all follow.

History
1748
— Euler encodes integer sequences (partitions) as coefficients of a power series
1782
— Legendre expands the inverse distance and meets the polynomials Pₙ
1812
— Laplace names the fonction génératrice in his treatise on probability
1824
— Bessel reaches Jₙ through the kernel exp[(x/2)(t − 1/t)] in perturbation theory
1864
— Hermite introduces the polynomials Hₙ through the kernel exp(2xt − t²)

Going further

Texts. Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed., Ch. 15–16 (Legendre, Bessel, Hermite, Laguerre generating functions) · Hassani, Mathematical Physics, 2nd ed., Ch. 8 and Ch. 14 (classical orthogonal polynomials and their kernels) · Stone & Goldbart, Mathematics for Physics, Ch. on special functions · Byron & Fuller, Mathematics of Classical and Quantum Physics, Ch. 6 · Nakahara, Geometry, Topology and Physics (special functions in physical context) · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, Ch. 18 · Abramowitz & Stegun, §9, §22, and NIST DLMF §10.35, §18.12 for the authoritative formula list. The key reference values are: Bonnet's recurrence gives P2=12(3x2−1)P_2=\tfrac12(3x^2-1), P3=12(5x3−3x)P_3=\tfrac12(5x^3-3x), P4=18(35x4−30x2+3)P_4=\tfrac18(35x^4-30x^2+3); the Hermite chain gives H2=4x2−2H_2=4x^2-2, H3=8x3−12xH_3=8x^3-12x, H4=16x4−48x2+12H_4=16x^4-48x^2+12 with Hn′=2nHn−1H_n'=2nH_{n-1}; the Bessel order-recurrence gives J0+J2=(2/x)J1J_0+J_2=(2/x)J_1 and J−n=(−1)nJnJ_{-n}=(-1)^nJ_n, and the sum rule J0(1)2+2∑n≥1Jn(1)2=1.0000J_0(1)^2+2\sum_{n\ge1}J_n(1)^2=1.0000; the multipole series converges to 1/3=0.57741/\sqrt3=0.5774. All numbers quoted are standard textbook values.

Prerequisites. Orthogonal Polynomials: General Theory · Recurrence Relations for Special Functions · The Gamma Function. Leads to. Legendre Polynomials · Bessel Functions of the First and Second Kind · Spherical Harmonics.

Ask the tutor: Ask me to differentiate any of these kernels live and watch a full recurrence relation — Legendre, Hermite, Laguerre, or Bessel — fall out coefficient by coefficient.

What is the difference between an ordinary and an exponential generating function?

An ordinary generating function attaches the family directly to the powers, G=∑nfn(x) tnG=\sum_n f_n(x)\,t^n (the Legendre, Laguerre, and Chebyshev kernels are of this type). An exponential generating function carries a factorial weight, G=∑nfn(x) tn/n!G=\sum_n f_n(x)\,t^n/n! (the Hermite kernel is the classic example). The distinction is not cosmetic: the factorial changes how differentiation in tt acts on the coefficients, so the recurrence you extract looks slightly different, and exponential generating functions are the natural choice when the family arises from an exponential kernel like e2xt−t2e^{2xt-t^2}. In practice you read the type off the kernel — a bare ∑tn\sum t^n is ordinary, a ∑tn/n!\sum t^n/n! is exponential — and adjust the coefficient-matching bookkeeping accordingly.

Why is the auxiliary variable t called "unphysical" if it equals r′/r in the multipole case?

Because tt has no fixed meaning across families — its physical interpretation, when one exists, is different in every case. For Legendre in the multipole expansion t=r′/rt=r'/r is a ratio of radii; for the Jacobi–Anger form of Bessel t=eiθt=e^{i\theta} is a phase on the unit circle; for Hermite in the oscillator problem tt tracks a coherent-state displacement. In the pure mathematics of generating functions tt is just the variable whose powers index the family. The physics enters only when you choose to substitute a physical quantity for tt, and which quantity depends entirely on the problem.

Do I need to worry about the region of convergence when I use a generating-function identity?

For the derivation, yes; for the final coefficient identity, usually no. The kernel converges only inside a region of tt — ∣t∣<1|t|<1 for the Legendre and Laguerre roots, all t≠0t\neq0 for the Bessel Laurent series, all tt for the entire Hermite kernel — and any manipulation of the kernel is legitimate only inside that region. But the identities you extract relate the coefficients fn(x)f_n(x), which are individually polynomials or entire functions, and an identity between polynomials proven on an interval holds everywhere by analytic continuation. So Bonnet's recurrence, valid in principle only where ∣t∣<1|t|<1, actually holds for all xx. Respect convergence while working with GG, then forget it once you have a relation among the fnf_n.

How does a generating function give an integral representation?

Through Cauchy's coefficient formula, equation (7): the coefficient of tnt^n in any Laurent series is the contour integral 12πi∮CG(x,t) t−n−1 dt\tfrac{1}{2\pi i}\oint_C G(x,t)\,t^{-n-1}\,\mathrm{d}t around a small loop about t=0t=0. Feed a generating function into this and you get an integral representation of fn(x)f_n(x) automatically. For the Bessel kernel with the loop parametrised as t=eiθt=e^{i\theta}, the formula collapses to Jn(x)=1π∫0πcos⁡(nθ−xsin⁡θ) dθJ_n(x)=\tfrac{1}{\pi}\int_0^\pi\cos(n\theta-x\sin\theta)\,\mathrm{d}\theta, the classical Bessel integral, and deforming the same contour produces the Schläfli and Sommerfeld representations used in asymptotics. So integral representations are not a separate theory — they are the generating function read through a contour integral.

Why do numerical libraries use recurrences instead of the closed-form generating function?

Because recurrences are fast and, used in the right direction, numerically stable, while direct summation of a series loses precision at large order. A generating function's real value to a numericist is that it proves the three-term recurrence exists and gives its coefficients. Legendre and Hermite polynomials are evaluated by forward recurrence from the two lowest members; Bessel functions of increasing order are evaluated by Miller's algorithm, running the recurrence backward from a high order (where the unwanted growing solution is suppressed) and normalising at the end with a sum rule like ∑nJn2=1\sum_n J_n^2=1. In every case the generating function is the theoretical backstop and the recurrence is the actual code.

Can every special function be defined by a generating function?

The classical orthogonal polynomials and the integer-order Bessel functions have famously simple kernels, but "generating function" is a flexible notion and most special functions admit some generating relation — often a bilinear one (Mehler's formula for Hermite) rather than the single-variable kernels here. The important caveat is coverage: a Laurent or Taylor kernel indexes its family by integers, so non-integer-order functions (general JνJ_\nu, the hypergeometric functions) need a different route — a series, an integral, or a differential-equation definition. Generating functions are the most elegant tool when they apply, not a universal definition.

Before this

Where this leads