Notice that when you FOIL an expression of the form \((x+y)(x-y)\) you get \(x^2+xy-xy-y^2\) and the middle two terms cancel out, leaving you with \(x^2-y^2\). This last expression is called a difference of squares.
Differences of squares such as \(x^2-y^2\) always factor as \((x+y)(x-y)\). Notice that in both parentheses the only difference between the two is that in the first one you have a ‘+’ and in the second you have a ‘-‘. This makes factoring differences of squares easy, because all you need to do is determine what \(x\) is, and what \(y\) is.
The hard part, in some cases, is getting an expression to look like a difference of squares via algebraic massage therapy. We explore this in the examples below.
\((x+2)(x-2)\)
Notice that \(x^2-4=x^2-2^2\) which is a difference of squares. Now this can be immediately factored as you see in the final answer.
\((x+1)(x-1)\)
Notice that \(x^2-1=x^2-1^2\) which is a difference of squares. This factors immediately as you see in the final answer.
\((2x+3)(2x-3)\)
Notice that \(4x^2-9=(2x)^2-3^2\) which is a difference of squares that can be factored as you see in the final answer.
\((3x+4y)(3x-4y)\)
Notice \(9x^2-16y^2=(3x)^2-(4y)^2=(3x+4y)(3x-4y)\).
\((x+\sqrt{2})(x-\sqrt{2})\)
Technically, one could write \(x^2-2=x^2-(\sqrt{2})^2\) which is a difference of squares. This can be factored readily as you see it above.
\((\sqrt{2}x+\sqrt{3})(\sqrt{2}x+\sqrt{3})\)
Technically, if you really wanted to factor this puppy, one could notice that \(2x^2-3=((\sqrt{2}x)^2-(\sqrt{3})^2)\) which is a difference of squares.