Factor
Recognise the obstacle. This is a sum, and a sum of two squares — — normally does not factor over the reals. The trick is to manufacture a difference of squares by adding a term and taking it straight back off, which changes nothing but reveals structure.
Add and subtract . The choice is not arbitrary: is exactly twice the product of and , which is the cross term a perfect square needs:
Collapse the first three terms.
so the expression has become a genuine difference of squares:
Apply with and :
Reordering each bracket into descending powers of gives the standard statement of Sophie Germain's identity:
Verify and note the irreducibility of the factors. Expanding the product at all integer pairs with reproduces exactly ✓. Spot check : and ✓. Each quadratic factor has discriminant in , so neither factors further over the reals — this is the complete factorisation.
See why it is useful. With the identity gives , which proves is composite for every integer — the classic number-theory application of the identity.
Need to solve a different problem like this? Open the solver →