1

Is there an easy way to expand something like (x + x^2 + x^3)^6 ?

Thanks in advance!

rawrPanda
  • 119
  • study binomial theorem ! – abkds Dec 10 '13 at 04:02
  • As far as I know binomial theorem only works with, well, expanding binomials. I know there's something similar for trinomials but it involves finding all the possible combinations for a specific term, which gets a bit tricky. I was wondering if there's a systematic way of getting that part. – rawrPanda Dec 10 '13 at 04:06
  • There usually isn't an "easy way" of doing anything; we're very lucky if we can find something for the general case (see: the irreducibility of quintic polynomials over the radicals, hence a quintic formula doesn't exist). But there is a formula that's a natural extension of the binomial one: http://en.wikipedia.org/wiki/Multinomial_theorem – Lost Dec 10 '13 at 04:24

2 Answers2

2

My approach avoids multinomials:

Let's play with it a bit: $$\begin{align} (x+x^2+x^3)^6 &= x^6(1+x+x^2)^6\\ &= x^6\frac{((1-x)(1+x+x^2))^6}{(1-x)^6}\\ &= \frac{x^6(1-x^3)^6}{(1-x)^6} \\ \end{align}$$ The numerator and denominator can now be expanded with the binomial theorem, and then long division will simplify the expression. (This is the way I would do it.)

Another approach: $$\begin{align} (x+x^2+x^3)^6 &= (x+(x^2+x^3))^6 \\ &= x^6+6x^5(x^2+x^3) + 15x^4(x^2+x^3)^2 \\ & +\, 20x^3(x^2+x^3)^3 + 15x^2(x^2+x^3)^4 + 6x(x^2+x^3)^5 + (x^2+x^3)^6 \end{align}$$

Now, each of the binomials can be expanded as above.

apnorton
  • 17,706
0

There is a very compact solution for expanding an all-ones polynomial with no constant term presented here, demonstrated with SymPy/Python below:

>>> from sympy import binomial
>>> Limits = lambda i,j: range(i,j+1)  # to give values i-j
>>> list(Limits(1,3))
>>> [1, 2, 3]

>>> k=3 # for x + x2 + x3 >>> n=6 >>> [sum((-1)*ibinomial(n,i)binomial(r-ik-1,n-1) ... for i in Limits(0,(r-n)//k)) for r in Limits(n,k*n)] [1, 6, 21, 50, 90, 126, 141, 126, 90, 50, 21, 6, 1]

In your case having row 6 and diagonal 5 (down through row 13) of Pascal's triangle will help with the binomials.

smichr
  • 359