number of terms in the expansion containing powers of $x$ How do i find the number of terms containing powers of $x$ in the expansion of: $$(1+x)^{100}(1+x^2-x)^{101}$$


I tried using $(1+x)((1+x(1+(x)^2-x))^{100})$ which simplified into : $$(1+x)(1+x^3)^{100}$$
but i'm not sure if this is the correct approach and also what do i do to simplify it further to get the answer?

It's a multiple choice question with options A:202, B:302, C:301 and D:101
please explain the method to solve questions of this type :)
There are 101 terms in the first factor, of which 100 have a power of $x$ greater than 0. The second factor can be written:

$$
\sum_{k_1 + k_2 + k_3 = 101} 1^{k_1} \cdot x^{2 k_2} \cdot x^{k_3}
$$

(just imagine the product multiplied out) so you are asking how many sets of (k_1, k_2, k_3), all integers at least 0, are such that $k_1 + k_2 + k_3 = 101$ with $k_1 &lt; 101$ (that one gives the term 1, there is just one of those).

Let's find out how many solutions $k_1 + k_2 + k_3 = 101$ has, this is like chopping a line of 101 $*$ into three pieces, say by separating with $|$ (this is called a stars and bars argument, for obvious reasons). But then you have a total of $101 + 2$ positions to be filled with 101 stars and 2 bars, that can be done in $\binom{101 + 2}{2} = 5253$ ways, of which you subtract 1 for $k_1 = 101$.

Combining your factors, you have 101 terms in the first factor, $5252$ with $x$ from the second, and the terms with $x$ in the product are the result of multiplying any term from the first factor with a term containing $x$ from the second, i.e., $101 \cdot 5252 = 53042$ (as long as no simpolifications happen).

A lower bound is that the result is a polynomial of degree $100 + 2 \cdot 101 = 302$, so there are at most $301$ terms with powers of $x$. But there are negative terms, so cancellation can/will happen, and you get less.
there are no 301 terms present. The 1st person and 2nd gave the same answer. But your analogies are wrong anyway. Aand your simplication is perfect Mr.Krazkat. Actually you have got (1+x)(1+x^3)^100 right. The binomial expansion gives 101 terms for (1+x^3)^100 and these 101 terms are multiplied by 1 and x and you get a result like this- (1+X)('101 terms'). So, after multiplying 101 terms with '1', you get 101 terms and after multiplying with x you will get another 101 terms like this- (1+x)('101 terms')=1('101 terms')+x('101 terms'). So there will be no cancellations because all the powers of x will be different. So there are total 101+101=202 terms.