Advertisement

Perfect square trinomial calculator

Choose to check all three coefficients or find c from a and b. A real binomial square requires a non-negative leading coefficient.

Calculator

Perfect real square?
Yes
Binomial square root
2x - 3
Constant c
9.00000000
Discriminant
0.00000000

Advertisement

How this calculator works

Expand (px + q)^2 and compare coefficients: a = p^2, b = 2pq and c = q^2. For a positive a, the necessary and sufficient condition is b^2 = 4ac with c non-negative. The numerical comparison uses a relative tolerance of 1e-12. A non-negative constant is also a degenerate square. A negative leading coefficient cannot be a square of a real binomial.

Formula

(px + q)^2 = p^2*x^2 + 2pq*x + q^2. Given a > 0 and b, c = b^2/(4a) completes the square.

Worked example

4x^2 - 12x + 9 = (2x - 3)^2 because 2 x 2 x (-3) = -12. To complete x^2 + 6x + c, use c = 36/4 = 9, giving (x + 3)^2.

Advertisement

Frequently asked questions

Is a zero discriminant enough?

For a genuine real quadratic square, a must also be positive. A negative multiple of a square has zero discriminant but is not itself a real square.

Can the middle term be negative?

Yes. A negative b selects opposite signs in the square-root binomial.

What does the tolerance mean?

A very small relative discrepancy can be accepted as rounding noise. Use exact symbolic arithmetic to certify nearly square decimal inputs.

Sources

Advertisement