Understanding the perfect square trinomial calculator — concept and principle
This calculator checks whether a quadratic ax² + bx + c is a perfect square trinomial, factors it as a squared binomial when it is, and otherwise tells you which c or b would make it one. Use it for factoring practice, completing the square, and checking algebra homework.
How it is calculated
- Patterns: a² + 2ab + b² = (a + b)² and a² − 2ab + b² = (a − b)².
- For ax² + bx + c, the test is b² − 4ac = 0. Then ax² + bx + c = a(x + b/(2a))².
- With whole-number coefficients, the greatest common factor is taken out first, e.g. 2x² + 4x + 2 = 2(x + 1)².
- Middle term needed: ±2·√(ax²)·√c.
- c that would make it a square: b² ÷ (4a). b that would: ±2√(ac).
The principle
Squaring a binomial (px + q) gives p²x² + 2pqx + q². So the first and last terms must be squares, and the middle coefficient must be twice the product of their roots. That condition is the same as the discriminant b² − 4ac being 0, which also means the quadratic has one repeated root and its graph just touches the x-axis. Completing the square uses this idea: choose c = b²/(4a) so the expression becomes a perfect square.
Worked example
Default inputs: a = 4, b = −12, c = 9.
- √(4x²) = 2x and √9 = 3.
- Middle term needed: ±2 × 2x × 3 = ±12x. The actual middle term is −12x, which matches.
- Discriminant: (−12)² − 4 × 4 × 9 = 144 − 144 = 0.
- Because the middle term is negative, the result is (2x − 3)², so it is a perfect square trinomial: yes.
- Check: (2x − 3)² = 4x² − 12x + 9. The c that would make it a square is 144 ÷ 16 = 9, and b would be ±12.
How to read the result
"Yes" with a factored form gives the exact factorisation and the double root x = −b/(2a) (here x = 1.5). "No" means the trinomial is not a square; use the suggested c or b to see how far off it is. A negative discriminant means no real roots; a positive one means two different roots.
Common mistakes
- Checking only that the first and last terms are squares, without testing the middle term.
- Getting the sign wrong: the sign of the middle term decides (a + b)² or (a − b)².
- Forgetting the GCF, so 2x² + 4x + 2 looks like it fails.
- Treating a negative constant term as a possible square; −9 is not a square of a real number.
Frequently asked questions
Is x² + 6x + 9 a perfect square trinomial?
Yes. 6² − 4 × 1 × 9 = 0, and it factors as (x + 3)².
How is this related to completing the square?
Completing the square adds the constant b²/(4a) that turns ax² + bx into a perfect square trinomial.
What does a zero discriminant mean on a graph?
The parabola touches the x-axis at exactly one point, its vertex.
Sources: OpenStax, Elementary Algebra 2e (2020), §7.4 Factor Special Products