# Lagrange inversion theorem

In mathematical analysis, the Lagrange inversion theorem, also known as the Lagrange–Bürmann formula, gives the Taylor series expansion of the inverse function of an analytic function.

## Theorem statement

Suppose z is defined as a function of w by an equation of the form

$f(w) = z\,$

where f is analytic at a point a and f '(a) ≠ 0. Then it is possible to invert or solve the equation for w:

$w = g(z)\,$

on a neighbourhood of f(a), where g is analytic at the point f(a). This is also called reversion of series.

The series expansion of g is given by[1]

$g(z) = a + \sum_{n=1}^{\infty} \left( \lim_{w \to a}\left( {\frac{(z - f(a))^n}{n!}} \frac{\mathrm{d}^{\,n-1}}{\mathrm{d}w^{\,n-1}} \left( \frac{w-a}{f(w) - f(a)} \right)^n\right) \right).$

The formula is also valid for formal power series and can be generalized in various ways. It can be formulated for functions of several variables, it can be extended to provide a ready formula for F(g(z)) for any analytic function F, and it can be generalized to the case f '(a) = 0, where the inverse g is a multivalued function.

The theorem was proved by Lagrange[2] and generalized by Hans Heinrich Bürmann,[3][4][5] both in the late 18th century. There is a straightforward derivation using complex analysis and contour integration; the complex formal power series version is clearly a consequence of knowing the formula for polynomials, so the theory of analytic functions may be applied. Actually, the machinery from analytic function theory enters only in a formal way in this proof, in that what is really needed is just some property of the formal residue, and a more direct formal proof is available.

## Applications

### Lagrange–Bürmann formula

There is a special case of Lagrange inversion theorem that is used in combinatorics and applies when $f(w)=w/\phi(w)$ and $\phi(0)\ne 0.$ Take $a=0$ to obtain $b=f(0)=0.$ We have

$g(z) = \sum_{n=1}^{\infty} \left( \lim_{w \to 0} \left( \frac {\mathrm{d}^{n-1}}{\mathrm{d}w^{n-1}} \left( \frac{w}{w/\phi(w)} \right)^n \right) \frac{z^n}{n!} \right)$
$= \sum_{n=1}^{\infty} \frac{1}{n} \left( \frac{1}{(n-1)!} \lim_{w \to 0} \left( \frac{\mathrm{d}^{n-1}}{\mathrm{d}w^{n-1}} \phi(w)^n \right) \right) z^n,$

which can be written alternatively as

$[z^n] g(z) = \frac{1}{n} [w^{n-1}] \phi(w)^n,$

where $[w^r]$ is an operator which extracts the coefficient of $w^r$ in the Taylor series of a function of w.

A useful generalization of the formula is known as the Lagrange–Bürmann formula:

$[z^n] H (g(z)) = \frac{1}{n} [w^{n-1}] (H' (w) \phi(w)^n)$

where H can be an arbitrary analytic function, e.g. H(w) = wk.

### Lambert W function

The Lambert W function is the function $W(z)$ that is implicitly defined by the equation

$W(z) e^{W(z)} = z.\,$

We may use the theorem to compute the Taylor series of $W(z)$ at $z=0.$ We take $f(w) = w \mathrm{e}^w$ and $a = b = 0.$ Recognizing that

$\frac{\mathrm{d}^n}{\mathrm{d}x^n}\ \mathrm{e}^{\alpha\,x}\,=\,\alpha^n\,\mathrm{e}^{\alpha\,x}$

this gives

$W(z) = \sum_{n=1}^{\infty} \lim_{w \to 0} \left( \frac{\mathrm{d}^{\,n-1}}{\mathrm{d}w^{\,n-1}}\ \mathrm{e}^{-nw} \right) { \frac{z^n}{n!}}\,=\, \sum_{n=1}^{\infty} (-n)^{n-1}\, \frac{z^n}{n!}=z-z^2+\frac{3}{2}z^3-\frac{8}{3}z^4+O(z^5).$

The radius of convergence of this series is $e^{-1}$ (this example refers to the principal branch of the Lambert function).

A series that converges for larger z (though not for all z) can also be derived by series inversion. The function $f(z) = W(e^z) - 1\,$ satisfies the equation

$1 + f(z) + \ln (1 + f(z)) = z.\,$

Then $z + \ln (1 + z)\,$ can be expanded into a power series and inverted. This gives a series for $f(z+1) = W(e^{z+1})-1\,$:

$W(e^{1+z}) = 1 + \frac{z}{2} + \frac{z^2}{16} - \frac{z^3}{192} - \frac{z^4}{3072} + \frac{13 z^5}{61440} - \frac{47 z^6}{1474560} - \frac{73 z^7}{41287680} + \frac{2447 z^8}{1321205760} + O(z^9).$

$W(x)\,$ can be computed by substituting $\ln x - 1\,$ for z in the above series. For example, substituting -1 for z gives the value of $W(1) = 0.567143\,$.

### Binary trees

Consider the set $\mathcal{B}$ of unlabelled binary trees. An element of $\mathcal{B}$ is either a leaf of size zero, or a root node with two subtrees. Denote by $B_n$ the number of binary trees on n nodes.

Note that removing the root splits a binary tree into two trees of smaller size. This yields the functional equation on the generating function $B(z) = \sum_{n=0}^\infty B_n z^n$:

$B(z) = 1 + z B(z)^2.$

Now let $C(z) = B(z) - 1$ and rewrite this equation as follows:

$z = \frac{C(z)}{(C(z)+1)^2}.$

Now apply the theorem with $\phi(w) = (w+1)^2:$

$B_n = [z^n] C(z) = \frac{1}{n} [w^{n-1}] (w+1)^{2n} = \frac{1}{n} {2n \choose n-1} = \frac{1}{n+1} {2n \choose n}.$

We conclude that $B_n$ is the Catalan number.