# Sum of Coefficients in a Polynomial

Find the sum of the coefficients of the terms in the expansion of $(2x+3y-3z)^7$.

I know how to do this for binomials, but I was not able to apply the same logic to a trinomial.

I believe my other method is faulty, but here it is: $2+3-3 = 2$, and $2^7 = 128$, which is the sum of the coefficients.

Please tell me if there is a basic method that can be used to solve this problem in a general case and if my method is correct/faulty.

• What precisely is your method, and why do you believe it doesn't extend to trinomials? – Gone Dec 20 '14 at 20:11

Set $$x = y = z = 1$$ With these values the expansion is the sum of the coefficient.

• Isn't this exactly what the OP did in his third paragraph? You get some credit for clarifying what he did, but you would get more if you explain that you are referring to what he did, state what he did is not faulty, and explain why. – Rory Daulton Dec 20 '14 at 20:56
• @RoryDaulton: I didn't read what the OP wrote in the third paragraph, I simply wrote an answer – WLOG Dec 20 '14 at 21:38
• In that case, you deserve more credit than I thought. Good work! +1 You still may want to clarify. – Rory Daulton Dec 20 '14 at 21:39
• I did not know what I was doing when I did that problem, but I still got it right somehow using that method. WLOG clarifies why it works. – vamaddur Dec 21 '14 at 21:39


Find the sum of the coefficients of the terms in the expansion of $\ds{\pars{2x + 3y - 3z}^{7}:\ {\large ?}}$

\begin{align}&\color{#66f}{\large% \sum_{a\ =\ 0}^{\infty}\sum_{b\ =\ 0}^{\infty}\sum_{c\ =\ 0}^{\infty} {7! \over a!\, b!\, c!}2^{a}3^{b}\pars{-3}^{c}\delta_{a + b + c,7}} \\[5mm]&=7!\sum_{a\ =\ 0}^{\infty}\sum_{b\ =\ 0}^{\infty}\sum_{c\ =\ 0}^{\infty} {2^{a} \over a!}\,{3^{b} \over b!}\,{\pars{-3}^{c} \over c!}\oint_{\verts{z}\ =\ 1} {1 \over z^{-a - b - c + 8}}\,{\dd z \over 2\pi\ic} \\[5mm]&=7!\oint_{\verts{z}\ =\ 1} {1 \over z^{8}}\sum_{a\ =\ 0}^{\infty}{\pars{2z}^{a} \over a!} \sum_{b\ =\ 0}^{\infty}{\pars{3z}^{b} \over b!}\sum_{c\ =\ 0}^{\infty}{\pars{-3z}^{c} \over c!}\,{\dd z \over 2\pi\ic} \\[5mm]&=7!\oint_{\verts{z}\ =\ 1} {1 \over z^{8}}\,\expo{2z}\expo{3z}\expo{-3z}\,{\dd z \over 2\pi\ic} =7!\oint_{\verts{z}\ =\ 1}{\expo{2z} \over z^{8}}\,{\dd z \over 2\pi\ic} =7!\sum_{n\ =\ 0}^{\infty}{2^{n} \over n!}\ \overbrace{\oint_{\verts{z}\ =\ 1}{1 \over z^{8 - n}}\,{\dd z \over 2\pi\ic}} ^{\dsc{\delta_{n,7}}} \\[5mm]&=7!\,{2^{7} \over 7!}=2^{7}=\color{#66f}{\Large 128} \end{align}

• you made a mistake evaluating the contour integral of $z^{n-8}$ in your last step; it actually sifts out the $n=7$ term rather than $n=8$; correcting this yields the answer $2^7=128$. – oldrinb Dec 20 '14 at 21:59
• @oldrinb Thanks. In a long calculation 'something is always lost'. I was aware that the OP already gave he answer. – Felix Marin Dec 20 '14 at 22:06

Expanding (pun not intended) on WLOG's answer:

The expression $(2x+3y-3z)^7$ expands to $$(2x+3y-3z)^7 = \sum_{\substack{0 \le i,j,k\\i+j+k=7}} (2x)^i(3y)^j(-3z)^k = \sum_{\substack{0\le i,j,k\\i+j+k=7}}2^i3^j(-3)^kx^iy^jz^k \tag{1}$$

(The notation indicates that we are summing over all combinations of nonnegative integers $i,j,k$ which sum to $7$). Setting $x=y=z=1$ gives us $$\sum_{\substack{0\le i,j,k\\i+j+k=7}}2^i3^j(-3)^k$$ which is exactly the sum of the coefficients. But, on the other hand, by (1), $$\sum_{\substack{0\le i,j,k\\i+j+k=7}}2^i3^j(-3)^k = (2+3-3)^7 = 128$$ as you observed. Thus, the sum of the coefficients of the expansion is $128$. Notice that this method could be extended to an arbitrary number of variables and choice of coefficients: $$(a_1x_1 + \cdots + a_nx_n)^k = (a_1 + \cdots + a_n)^k$$