Understanding how to use the binomial theorem to expand $(x+y)^3$

The binomial theorem states that:

$$(x+y)^n = \sum_{k=0}^n x^ky^{n-k}$$

Expand $(x+y)^3$:

Here we are given $n=3$ and since the binomial starts at $k=0$, it suffices to say that we are expanding from $k=0$ to $k=3$:

$${3 \choose 0} x^0y^3 + {3 \choose 1} x^1y^2 + {3 \choose 2} x^2y^1 + {3 \choose 3} x^3y^0$$

equates to: $y^3+xy^2+x^2y+x^3$

I don't understand how the equation that I used was supposed to give me this: $$y^3+3xy^2+3x^2y+x^3$$

$n$s and $k$s are only in the exponents. I don't understand why and where the $3$ comes from as a coefficient in the two middle terms!? I know the book says that with ${n \choose k}$, $n$ and $k$ can be thought of as binomial coefficients but I cannot seem to make the connection.

What would $(x+y)^4$ look like? Would it have only $4$'s in as coefficients in the middle terms?

• The problem is that you’ve misstated the binomial theorem: the correct statement is that $$(x+y)^n=\sum_{k=0}^n\binom{n}kx^ky^{n-k}\;.$$ Dec 19 '16 at 19:15
• You are computing your coefficients wrong. Check out what your binomial coefficients are supposed to be. Dec 19 '16 at 19:25
• An edit by Derek Ehle changed the original $$(x+y)^n = \sum_{k=0}^n x^k y^{n-k}$$ in this posting, not to $$(x+y)^n = \sum_{k=0}^n \binom n k x^ky^{n-k},$$ which would have made the question incomprehensible, but to $$(x+y)^n = \sum_{k=0}^n (^n_k) x^ky^{n-k},$$ with the notation (^n_k), which also makes it incompehensible.That required approval and approved it. Whoever approved it should have paid attention instead. The incorrect statement of the binomial theorem is essential to understanding the question, and approving that sort of code is questionable even when $\binom n k$ should appear. Dec 19 '16 at 19:34
• @Michael Hardy So, for future reference, what exactly did I mess up? I may have stated the theorem wrong but what's the issue with the notation? Dec 20 '16 at 23:17
• @DerekEhle : In the first place, the original poster stated the binomial theorem incorrectly, and your edit made it unclear that he had not correctly understood the theorem. The other problem was your strange way of coding the binomial coefficient, writing (^n_k) rather than \binom n k or {n\choose k}. Dec 20 '16 at 23:57

The coefficients come from "N choose K," written as $(^n_k)$ - the first component of the binomial theorem's summation. While you wrote out the problem correctly, you forgot to perform this operation.

For $(^3_0)$, there is one way in which we can select zero elements from a set of three. For $(^3_1)$, there are three ways in which we can select one element from a set of three. For $(^3_2)$ and $(^3_3)$, there are three ways and one way, respectively, for selecting K elements from a set of size N.

Expanding $(x + y)^4$ would not result in four's for the coefficients on the middle terms. You would have to perform the operation I described above. Alternatively, you can use Pascal's Triangle: a triangular arrangement of numbers that represents the coefficient of each term in a binomial expansion.

• Thank you your explanation made perfect sense and I feel confident that I can now properly compute $(x+y)^n$ Dec 19 '16 at 19:45

You can use this to calculate coefficients.

$$\begin{array}{lcccccccccccccccccccc} \text{row } 0 \rightarrow & & & & & & & 1 \\ \text{row } 1 \rightarrow & & & & & & 1 & & 1 \\ \text{row } 2 \rightarrow & & & & & 1 & & 2 & & 1 \\ \text{row } 3 \rightarrow & & & & 1 & & 3 & & 3 & & 1 \\ \text{row } 4 \rightarrow & & & 1 & & 4 & & 6 & & 4 & & 1 \\ \text{row } 5 \rightarrow & & 1 & & 5 & & 10 & & 10 & & 5 & & 1 \\ \text{row } 6 \rightarrow & 1 & & 6 & & 15 & & 20 & & 15 & & 6 & & 1 \\ & \uparrow & & \uparrow & & \uparrow & & \uparrow & & \uparrow & & \uparrow & & \uparrow \\[4pt] & \dbinom 6 0 & & \dbinom 6 1 & & \dbinom 6 2 & & \dbinom 6 3 & & \dbinom 6 4 & & \dbinom 6 5 & & \dbinom 6 6 \\ {} \end{array}$$

$$\text{So } (x+y)^6 = x^6 + 6x^5 y + 15 x^4 y^2 + 20 x^3 y^3 + 15 x^2 y^4 + 6 xy^5 + y^6.$$