<s>[INST] Binomial Theorem with Three Terms $(x^2 + 2 + \frac{1}{x} )^7$
Find the coefficient of $x^8$
Ive tried to combine the $x$ terms and then use the general term of the binomial theorem twice but this does seem to be working.
Does anyone have a method of solving this questions and others similar efficiently?
Thanks.
 [/INST] The multinomial theorem can come to the rescue:
$$
(a+b+c)^n=\sum_{i+j+k=n}\binom{n}{i,j,k}a^ib^jc^k
$$
where $\dbinom{n}{i,j,k} = \dfrac{n!}{i! \, j! \, k!}$.
Here $n=7$, $a=x^2$, $b=2$, $c=x^{-1}$. How can we get $a^ic^k=x^8$? We need
$$
2i-k=8,\qquad i+k\le 7
$$
Hence $k=2i-8$ and $3i-8\le 7$, so $i\ge4$ and $i\le 5$. Hence we have the cases


*

*$i=4$, $k=0$, $j=3$;

*$i=5$, $k=2$, $j=0$.


Thus the coefficient is
$$
2^3\binom{7}{4,3,0}+\binom{7}{5,0,2}=
8\frac{7!}{4!\,3!\,0!}+\frac{7!}{5!\,0!\,2!}=8\cdot35+21=301
$$
</s>