# How to expand $(x_1 + x_2 + x_3 + x_4 + x_5 +\cdots+x_n)^{2}$

How to expand

$(x_1 + x_2 + x_3 + x_4 + x_5 +\cdots+x_n)^{2}$. Is their any general formula for this? Thanks

• Have you ever heard about the multinomial formula? Aug 16, 2015 at 6:17
• @tetori No i haven't Aug 16, 2015 at 6:26
• That is the generalization you might want. Aug 16, 2015 at 6:28
• Here's a link to a general solution en.wikipedia.org/wiki/Multinomial_theorem Feb 2, 2017 at 8:50

$$\left( \sum_{i=1}^n x_i \right)^2 = \sum_{i=1}^n \sum_{j=1}^n x_i x_j = \sum_{i=1}^n x_i{}^2 + 2 \sum_{1 \leq i < j \leq n} x_i x_j.$$

A particular example is: $$(a+b)^2 = a^2 + 2ab + b^2.$$

Yes, there is. $$(x_1+x_2+x_3+\cdots+x_n)^2=\\ x_1^2+x_1x_2+x_1x_3+\cdots+x_1x_n+ \\ x_2x_1+x_2^2+x_2x_3+\cdots+x_2x_n+ \\ x_3x_1+x_3x_2+x_3^2+\cdots+x_3x_n+ \\ \cdots \\ x_nx_1+x_nx_2+x_nx_3+\cdots+x_n^2$$

• So it is just square of specific term and its product with other terms Aug 16, 2015 at 6:32
• Yes, basically. When there are say three terms, I usually write the squares before the other terms, like $(a+b+c)^2=a^2+b^2+c^2+2ab+2ac+2bc$. Aug 16, 2015 at 6:34
• thanks. i came upon this while studying Graeff's root squaring method Aug 16, 2015 at 6:36

$$if\quad \quad { x }_{ 2 }-{ x }_{ 1 }=0\quad ,{ x }_{ 3 }-{ x }_{ 2 }=0,.......\quad etc\quad you\quad can\quad use\quad this\quad formula\quad \sum _{ i\quad =1 }^{ n }{ { i }^{ 3 } } =\quad { \left( \frac { n(n+1) }{ 2 } \right) }^{ 2 }\quad ,\quad n\quad ={ \quad x }_{ n }\\ Note*:\quad { \left( { x }_{ 1 }{ +x }_{ 2 }+{ x }_{ 3 }+....+{ x }_{ n } \right) }^{ 2 }\quad =\quad { { x }_{ 1 } }^{ 2 }+{ { x }_{ 2 } }^{ 2 }+{ { x }_{ 3 } }^{ 2 }+.....+{ { x }_{ n } }^{ 2 }+\\ \quad \quad \quad \quad \quad \quad \quad 2\left[ { x }_{ 1 }({ x }_{ 2 }+{ x }_{ 3 }+.......+{ x }_{ n })+{ x }_{ 2 }({ x }_{ 3 }+.......+{ x }_{ n })+...................+{ x }_{ n-1 }({ x }_{ n }) \right]$$

• Combining text with math is often not the best thing to do, but if you have to, you can use the \text command. For example: $\text{if }x_2-x_1=0, x_3-x_2=0, \dots\text{ etc., you can use this formula }\sum\limits_{i=1}^n i^3=$ which is typeset as $\text{if }x_2-x_1=0, x_3-x_2=0, \dots\text{ etc., you can use this formula }\sum\limits_{i=1}^n i^3=$. Aug 16, 2015 at 8:59
• Thanks alot Mr.Martin Sleziak Aug 16, 2015 at 9:04
• I should probably add also link to this post on meta: How can I text in between “dollar signs” on MSE. Aug 16, 2015 at 9:10
• I think that's very important Aug 16, 2015 at 9:14

You can think of the expression inside the square to be a simple $n$ dimensional polynomial. Squaring a polynomial is the same as convolving it's coefficients with itself.