Sub topic 2
The Three Key Identities: \((a+b)^2\), \((a-b)^2\), and \((a+b)(a-b)\)
Assume you can expand products, combine like terms, and work with integer exponents. An algebraic identity is an equation that is true for every allowed value of its variables. These three identities are useful because they replace several multiplication steps with a pattern.
The three identities
| Product | Identity | Middle term |
|---|---|---|
| Square of a sum | \((a+b)^2=a^2+2ab+b^2\) | \(+2ab\) |
| Square of a difference | \((a-b)^2=a^2-2ab+b^2\) | \(-2ab\) |
| Difference of squares | \((a+b)(a-b)=a^2-b^2\) | No middle term |
The first identity comes from multiplying both factors:
\[ (a+b)^2=(a+b)(a+b)=a^2+ab+ab+b^2=a^2+2ab+b^2. \]
Similarly,
\[ (a-b)^2=(a-b)(a-b)=a^2-ab-ab+b^2=a^2-2ab+b^2. \]
For the third identity, the two middle terms cancel:
\[ (a+b)(a-b)=a^2-ab+ab-b^2=a^2-b^2. \]
Recognizing the patterns
The expressions \(a^2+2ab+b^2\) and \(a^2-2ab+b^2\) are perfect square trinomials. They can be factored back into \((a+b)^2\) and \((a-b)^2\).
For example,
\[ x^2+10x+25=x^2+2(x)(5)+5^2=(x+5)^2. \]
The expression \(a^2-b^2\) is a difference of squares. It factors as
\[ a^2-b^2=(a+b)(a-b). \]
This pattern requires subtraction. An expression such as \(a^2+b^2\) does not factor over the real numbers using this identity.
Fast arithmetic applications
Use a nearby round number as \(a\). For example,
\[ 103^2=(100+3)^2=100^2+2(100)(3)+3^2=10{,}609. \]
For a product of numbers equally distant from a central value, use the difference of squares:
\[ 99\cdot101=(100-1)(100+1)=100^2-1^2=9{,}999. \]
for a, b in [(3, 4), (-2, 5), (7, 7)]:
assert (a + b) ** 2 == a ** 2 + 2 * a * b + b ** 2
assert (a - b) ** 2 == a ** 2 - 2 * a * b + b ** 2
assert (a + b) * (a - b) == a ** 2 - b ** 2
print("identities hold")Exercise
Simplify \((2x-7)^2\).
Show answer
\(4x^2-28x+49\), using \((a-b)^2=a^2-2ab+b^2\) with \(a=2x\) and \(b=7\).