# What is the coefficient of the $x^3$ term in the expansion of $(x^2+x-5)^7$ (See details)?

I fail to see a simple way to answer this.

As such, this is my long winded approach:

Using the multinomial theorem,

$$(x_1 + x_2 + \cdots + x_m)^n = \sum_{k_1+k_2+\cdots+k_m=n} {n \choose k_1, k_2, \ldots, k_m} \prod_{1\le t\le m}x_{t}^{k_{t}},$$

we have the specific parameters $m=3$, $n=7$, $x_1=x^2$, $x_2=x$, and $x_3=-5$.

Via the theorem,

$$(x^2+x-5)^7=\sum_{k_1+k_2+k_3=7} {7 \choose k_1, k_2, k_3}\prod_{1 \le t \le 3}x_{t}^{k_t}=\sum_{k_1+k_2+k_3=7} {7 \choose k_1, k_2, k_3}x^{2k_1}x^{k_2}(-5)^{k_3}.$$

The coefficient of the $x^3$ term is the summation of the multinomial coefficient multiplied by the $(-5)^{k_3}$ factor evaluated at all the solutions of the equation $2k_1+k_2=3$ where $0\le k_1\le 7$ and $0 \le k_2 \le 7$.

Those values are $(k_1,k_2)=\{(1,1),(0,3)\}.$ Given that $k_1+k_2+k_3=7$, $k_3$ are respectively $5$ and $4$.

Hence, the coefficient of the $x^3$ is $${7 \choose 1,1,5}(-5)^{5}+{7 \choose 0,3,4}(-5)^4.$$

Given that the definition of the multinomial coefficient is $${n \choose k_1,k_2,\ldots ,k_m}=\frac{n!}{k_1!k_2!\cdots k_m!},$$ \begin{align} {7 \choose 1,1,5}(-5)^{5}+{7 \choose 0,3,4}(-5)^4&=\frac{7!(-5)^5}{1!1!5!}+\frac{7!(-5)^4}{0!3!4!}\\ &=7\cdot 6(-5)^5+\frac{7\cdot 6\cdot 5(-5)^4}{3!}\\ &=-109375 \end{align}

This could be atrociously wrong. Either way, I am desperate for a much simpler process. This is ridiculous to do in a timed testing environment without the formulas given.

I would like to see a very simple but also very general way of arriving at the correct answer (preferably without college methods, but I am open to any methods).

What says you, Math.SE?

-

## 5 Answers

Why not use Calculus? Calculate the third derivative, evaluate at $0$, and divide by $3!=6$. Since the third derivative of $g^7$ is $210g^4{g'}^3+126g^5g'g''+7g^6g'''$, and $g(0)=-5$, $g'(0)=1$, $g''(0)=2$, and $g'''=0$, the evaluation gives surenough $-109375$.

-
This may be exactly what I was looking for! Could you expand on this please? In particular, can you explain exactly how the third derivative and, especially, $3!$ are related to this? – 000 Sep 22 '12 at 22:00
My guess is Taylor series, Limitless, though I'd love to see an explanation! – The Chaz 2.0 Sep 24 '12 at 12:54
Sorry for the delay, I didn’t come back to this one. Yes, Taylor series exactly. After all, a polynomial written in the ordinary way is also its own Taylor expansion about the center $0$. Remember that in general, the $n$-degree coefficient is the value of the $n$-th derivative (evaluated at the center), divided by $n!$. And there you are. – Lubin Sep 26 '12 at 22:43
Wow, Lubin! That was an excellent insight. I'm not well acquainted with Taylor Series yet (it's like a distant acquaintance), but I sure hope to make the friendship! If you don't mind, I'll provide this visual aid for future references if readers don't fully understand the math when said without symbols: \begin{align} \sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}\,(x-a)^{n} &\overbrace{=}^{\text{at a=0}}\sum_{n=0}^{\infty}\frac{f^{(n)}(0)}{n!}x^n=f(0)+\color{Red}{\frac {f'(0)}{1!}}x+ \color{Red}{\frac{f''(0)}{2!}}x^2+\color{Red}{\frac{f^{(3)}(0)}{3!}}x^3+ \cdots . \end{align} – 000 Sep 30 '12 at 15:21
@Limitless: BTW, the thing we are doing—evaluating $a$ at $0$—has a special name: Maclaurin Series. It's just another derivative of the Taylor Series. - Parth – Parth Kohli Nov 11 '12 at 9:13

Well, in full generality, the approach you took is the right one (though you made a minor mistake in the end), but if you want to do without all the machinery, it's probably easier to do this calculation armed only with a bit of common sense.

You want three factors of $x$ – where are you going to get them from? Either from three individual $x$s, or from one $x^2$ and one $x$. In either case, the remaining factors have to be $-5$. In the first case, you can choose $3$ out of $7$ factors to be $x$, so this yields $\binom73(-5)^4$. In the second case, you can select one out of $7$ factors to be $x^2$ and then one of the $6$ remaining factors to be $x$, so this yields $7\cdot6(-5)^5$. The sum is $35(-5)^4+42(-5)^5=(35-210)(-5)^4=-175\cdot625=-109375$, which is also what your approach would have yielded if you hadn't accidentally increased the exponent of $-5$ by one in the second term.

