# Thread: Coefficient in the expansion

1. ## Coefficient in the expansion

What is the coefficient of x^6 in the expansion (1+x+x^2)^9. Explain please

2. Originally Posted by ranyeng
What is the coefficient of x^6 in the expansion (1+x+x^2)^9. Explain please
Count the number of ways to rearrange each of these string.
$111xxxxxx,~1111xxxxx^2,~ 11111xxx^2x^2,~ \&~111111x^2x^2x^2$
For example: the string $1111xxxxx^2$ can be rearranged in $\frac{9!}{(1!)(4!)(4!)}$ ways.
Note that product is $x^6$.
The sum of the numbers of rearrangements is the coefficient of $x^6$.

3. Can you please explain with the above example( better if you write the steps)

4. Originally Posted by ranyeng
Can you please explain with the above example( better if you write the steps)
No sorry that happens to be your job.

I will say the number of ways to rearrange the string $aabbbcccc$ is $\frac{9!}{(2!)(3!)(4!)}$.
If you do not understand that rule, then you have no business trying this question.

5. Originally Posted by ranyeng
What is the coefficient of x^6 in the expansion (1+x+x^2)^9. Explain please
Another approach is to make use of the identity

$(1+x+x^2)^9 = \left( \frac{1-x^3}{1-x} \right) ^9 = (1-x^3)^9 \; (1-x)^{-9}$

then expand $(1-x^3)^9$ and $(1-x)^{-9}$ by the binomial theorem.

(Assuming you know how to use the binomial theorem for negative exponents.)