Solution:
Concept: The square of three terms: (a+b+c)2=a2+b2+c2+2ab+2bc+2ca, that is, every term squared plus twice the product of every pair. A term with a minus sign keeps its sign inside each product.
Step 1 — Part (i).
The three terms are x, y and −z. We square each and add twice the product of each pair.
(x+y−z)2=x2+y2+(−z)2+2(x)(y)+2(y)(−z)+2(−z)(x)=x2+y2+z2+2xy−2yz−2zx
Step 2 — Part (ii).
The three terms are x, −2y and 2, so every pair product that contains −2y is negative.
(x−2y+2)2=x2+(−2y)2+22+2(x)(−2y)+2(−2y)(2)+2(2)(x)=x2+4y2+4−4xy−8y+4x
Step 3 — Part (iii).
The three terms are 5a, −3b and c, so the two pair products that contain −3b are negative.
(5a−3b+c)2=(5a)2+(−3b)2+c2+2(5a)(−3b)+2(−3b)(c)+2(c)(5a)=25a2+9b2+c2−30ab−6bc+10ca
Step 4 — Part (iv).
The three terms are 5x, −3y and −2. The product of the two negative terms is positive.
(5x−3y−2)2=(5x)2+(−3y)2+(−2)2+2(5x)(−3y)+2(−3y)(−2)+2(−2)(5x)=25x2+9y2+4−30xy+12y−20x
Step 5 — Part (v).
The three terms are x, −x1 and 5. The product 2⋅x⋅(−x1) is just −2, which joins the 25.
(x−x1+5)2=x2+x21+25+2(x)(−x1)+2(−x1)(5)+2(5)(x)=x2+x21+25−2−x10+10x=x2+x21+23−x10+10x
Watch out: Every squared term is added, but each pair product takes the signs of both its terms.
Therefore, (i) x2+y2+z2+2xy−2yz−2zx; (ii) x2+4y2+4−4xy−8y+4x; (iii) 25a2+9b2+c2−30ab−6bc+10ca; (iv) 25x2+9y2+4−30xy+12y−20x; (v) x2+x21+23−x10+10x.