factor x^2-y^2-4x+4
The expression: x2 -y2 -4x + 4 contains several variables so we pick x for factorization
Let's factor in ℝ: x2 -y2 -4x + 4
Given the quadratic form ax2 + bx + c, let's compute the discriminant: Δ = b2 -4ac. Here a = 1, b = -4 and c = -y2 + 4
Δ = (-4)2 -4·1·(-y2 + 4)
ⓘ Powers are computed before multiplications, additions and subtractions. An integer power is a repeated product: (-4)2 = (-4)·(-4) = 16
Δ = 16 -4·(-y2 + 4)
ⓘ Expand by multiplying each term inside the parentheses: -4·(-y2 + 4) = -(4·(-y2) + 16)
Δ = 16 -(4·(-y2) + 16)
ⓘ A minus sign before a parenthesis changes the sign of each of its terms: -(4·(-y2) + 16) = -4·(-y2) -16
Δ = 16 -4·(-y2) -16
ⓘ Two minus signs cancel out: -4·(-y2) = 4y2■Start from 16 and move back 16 on the number line, down to zero: 16 -16 = 0
Δ = 0 + 4y2
ⓘ Adding 0 changes nothing: 0 + 4y2 = 4y2
Δ = 4y2
The discriminant is a square: Δ = (2y)2. With q = 2y, the roots are -b -q2a and -b + q2a, including when q is 0
x1 = 4 -2y2
ⓘ A fraction is simplified by dividing the numerator and the denominator by the same number: 4 -2y2 = 2·(2 -y)2 = 2 -y
x1 = 2 -y
x2 = 4 + 2y2
ⓘ A fraction is simplified by dividing the numerator and the denominator by the same number: 4 + 2y2 = 2·(2 + y)2 = 2 + y
x2 = 2 + y
Factors found: (x -(y + 2))·(x -(2 -y))
(x -(2 -y))·(x -(y + 2))
ⓘ A minus sign before a parenthesis changes the sign of each of its terms: -(2 -y) = -2 + y, -(y + 2) = -y -2
(x -2 + y)·(x -y -2)
▶Factored expression:   (x + y -2)·(x -y -2)