# How to find a general term of a trinomial?

I want to find the coefficient of $$x^0$$ in the expansion of $$(x + 1 + 1/x)^4$$.

Without an expansion, I keep getting "nested binomial" terms if I group two terms together:

$$\binom{4}{k}\binom{k}{m} (x)^{k-m}(1/x)^{m}$$

For which $$k-2m = 0$$. I cannot solve further without guessing and checking a value. What is a better way?

• Is expansion allowed? – Jitendra Singh Jun 20 at 12:34
• i would like to avoid that. is that the only method – user71207 Jun 20 at 12:38
• $k$ is even, so for $k=0,2,4$, you have $m=0,1,2$ respectively. – mathlove Jun 20 at 12:48
• The above statement is equivalent to finding the coefficient of $x^4$ in the expansion of $(x^2+x+1)^4$, this is equivalent to finding the number of solutions to $a+b+c+d=4$ where $a,b,c,d\in \{0,1,2\}$. This is relatively easier to do by hand for small powers like $4$. – Asher2211 Jun 20 at 12:53

One approach is to multiply by $$x^4$$ and then find the coefficient of $$x^4$$ in the result.

Notation: $$[x^n]f(x)$$ denotes the coefficient of $$x^n$$ in $$f(x)$$. Then

\begin{align} [x^0](x+1+1/x)^4 &= [x^4]x^4 (x+1+1/x)^4 \\ &=[x^4](x^2+x+1)^4 \\ &=[x^4] \left( \frac{1-x^3}{1-x} \right)^4 \\ &=[x^4](1-x^3)^4 \;(1-x)^{-4} \\ &=[x^4](1 -4x^3 +O(x^6)) \sum_{i=0}^{\infty} \binom{4+i-1}{i} x^i \tag{*} \\ &= \binom{4+4-1}{4} - 4 \binom{4+1-1}{1} \\ &= 19 \end{align} where at $$(*)$$ we have used the Binomial Theorem for negative exponents.

• Ahh interesting, I like this – user71207 Jun 20 at 13:12
• Also thanks for the notation; I haven't seen it before and it seems very convenient. Is this a well-known notation that I can use whenever (without defining)? – user71207 Jun 20 at 13:15
• @user71207 The notation is quite common, but I usually define it in case it may be new to a reader. It's called the "coefficient of" operator. One source says the notation was first introduced in Combinatorial Enumeration by Goulden and Jackson (1983). – awkward Jun 20 at 13:26
• @awkward Wow what a wonderful answer. I definitely would say your answer is 10 times better than my answer. Have a upvote from me – Jitendra Singh Jun 22 at 4:43

I am not sure if this is actually a better way but it is probably a much clearer approach.

Case 1: You take no $$x$$ from either of the brackets, so you cannot take $$1/x$$ from any of the brackets too. $$C_1 = \binom{4}{0}\binom{4}{0} = 1$$

Case 2: You take one $$x$$ from one of the brackets, so you need to take $$1/x$$ from the remaining brackets and the rest should be $$1$$. $$C_2 = \binom{4}{1}\binom{3}{1} = 12$$

Case 3: You take two $$x$$ from two of the brackets, so you need the remaining ones to be $$1/x$$. $$C_3 = \binom{4}{2}\binom{2}{2} = 6$$

Final answer: $$19$$

• why does it stop at taking two $x$? Where does the $4$ come from in $\binom{4}{0}$ etc. – user71207 Jun 20 at 14:09
• @user71207 : The "$4$" is the power to which the trinomial is raised. Every term in that power involves four choices of term, one from each copy of the trinomial in the power. Notice that if you want the degree of the product of those four terms to be zero, then every use of the term "$x$" necessitates a use of the term "$1/x$". Hence, choosing two "$x$"s forces all four terms. The power $4$ is too low to choose three "$x$"s and three "$1/x$"s. – Eric Towers Jun 20 at 22:54

Remember this method can be explaineed by expansion but doesn't really need expansion:

$$\left(a+b+c\right)^4:\quad a^4+4a^3b+4a^3c+6a^2b^2+6a^2c^2+12a^2bc+4ab^3+4ac^3+12abc^2+12ab^2c+ b^4+c^4+4bc^3+6b^2c^2+4b^3c$$

or

$$a^4+b^4+c^4=$$

Now you need not expand it. Just use logic.

$$6a^2c^2+12ab^2c$$ will only result in coefficient having $$a^0$$. Basicly focus on the terms having $$a$$ and $$c$$ with same power. Did you understood this?

Consider

$$(x + 1 + 1/x)^4=\frac{(x^2+x+1)^4}{x^4}$$ then we want to find the coefficient of $$x^4$$ in the expansion $$(x^2+x+1)^4$$. Note you don't need to do this and can just apply the below method to $$(x + 1 + 1/x)^4$$.

Using the multinomial theorem (in this case it is called the trinomial expansion) we have $$(x_1+x_2+x_3)^n=\sum_{k_1+k_2+k_3=n}\binom{n}{k_1,k_2,k_3}x_1^{k_1}x_2^{k_2}x_3^{k_3}$$

where $$\dbinom{n}{k_1,k_2,k_3} = \dfrac{n!}{k_1! \, k_2! \, k_3!}$$.

Setting $$n=4,x_1=x^2,x_2=x$$ and $$x_3=1$$, we want $$x_1^{k_1}x_2^{k_2}=x^4,$$ which is equivalent to $$2k_1+k_2=4$$, where $$k_1+k_2\leq 4$$ and $$k_1+k_2+k_3=4$$. There's only a few values to check.

Thus the coefficient is $$\dbinom{4}{0,4,0}+\dbinom{4}{1,2,1}+\dbinom{4}{2,0,2}=19.$$

We can also apply the binomial theorem twice in order to derive the cofficient of $$x^0$$. We use the coefficient of operator $$[x^k]$$ to denote the coefficient of $$x^k$$ of a series. This way we can write for instance \begin{align*} [x^k](1+x)^n=\binom{n}{k} \end{align*}

We obtain \begin{align*} \color{blue}{[x^0]}&\color{blue}{\left(\left(x+1\right)+\frac{1}{x}\right)^4}\\ &=[x^0]\sum_{k=0}^4\binom{4}{k}\left(\frac{1}{x}\right)^k(x+1)^{4-k}\tag{1}\\ &=\sum_{k=0}^4\binom{4}{k}[x^k](x+1)^{4-k}\tag{2}\\ &=\sum_{k=0}^4\binom{4}{k}\binom{4-k}{k}\tag{3}\\ &=\binom{4}{0}\binom{4}{0}+\binom{4}{1}\binom{3}{1}+\binom{4}{2}\binom{2}{2}\tag{4}\\ &=1\cdot 1+4\cdot 3+6\cdot 1\\ &\,\,\color{blue}{=19} \end{align*} Note that we do not need any guessing in order derive the wanted coefficient.

Comment:

• In (1) we apply the binomial theorem the first time.

• In (2) we use the rule $$[x^p]x^qA(x)=[x^{p-q}]A(x)$$.

• In (3) we select the coefficient of $$x^k$$ by applying the binomial theorem a second time.

• In (4) we write the terms of the sum explicitely noting that $$\binom{4-k}{k}=0$$ for $$k=3,4$$.