How to find the coefficient of $x^4$ in the expansion of $(1+x+x^2)^{20}$?
-
https://en.wikipedia.org/wiki/Multinomial_theorem – Aug 19 '17 at 13:54
3 Answers
Let us treat this trinomial $$1+x+x^2$$ instead as a binomial: $$=(1+x)+x^2$$ Then, by the binomial theorem, we have $$(1+x+x^2)^{20}=\sum_{n=0}^{20} \binom{20}{n}x^{2n}(1+x)^{20-n}$$ Now notice that it in this sum, only the $n=0,1,2$ terms can have an $x^4$ term, because otherwise the $x^{2n}$ would produce some power of $x$ greater than $4$. Thus we need only to examine the terms $$\binom{20}{0}(1+x)^{20}$$ $$\binom{20}{1}x^2(1+x)^{19}$$ $$\binom{20}{2}x^4(1+x)^{18}$$ Using the binomial theorem, from the first term, we have a coefficient of $$\color{red}{\binom{20}{0}\binom{20}{4}}$$ Again using the binomial theorem, from the second term, we have a coefficient of $$\color{red}{\binom{20}{1}\binom{19}{2}}$$ and from the last term, it is rather obvious that the coefficient will be $$\color{red}{\binom{20}{2}}$$ and so the final coefficient is $$\color{red}{\binom{20}{0}\binom{20}{4}+\binom{20}{1}\binom{19}{2}+\binom{20}{2}}$$
- 39,754
- 9
- 73
- 166
-
Using the binomial theorem, from the first term, we have a coefficient of /binom {16} C{4} instead of (204) @Nilknarf – Sakuzi Markel Aug 19 '17 at 14:02
-
@SakuziMarkel No, I don't think so, because in the first term, $(1+x)$ is being raised to the $20$th power, not the $16$th. – Franklin Pezzuti Dyer Aug 19 '17 at 14:04
-
-
Because the coefficient of the $x^4$ term of $x^4(1+x)^{18}$ is the same as the coefficient of the $x^0$ term in $(1+x)^{18}$, since $x^4\cdot x^0=x^4$. – Franklin Pezzuti Dyer Aug 19 '17 at 14:17
-
@kingW3 Oh my god, what a ridiculously stupid mistake. Thank you so much for telling me! :P – Franklin Pezzuti Dyer Aug 19 '17 at 14:41
$$ \begin{align} \left[x^n\right]\left(1+x+x^2\right)^{20} &=\left[x^n\right]\left(\frac{1-x^3}{1-x}\right)^{20}\\ &=\left[x^n\right]\overbrace{\sum_{j=0}^{20}\binom{20}{j}\left(-x^3\right)^j}^{\left(1-x^3\right)^{20}}\overbrace{\sum_{k=0}^\infty\binom{-20}{k}(-x)^k\vphantom{\sum_{j=0}^{20}}}^{(1-x)^{-20}}\\ &=(-1)^n\sum_{j=0}^{\lfloor n/3\rfloor}\binom{20}{j}\binom{-20}{n-3j}\tag{$k=n-3j$}\\ &=\sum_{j=0}^{\lfloor n/3\rfloor}(-1)^j\binom{20}{j}\binom{n-3j+19}{19}\\ \end{align} $$ For $n=4$, there are just two term: $$ \binom{20}{0}\binom{23}{19}-\binom{20}{1}\binom{20}{19}=8455 $$
- 345,667
HINT
Let $f(x)=(1+x+x^2)^{20}$. Use the forth derivative for $x=0$ , that is $f^{''''}(0)$
If $c$ is the wanted coefficient, then $f^{''''}(x)=4! \cdot c + x \cdot g(x)$. Now making $x=0$ one gets $c = \frac {f^{''''}(0)}{4!}$