Find the binomial coefificient of $x^8$ in $(1+x^2-x^3)^9$ I was trying to solve it using the multinomial theorem.
I was trying to find which combinations could give me such $x^8$
and I came to the conclusion that it only occours when i take
 $(x^2)^4$ or $(-x^3)^2*(x^2)^1$
therefore: $\binom{9!}{0!*4!*0!} + \binom{9!}{0!*1!*2!}$
It just seems just too big of a number.. what am I missing?

A comparison.  It is convenient to  use the coefficient  of operator $[x^n]$ to denote the coefficient of $x^n$.

Multinomial theorem:
\begin{align*}
\color{blue}{[x^8]}&\color{blue}{\left(1+x^2-x^3\right)^9}\\
&=[x^8]\sum_{{k_1+k_2+k_3}\atop{k_1,k_2,k_3\geq 0}}\binom{9}{k_1,k_2,k_3}1^{k_1}\left(x^2\right)^{k_2}\left(-x^3\right)^{k_3}\\
&=[x^8]\sum_{{k_1+k_2+k_3}\atop{k_1,k_2,k_3\geq 0}}\binom{9}{k_1,k_2,k_3}(-1)^{k_3}x^{2k_2+3k_3}\\
&=\binom{9}{5,4,0}(-1)^0+\binom{9}{6,1,2}(-1)^2\tag{1}\\
&=\frac{9!}{5!4!0!}+\frac{9!}{6!1!2!}\\
&=126+252\\
&\,\,\color{blue}{=378}
\end{align*}

Comment:

*

*In (1) we select the coefficient of $x^8$. We also note the sum of the entries of the lower indices of the multinomial coefficient is $9$ (i.e. $5+4+0=6+1+2=9$).


Binomial theorem (twice):
\begin{align*}
\color{blue}{[x^8]}&\color{blue}{\left(1+x^2-x^3\right)^9}\\
&=[x^8]\sum_{k=0}^9\binom{9}{k}\left(x^2+x^3\right)^k\\
&=[x^8]\sum_{k=0}^9\binom{9}{k}x^{2k}\left(1+x\right)^k\\
&=\sum_{k=0}^4\binom{9}{k}x^{2k}[x^{8-2k}]\left(1+x\right)^k\tag{2}\\
&=\sum_{k=0}^4\binom{9}{k}\binom{k}{8-2k}\tag{3}\\
&=\binom{9}{3}\binom{3}{2}+\binom{9}{4}\binom{4}{0}\tag{4}\\
&=252+126\\
&\,\,\color{blue}{=378}
\end{align*}

Comment:

*

*In (2) we apply the rule $[x^{p-q}]A(x)=[x^p]x^qA(x)$ and set the upper limit of the sum to $4$ since the exponent of $x^{8-2k}$ is non-negative.


*In (3) we select the coefficient of $x^{8-2k}$.


*In (4) we select the non-zero terms of (3) noting that $\binom{p}{q}=\frac{p(p-1)\cdots(p-q+1)}{q!}=0$ if $q>p$.
