Difference of two perfect squares:
(a - b)(a + b) = a² - b²
Sum of two perfect cubes:
a³ + b³ = (a + b)(a² - ab + b²)
Difference of two perfect cubes:
a³ - b³ = (a - b)(a² + ab + b²)
Notice that the formulas for the perfect cubes are almost the same, but the signs are different. You can use the SOAP mnemonic to remember the signs.
S = The first sign is always the SAME as the sign between the 2 cubes
O = The second sign is always the OPPOSITE as the sign between the 2 cubes
AP = The last sign is ALWAYS POSITIVE