# quickest way of determining the the coefficient of any term of a binomial expansion

What are the coefficients of $$x^4$$ and $$x^5$$ of this binomial $$(1+x)\left(1-\frac x2\right)^8$$? and also share the quickest way of solving this type of math (without expanding it fully if possible)!

New contributor
iam irfan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Unclear what you are asking. Please clarify by editing your post to :  Express the Math with MathJax.  Explain what you intend by the phrase middle term. If, for example, you intend the coefficient that corresponds to $x^r$, for some $r \in \Bbb{Z_{\geq 0}}$, then please explain which value of $r$ that you are interested in. May 13 at 22:00
• @user2661923 Middle term(s): When you expand this $\left(1-\frac x2\right)^8$ then you will get a total of 9 terms and then if you multiply those 9 terms with $(1+x)$ then in the first line we will get total 18 terms but if we take some common like $x$, $x^2$ then $x3$ and so on then in the next line we will get a total of 10 terms!! so, the middle terms of these terms, arranged in ascending order of the power, will be $\frac n2$ and $\frac {n+2}2$ $th$ terms where $n$ is the number of total terms and $n$ is an even number! in this case the middle terms will be $5th$ and $6th$ terms. May 14 at 4:48
• Because of the simplicity involved in the factor $(1 + x)$, you can follow the basic Pascal's Triangle rule. All that you have to do is take the expression $$(a + b)^8 ~: ~a = 1, ~b = -(1/2),$$ and perform binomial expansion to compute the coefficients for $x^3, x^4, x^5.$ Denote these coefficients as $C_3, C_4, C_5,$ respectively. Then, because of the simplicity of the $(1 + x)$ factor, the overall coefficients to $x^4, x^5$ will be $(C_3 + C_4)$ and $(C_4 + C_5)$ respectively. May 14 at 4:57