Suppose we have the polynomial $f(x)$ and another polynomial $g(x)$. How can I find the coefficient of say $x^n$ in the product of the polynomials without actually multiplying. I am not that experienced with $n$ choose $k$. You can take specific polynomials, I'm just trying to understand and gain more math skills. Thanks.
$\endgroup$ 52 Answers
$\begingroup$If $f(x)=\sum f_ix^i$ and $g(x)=\sum g_jx^j$ then the coefficient of $x^n$ in $f(x)g(x)$ is $$\sum_{i+j=n} f_ig_j$$.
For example: Take $$f(x)=3x^{30}+21x+7\;\;\;\&\;\;\;g(x)=2x^{21}+27x^2+3$$
Thus $f_{30}=3, \;f_1=21,\;f_0=7$ and $g_{21}=2,\;g_2=27,\;g_0=3$ and all other $f_i,g_j=0$.
let us denote $h(x)=f(x)g(x)=\sum h_kx^k$. Let's compute some of the coefficients $h_k$.
$h_0$ is easy. the only way to write $0$ as the sum of two non-negtive numbers is $0=0+0$ so $h_0=f_0\times g_0=\fbox {21}$
$h_1$: Well we see that $h_1=f_1\times g_0+f_0\times g_1=21\times 3+7\times 0=\fbox {63}$
$h_{21}=f_0\times g_{21}=7\times 2 =\fbox {14}$ Where we have not written out all the terms which vanish because one factor (or both) are $0$.
$h_{51}=f_{30}\times g_{21}=3\times 2=\fbox {6}$
And so on.
Note: this is a fairly simple example because there are so few non-zero terms. It is not difficult to do this particular multiplication completely. The product is $$h(x)=6x^{51}+81x^{32}+9x^{30}+42x^{22}+14x^{21}+567x^3+189x^2+63x+21$$
$\endgroup$ 0 $\begingroup$$$\begin{cases}f(x)=a_nx^n+a_{n-1}x^{n-1}+....+a_1x+a_0\\g(x)=b_mx^m+b_{m-1}x^{m-1}+....+b_1x+b_0\end{cases}$$
$$f(x)g(x)=\sum_{k=0}^{m+n}c_kx^k$$ and $$c_k=\sum_{i+j=k}a_ib_j$$
See the coefficients $c_0$ and $c_1$ and $c_2$. It is easy to verify
$\endgroup$