$(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?


  • 1
    $\begingroup$ Perhaps slightly easier to find the coefficient of $x^{15}$ in the expansion of $(x^3+2x+1)^7$ $\endgroup$ – Henry Nov 19 '18 at 12:16
  • 1
    $\begingroup$ A "binomial with three terms" should probably be called a trinomial. $\endgroup$ – Torsten Schoeneberg Nov 20 '18 at 8:42

In order to get $x^8$ in the product you have to have either $$x^2 x^2 x^2 x^2 \times 2^3$$ or$$ x^2 x^2 x^2 x^2 x^2 (1/x)(1/x)$$

There are $\binom 7 4 $ of the first type and $ \binom 7 5$ of the second type.

Thus the coefficient of $x^8$ is $8(35)+21 = 301$

  • $\begingroup$ But in the first type, don't you also have to multiply by $(x^{-1})^3$? $\endgroup$ – mathpadawan Nov 19 '18 at 10:47
  • $\begingroup$ @mathnoob No, we only have $7$ parenthesis to multiply and our choices are exhausted by four $x^2$ and three $2$ $\endgroup$ – Mohammad Riazi-Kermani Nov 19 '18 at 10:51

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 $$


Let $$R(x)= \left(x^2+2+{1\over x}\right)^7$$ then we need to find a coeficient at $x^{15}$ for$$x^7R(x)= (x^3+2x+1)^7 $$ $$= \sum _{k=0}^7 {7\choose k}x^{21-3k}(2x+1)^k$$ Clearly if $21-3k\geq 16$ there is no term with $x^{15}$ so $21-3k\leq 15$ so $k\geq 2$.

Also if $21-3k\leq 7$ we have no term with $x^{15}$ so $21-3k\geq 8$ so $3k\leq 13$ so $k\leq 4$.

If $k=2$ we have $${7\choose 2}x^{15}(2x+1)^2$$ so the term is $21$

If $k=3$ we have $${7\choose 3}x^{12}(2x+1)^3$$ so the term is $35\cdot 8= 280$

If $k=4$ we have $${7\choose 4}x^{9}(2x+1)^4$$ there is no trem with $x^{15}$

so the answer is $301$.


The answer is 301.

Just trust your plan of the twofold use of the binomial formula:

First step

$$\left((x^2+2)+\frac{1}{x}\right)^7=\sum _{k=0}^7 \binom{7}{k} \left(x^2+2\right)^k x^{k-7}$$

Second step

$$\left(x^2+2\right)^k=\sum _{m=0}^k 2^{k-m} x^{2 m} \binom{k}{m}$$

Hence you get a double sum in which the power of $x$ is $2m+k-7$, setting this equal to $8$ we get $k = 15-2m$. This leaves this single sum over $m$

$$\sum _{m=0}^7 2^{15-3 m} \binom{7}{15-2 m} \binom{15-2 m}{m}$$

Since, for $n, m = 0,1,2,...$ the binomial coefficient $\binom{n}{m}$ is zero unless $n\ge m$ we find $7\ge 15-2m \to m \ge 4$ and $15-2m\ge m \to m\le 5$. Hence only the terms with $m=4$ and $m=5$ contribute to the sum giving $280$ and $31$, respectively, the sum of which is $301$.


To expand on Henry's comment, this is equivalent to finding the coefficient of $x^{15}$ in $(x^3+x+x+1)^7$. And that is equivalent to finding the number of ways of choosing (with replacement) seven numbers from [3,1,1,0] that add up to 15 (note for the purposes of this counting, the two 1's are distinguishable). In other words, how many length seven sequence of 3's, 1's, 1's, and 0's are there with a sum of 15? Start with the largest number first: if you have zero 3's, then the most you can get is by taking seven 1's, giving you 7, which is too small. With one 3, you can get at most 9. With two 3's, 11. Three 3's, 13. It's not until you get to four 3's that you can get 15, with four 3's and three 1's. There are ${7 \choose 4}$ different orderings of the 3's. Since the 1's are distinguishable, and there are two options of which to take each time, that contributes a factor of $2^3=8$. If we have five 3's, that means that the rest have to be 0, so that gives ${7\choose 5}$ possibilities. Once you get past five 3's, you're at more than 15 for the total, so that's it: $2^3{7 \choose 4}+{7\choose 5}$.

This approach can be used more generally. For instance, suppose you want the coefficient of $x^{15}$ for $(x^7+x^6+x^5+x^4+x^3)^3$. You then need to find the number of ways to take from [7,6,5,4,3] with replacement three times and get a sum of 15. You have

7+5+3, 7+3+4, 5+7+3, 5+3+7, 3+7+5, 3+5+7
7+4+4, 4+7+4, 4+4+7
6+6+3, 6+3+6, 3+6+6
6+5+4, 6+4+5, 5+6+4, 5+4+6, 4+6+5, 4+5+6

That's a total of 18, so the coefficient of $x^{15}$ will be 18 (note that each line is just permutations of the same numbers).

  • $\begingroup$ What about to undelete that OP? $\endgroup$ – gimusi Nov 26 '18 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.