To find formal products in given expressions For each of the following expressions, list the list of all formal products in which exponents sum to 4.
(a)$(1+x+x^{2})^{2} (1+x)^{2}$
(b) $(1+x+x^{2}+x^{3}+x^{4})^{3}$
(c)$(1+x^{2}+x^{4})^{2} (1+x+x^{2})^{2}$
(d)$(1+x+x^{2}+x^{3}+...)$
The answers are
. (a) 7 products—$xxxx$,$x^{3}11x$, $x^{3}1x1$,$x^{3}x11$, $1x ^{3}1x$, $1x^{ 3}x1$, $xx^ {3}11$,
(b) 5 products—$1x ^{4}$, $xx^{ 3}$, $x^{ 2}x^{ 2}$, $x ^{3}x$, $x ^{4}$,
(c) 7 products
(d) 15 products—$x ^{4}11$,$ x^{ 3}x1$, $x^{ 3}1x$, $x ^{2}x^{ 2}1$, $x ^{2}xx$, $x ^{2}1x^{ 2}$,$ xx ^{3}1$, $xx ^{2}x$, $xxx ^{2}$,$x^{1}x ^{3}$, $1x^{ 4}1$, $1x ^{3}x$, $1x ^{2}x^{ 2}$,$ 1xx ^{3}$, $11x^{ 4}$
But I need the method to find formal products as I just know if $i$th polynomial factor contains $r_{i}$ different terms and there are n factors then there will be $r_1×r_2×...r_n$ formal products. 
Please help

Assuming that a "formal product" is an unsimplified term in the expanded product, then here is how one should reason about (a).
The expression in (a) is $(1 + x + x^2)(1 + x + x^2)(1 + x)(1 + x)$. A formal product is formed by picking a single term from each factor and then multiplying these terms together. For example $1 \cdot 1 \cdot 1 \cdot 1$ is the formal product formed by choosing $1$ from each factor. We would like to write down all of the formal products with exponents summing to $4$. There are $3$ choices for the first factor. Namely, $1$, $x$, or $x^2$.


*

*If we choose $1$ from the first factor then we $\textit{must}$ choose $x^2$ from the second factor and $x$ from the third and fourth factors. All other choices result in an exponent sum less than $4$. Thus, one of the formal products we seek is $1\cdot x^2\cdot x \cdot x$.

*If we choose $x$ from the first factor then we must either choose $x$ or $x^2$ from the second, otherwise we can't get a high enough exponent. Choosing $x$ from the second means we also need $x$ from the third and fourth. Choosing $x^2$ from the second means we need $1$ from the third and $x$ from the fourth, or vice versa. This gives us three more formal products: $x\cdot x \cdot x \cdot x$ and $x \cdot x^2 \cdot 1 \cdot x$ and $x \cdot x^2 \cdot x \cdot 1$.

*If we choose $x^2$ from the first factor then we are free to choose anything from the second. Choosing $1$ means that we need $x$ from the third and fourth. Choosing $x$ means we need $1$ from the third and $x$ from the fourth, or vice versa. Finally, choosing $x^2$ means we need $1$ from the third and fourth. This gives us four more formal products: $x^2\cdot 1 \cdot x \cdot x$ and $x^2 \cdot x \cdot 1 \cdot x$ and $x^2 \cdot x \cdot x \cdot 1$ and $x^2 \cdot x^2 \cdot 1 \cdot 1$.
So, there are $8$ formal products with exponents summing to $4$ in (a). The others can be done in a similar fashion.
