# Binomial Theorem Question (Expansion of Three Terms)

I have the term: $(1 + 2x - x^2)^4.$

The question asks me to find the coefficient of $x^5$.

My solution:

$\sum\limits_{i=0}^4 {4 \choose r} (1)^{4-r}(2x-x^2)^r$

I then factored out x from $(2x-x^2)$, getting $x(2-x)$.

Then, since the terms with the x's are being raised to the $r$th power, I did:

$(x(2-x))^r$, or $x^r(2-x)^r$

I know that I'm dealing with x's, so since I want the exponent to be 5 as the question says, I focus on the x's and multiply them together to get $x^{2r}$, and then I equated 2r to 5. Solving, I got r = 5/2 which can't be because I'm dealing with a binomial coefficient - integers only.

What did I do wrong? My logic makes sense to me, but I don't see why I'm incorrect here.

Thanks.

• I don't know what is most efficient, but my leanings are to expand $(a-b)^4$ where $a=1+2x$ and $b=x^2$. This is because the terms that involve $x^2$ raised to the power $3$ or $4$ don't matter. It will be very quick. – André Nicolas Oct 3 '15 at 23:34
• Hmm, I'm not sure I understand completely: Do you mean that in using the binomial theorem, I would do (1+2x)^4-r and (-x^2)^r instead? And how come terms involving x^2 raised to the power 3 or 4 don't matter? – user164403 Oct 3 '15 at 23:42
• Because you want the coefficient of $x^5$, so terms multiplied by $x^6$ or $x^8$ make no contribution. But your method works fine also. – André Nicolas Oct 3 '15 at 23:47
• In doing the method, I get r = 1. (4 choose 1) * (1+2x)^3 * (-x^2)^1 ends up giving me a coefficient of -32 for x^5, which is way off. The answer is 8. What did I do wrong? – user164403 Oct 3 '15 at 23:49
• There are $2$ terms to think about: $-\binom{4}{1}$ times the coefficient of $x^3$ in $(2-x)^4$ and $\binom{4}{2}$ times the coefficient of $x$ in $(2-x)^4$. Lots of minus signs and chances of error. – André Nicolas Oct 4 '15 at 0:39

## 2 Answers

Since the size of the problem is small, we can count the cases directly. First, there are two partitions of 5 into at most 4 parts with each part at most 2, namely, $5=2+2+1$ and $5=2+1+1+1$. These correspond to the ways you can get $x^5$.

The partition $5=2+2+1$ means you get 2 factors of $-x^2$ from two of the terms, and a factor of $2x$ from another one. You can do this in $\binom42\binom21=12$. So you $12$ terms of the form $(-x^2)^2 2x$; in total $24x^5$.

For $5=2+1+1+1$ there are $\binom41\binom33=4$ cases and the terms are of the form $-x^2(2x) (2x)(2x)=-8x^5$; in total $-32x^5$.

So the $x^5$ term is $$24x^5-32x^5= -8x^5.$$

In your method you also need to expand $(2x-x^2)$ with a binomial sum.

Note: Corrections made based on the comment below.

• Right idea, but you forgot to include the coefficients of the terms in the trinomial $1+2x-x^2$. For the partition $5=2+2+1$, the resulting term is $(-x^2)^2\cdot(2x)=2x^5$, and for $5=2+1+1+1$, the term is $(-x^2)\cdot(2x)^3=-8x^5$, so the result is $12\cdot2+4\cdot(-8)=-8$. – Steve Kass Oct 4 '15 at 0:49
• Thanks. I made corrections. – DirkGently Oct 4 '15 at 0:57
• In case the jump to partitions is confusing, think this: You want the sum of those terms in $(1 + 2x - x^2)\cdot(1 + 2x - x^2)\cdot(1 + 2x - x^2)\cdot(1 + 2x - x^2)$ that have $x^5$. There’s a term in the product for each way of picking $1$, $2x$, or $-x^2$ from each factors. The $x^5$ terms come from choices where the powers of $x$ add to 5, hence partitions of $5$. The powers could add up to $5$ as $5=2+2+1+0$ (pick $-x^2$, $-x^2$, $2x$, and $1$ from the factors), $1+0+2+1$ (pick $2x$, $1$, $-x^2$, and $2x$), etc. You have to choose a $2$ and three $1$s or two $2$s and a $1$. – Steve Kass Oct 4 '15 at 1:16

\begin{align} &[x^5](1+2x-x^2)^4 \\=&[x^5]\sum_{r=0}^4\binom 4r (2x-x^2)^r \\=&[x^5]\sum_{r=0}^4\binom 4r (2x)^r \left(1-\frac x2\right)^r \\=&[x^5]\sum_{r=0}^4\binom 4r (2x)^r \sum_{j=0}^r \binom rj \left(-\frac x2\right)^j \\=&\underbrace{\underbrace{\binom 43 2^3\cdot \binom 32 \left(-\frac 12\right)^2}_{r=3, j=2}+ \underbrace{\binom 44 2^4\cdot \binom 41 \left(-\frac 12\right)^1}_{r=4,j=1}}_{r+j=5; \quad 0\leq j\leq r\leq 4} \\=&-8\qquad\blacksquare \end{align}

Alternatively, using the multinomial theorem,

\begin{align} &[x^5](1+2x-x^2)^4 \\ =&\text{coeff. of }1^1(2x)^1(-x^2)^2+\text{coeff. of }1^0(2x)^3(-x^2)^1 \\ =&\binom {4}{1,1,2}\cdot 1^1\cdot 2^1\cdot (-1)^2+\binom 4{0,3,1}\cdot 1^0\cdot 2^3\cdot (-1)^1 \\ =&\frac {4!}{1!\;1!\;2!}\cdot 2+\frac {4!}{0!\;3!\;1!}\cdot 8\cdot (-1) \\ =&-8\qquad\blacksquare \end{align}

• Why did you just remove the 1 from the expansion of the trinomial? – user164403 Oct 4 '15 at 15:59
• Because $1$ to the power of anything is $1$! – hypergeometric Oct 4 '15 at 16:12
• Your penultimate line should read $= \frac{4!}{1!1!2!} \cdot 2 + \frac{4!}{0!3!1!} \cdot 1 \cdot \color{red}{8} \cdot \color{red}{-1}$. – N. F. Taussig Oct 5 '15 at 11:51
• @N.F.Taussig - Yes - thanks! Corrected. BTW if we use $\cdot$ is it ok not to use brackets for negative numbers? It would look much neater, but I was not sure if that's allowed. – hypergeometric Oct 5 '15 at 13:39
• As you saw, I do not necessarily use parentheses around negative numbers in a product. Whether it is good practice depends on whether it is clear that a negative number rather than subtraction is intended. – N. F. Taussig Oct 5 '15 at 15:47