Extract coefficients for a formal power series using Lagrange Inversion Formula Given $f(x)$ is a formal power series that satisfies $f(0) = 0$
$(f(x))^{3} + 2(f(x))^{2} + f(x) - x = 0$
I know that the Lagrange inversion formula states given f(u) & $\varphi(u)$ are formal power series with respect to u, and $\varphi(0) = 1$ then the following is true.
$[x^{n}](f(u(x))) = \frac{1}{n}[u^{n-1}](f'(u)\varphi(u)^{n})$
How do I find the coefficient of $x^{n}$ in $f(x)$ using Lagrange inversion formula?
 A: Suppose we have
$$f(z)^3 + 2f(z)^2 + f(z) = z$$
and we seek $[z^n] f(z).$ 
While we wait  for a contribution from LIF experts  in the meantime we
can use  Poor Man's Lagrange  Inversion which is the  Cauchy Residue
Theorem. We have
$$[z^n] f(z)
= \frac{1}{2\pi i}
\int_{|z|=\epsilon} \frac{1}{z^{n+1}} f(z) \; dz.$$
Now put $w=f(z)$ so that $w^3+2w^2+w = z$ and
$3w^2 + 4w + 1 \; dw = dz$ to get
$$\frac{1}{2\pi i}
\int_{|w|=\epsilon} \frac{1}{w^{n+1} (1+w)^{2n+2}}
\times w \times (3w^2 + 4w + 1) \; dw.$$
Now $$w \times (3w^2 + 4w + 1) 
= 3 (1+w)^3 - 5 (1+w)^2 + 2 (w+1).$$
Extracting coefficients we thus have
$$3 (-1)^n {n+2n-2\choose n}
- 5 (-1)^n {n+2n-1\choose n}
+ 2 (-1)^n {n+2n\choose n}
\\ = (-1)^n \times
\left(3{3n-2\choose n}
- 5 {3n-1\choose n}
+ 2{3n\choose n}\right).$$
This is
$$(-1)^n {3n-2\choose n}
\left(3 - 5\frac{3n-1}{2n-1}
+ 2 \frac{(3n-1)3n}{(2n-1)2n}\right)
\\ = \frac{(-1)^n}{1-2n} {3n-2\choose n}.$$
Remark.  The fact  that we  are given  $f(0) =  0$  determines the
choice of branch  so that $z=0$ corresponds to  $w=0$ (which is needed
when  we  make  the  substitution).   Also, if  we  choose  $\epsilon$
sufficiently  small  we  also get  a  small  circle  for $w$  (with  a
different $\epsilon.$)
Addendum, five years later. A better choice of integral
is
$$[z^n] f(z) = \frac{1}{n} [z^{n-1}] f'(z)
= \frac{1}{n} \frac{1}{2\pi i}
\int_{|z|=\varepsilon}
\frac{1}{z^n} f'(z) \; dz.$$
We put $w = f(z)$ and obtain
$$\frac{1}{n} \frac{1}{2\pi i}
\int_{|w|=\gamma}
\frac{1}{w^n (1+w)^{2n}} \; dw
= \frac{(-1)^{n-1}}{n} {n-1+2n-1\choose n-1}
\\ = \frac{(-1)^{n-1}}{n} {3n-2\choose n-1}.$$
A: Here we use a somewhat simpler but equivalent variant of the Lagrange Inversion Formula. (See Theorem A.2 in Analytic Combinatorics by P. Flajolet and R. Sedgewick for the equivalence of the variants).

Lagrange Inversion Formula: 
Let $g(x), f(x)\in x\mathbb{C}[x]$ be inverses: $g(f(x))=x$. If $g(x)=\frac{x}{\phi(x)}$ and 
  $f(x)=x\phi\left(f(x)\right)$, then
  \begin{align*}
[x^n]f(x)=\frac{1}{n}\left[x^{n-1}\right]\left(\phi(x)\right)^n\tag{1}
\end{align*}

The functional relation
\begin{align*}
(f(x))^{3} + 2(f(x))^{2} + f(x) - x = 0
\end{align*}
can be written as $g\left(f(x)\right)=x$ with
\begin{align*}
g(x)&=x^3+2x^2+x\\
&=x(1+x)^2
\end{align*}

We can write $$\phi(x)=\frac{x}{g(x)}=\frac{1}{(1+x)^2}$$ 
and obtain
\begin{align*}
[x^n]f(x)&=\frac{1}{n}\left[x^{n-1}\right]\left(\phi(x)\right)^n\tag{2}\\
&=\frac{1}{n}\left[x^{n-1}\right]\frac{1}{(1+x)^{2n}}\\
&=\frac{1}{n}\binom{-2n}{n-1}\tag{3}\\
&=\frac{(-1)^{n-1}}{n}\binom{3n-2}{n-1}
\end{align*}

Comment:


*

*In (2) we apply the Lagrange Inversion Formula (1)

*In (3) we use the binomial identity
\begin{align*}
\binom{-p}{q}=\binom{p+q-1}{q}(-1)^q
\end{align*}
