Square of sum and difference:
(a±b)2=a2±2ab+b2
Let's see how to derive it.
Recall, that exponent is just repeating multiplication.
Thus, we can write that (a+b)2=(a+b)(a+b).
Now, apply FOIL: (a+b)(a+b)=a⋅a+a⋅b+b⋅a+b⋅b=a2+2ab+b2.
Similarly, it can be shown, that (a−b)2=a2−2ab+b2.
Or, more shortly: (a±b)2=a2±2ab+b2.
Geometrically (a+b)2 represents an area of the square with side a+b.
But, as shown on picture, this square consist of four smaller squares with areas a2, ab, ab, b2.
Thus, (a+b)2=a2+ab+ab+b2=a2+2ab+b2.
Example 1. Multiply (2x+3y)2.
Here a=2x and b=3y.
Just use above formula: (2x+3y)2=(2x)2+2⋅(2x)⋅(3y)+(3y)2=4x2+12xy+9y2.
Let's see how to handle minus sign.
Example 2. Multiply (38ab−3cd)2.
Here a=38ab and b=3cd.
Now, use formula for difference: (38ab−3cd)2=(38ab)2−2⋅(38ab)⋅(3cd)+(3cd)2=964a2b2−16abcd+9c2d2.
Finally, let's do a slightly harder example.
Example 3. Multiply the following: (−xyz−5x2)2.
Till now, we didn't see two minus signs, but this case can be handled easily.
There are two options:
- a=−xyz and b=−5x2; apply sum formula.
- a=−xyz and b=5x2; apply difference formula.
I choose second option: (−xyz−5x2)2=(−xyz)2−2⋅(−xyz)⋅(5x2)+(5x2)2=x2y2z2+10x3yz+25x4.
From last example we see, that (−a−b)2=(a+b)2.
Another nice application of square of sum formula is to calculate square of a number. In many cases you can perform calculations mentally without calculator (or pen and paper).
Example 4. Calculate 242.
We could use calculator or multiply vertically, but there is simpler way.
We know, that 202=400.
Thus, 242=(20+4)2=202+2⋅20⋅4+42=400+160+16=576.
Alternatively 242=(30−6)2=302−2⋅30⋅6+62=900−360+36=576.
Note, that this method is not always the simplest.
Now, it is time to exercise.
Exercise 1. Multiply (5z+3y)2.
Answer: 25z2+30zy+9y2.
Exercise 2. Multiply (−31xy2+2x)2.
Answer: 91x2y4−34x2y2+4x2.
Hint: either swap summands ((−31xy2+2x)2=(2x−31xy2)2: commutative property of addition) or proceed as always.
Exercise 3. Multiply the following: (−3x−2)2.
Answer: 9x2+12x+4.
Exercise 4. Calculate 312 using square of sum/difference formula.
Answer: 961. Hint: 312=(30+1)2 or 312=(40−9)2 (however, first option is easier).