(x+y+z)^3 = (x+y+z)(x+y+z)(x+y+z)(x+y+z)3=(x+y+z)(x+y+z)(x+y+z)
The coefficient of x^3x3 in the product is the number of ways of choosing a term from each of the trinomials so their product is x^3x3. This can only be done one way, by choosing xx from each of the three trinomials. So the coefficient of x^3x3 is 11. By symmetry, the coefficients of y^3y3 and z^3z3 are also 11.
The coefficient of x^2yx2y in the product is the number of ways of choosing a term from each of the trinomials so their product is x^2yx2y. We can choose one of the 33 trinomials to take yy from, then choose xx from the other two trinomials. This can be done in 33 ways, so the coefficient of x^2yx2y in the product is 33. By symmetry, 33 is also the coefficient of y^2zy2z, z^2xz2x, x^2zx2z, y^2xy2x and zx^2zx2.
The coefficient of xyzxyz in the product is the number of ways of choosing a term from each of the trinomials so their product is xyzxyz. There are 33 ways to choose a trinomial to take xx from. Then there are 22 remaining trinomials to pick yy from. That leaves one trinomial to take zz from. So the number of ways of forming xyzxyz is 3xx2xx1 = 63×2×1=6.
So
(x+y+z)^3 = x^3+y^3+z^3+3x^2y+3y^2z+3z^2x+3x^2z+3y^2x+3z^2y+6xyz(x+y+z)3=x3+y3+z3+3x2y+3y2z+3z2x+3x2z+3y2x+3z2y+6xyz
Now let z=1z=1 to get:
(x+(y+1))^3 = x^3+y^3+1+3x^2y+3y^2+3x+3x^2+3y^2x+3y+6xy(x+(y+1))3=x3+y3+1+3x2y+3y2+3x+3x2+3y2x+3y+6xy