2

Is there a way to expand three binomials in one go; i.e. without first expanding two of them, then multiplying by the last one.

so expanding:

(x+2)(x+3)(x+1)

without first having to expand to this:

(x²+5x+6)(x+1)

My aim is to find a method that works for easily multiplying many binomials, e.g. expanding:

(x+2)(x+3)(x+1)(x-9)(x-7)
hegash
  • 181
  • 1
    In general? It might not be as clean as you like... For the specific case of looking at the coefficients of $x(x+1)(x+2)(x+3)\cdots (x+n-1)$, yes. These coefficients will be the unsigned stirling numbers of the first kind, the coefficient of $x^k$ in the expansion of the above being notated $\begin{bmatrix}n\k\end{bmatrix}$. Similarly, the coefficient of $x^k$ in the expansion of $x(x-1)(x-2)(x-3)\cdots (x-n+1)$ is the (signed) stirling number of the first kind, commonly notated $s(n,k)$ – JMoravitz Oct 02 '19 at 17:45
  • The coefficients of the final result are the elementary symmetric polynomials in the roots (with signs correctly adapted). Vieta. For instance, $(x-1)(x-2)(x-3)$ is $x^3-ax^2+bx-c$, where $a$ is the sum of the roots $1,2,3$, so $a=1+2+3=6$, $c$ is their product, $c=1\cdot 2\cdot 3=6$, and $b$ is "slightly more complicated", is the sum of all products of two roots, so $1\cdot 2+ 1\cdot 3+2\cdot 3=11$. Is this what you want?! – dan_fulea Oct 02 '19 at 17:46
  • In theory it would be possible to do it in one go, but I suspect that doing it two at a time would be easier and less likely to have errors. – herb steinberg Oct 02 '19 at 17:46

1 Answers1

3

You may take advantage of the structure of polynomials. Let $$P=(x-a_1)(x-a_2)(x-a_3){\cdots}(x-a_{n-1})(x-a_n)$$ be a polynomial, whose roots are $a_1, a_2, a_3,{\dots},a_{n-1}, a_n$.

The expanded polynomial is given by $$P={\sum_{m=0}^n}(-1)^mx^{n-m}k_m$$ where $k_m$ is the sum of roots taken $m$ at a time.
For simplicity, let's take $P=(x-a)(x-b)(x-c)(x-d)$. Then: $$P=x^4-x^3(a+b+c+d)+x^2(ab+ac+ad+bc+bd+cd) -x(abc+bcd+cda+dab)+(abcd)$$

Sam
  • 2,447