-
I'll give this answer more thought soon. I have to sleep now. Thanks, Joriki. – 000 Sep 22 '12 at 1:08
@Limitless: You're welcome. – joriki Sep 22 '12 at 1:34
I'm sorry, Joriki, but I could not follow this. You lost me at, "In either case,[. . .]." Your answer seems highly intuitive but it would seem that I don't have the fundamentals that you're using. – 000 Sep 22 '12 at 22:21

This is pretty much the same as joriki's approach, but the emphasis here is on a slightly different idea. Write $$[x^2+x+(-5)]^7=\sum_{k=0}^7{7\choose k}(x^2+x)^k(-5)^{7-k}\,.$$ Now note that for $k\ge 4$, the power $(x^2+x)^k$ starts with $x^4$ or higher power, and for $k<2$, it ends with $x^2$ or lower power. Thus only 2 terms ($k=2$ and $k=3$) have $x^3$ in them. Looking at what the corresponding coefficients are, we get $${7\choose 3}(-5)^4+{7\choose 2}\cdot 2\cdot (-5)^5$$ The rest of the computation is the same as in joriki's answer.

-
I like this idea. When I was thinking of this, I considered a method almost identical to this. My issue was in that I could not get to the part expressed in your third and fourth sentence. Considering I was also looking for fast methods, I gave up somewhat prematurely on this approach and figured that the multinomial theorem would be the long but clean approach. Thank you for this answer. I am not sure if I can use it on this type of problem in general given the time constraints, but I am still happy I read it. :) – 000 Sep 22 '12 at 23:29

Given that you're looking for the coefficient on a small monomial and the exponent is small, we can compute directly.

$$(x^2 + x - 5)^2 = \cdots + 2 x^3 - 9 x^2 - 10 x + 25$$

Rather than go through the usual method of multiplying two polynomials, you could do it term-wise. The only way to produce an $x^3$ is as $x^2 \cdot x$ or $x \cdot x^2$, so that coefficient is $1 \cdot 1 + 1 \cdot 1$, and so forth. Continuing:

$$(x^2 + x - 5)^3 = \cdots - 29 x^3 + 60 x^2 + 75 x - 125$$

Ah, let me introduce a trick for repeated exponents: rather than multiplying in copies of $(x^2 + x - 5)$ one at a time, we can skip a lot of steps by simply squaring an intermediate value. Squaring the previous equation gives

\begin{align*}(x^2 + x - 5)^6 &= \cdots + (2 \cdot (-29) \cdot (-125) + 2 \cdot 60 \cdot 75) x^3 \\ & + (2 \cdot 60 \cdot (-125) + 75^2) x^2 + (2 \cdot 75 \cdot (-125)) x + 125^2 \\&= \cdots + 16250 x^3 - 9375 x^2 - 18750 x + 15625 \end{align*}

Finally, when computing the seventh power, we can only compute the coefficient we care about:

\begin{align*}(x^2 + x - 5)^7 &= \cdots + (16250 \cdot (-5) + (-9375) \cdot 1 + (-18750) \cdot 1) x^3 + \cdots \\ &= \cdots - 109375 x^3 + \cdots\end{align*}

-
I unfortunately could not follow this answer. It isn't coming along well my intuition (and I am bad with numbers, so it doesn't surprise me). However, I appreciate that you gave it to me. Thank you. If you'd like to change it to be a bit more obvious, I would like that. But I appreciate it regardless. – 000 Sep 22 '12 at 22:15

Using the binomial theorem write this as $\sum_{k=0}^7\binom{7}{k}x^{2k}(x-5)^{7-k}$. Now the non-zero coefficients of $x^3$ occurs in the terms for $k=0$ and $k=1$. For $k=0$ we want the coefficient of $x^3$ in $(x-5)^7$ which is $\binom{7}{3}(-5)^4$; for $k=1$ we want the coefficient of $x$ in $(x-5)^6$ which is $6(-5)^5$. Thus the answer is

$$\binom{7}{3}(-5)^4+7\cdot 6\cdot (-5)^5=-109375$$

-
I don't see what this adds to joriki's answer. – Ross Millikan Sep 22 '12 at 4:00
@RossMillikan I used the binomial theorem, not the multinomial theorem. – i. m. soloveichik Sep 22 '12 at 15:09
This approach doesn't appeal to me (I'm not saying it is bad, though). I feel like the use of $(x^2+x)$ rather than $(x-5)$ is more natural, but that is highly a matter of opinion. The way you've presented it seems to simplify the problem moderately but not nearly as much as the use of $(x^2+x)$ would. Nonetheless, I don't see what the downvotes are for. This is a unique answer and, while it doesn't appeal to me, it clearly appealed to you and may appeal to others. – 000 Sep 22 '12 at 23:36