Two completing-the-square tasks
Rewriting an expression and solving an equation use the same perfect-square identity, but they change the algebra in different ways:
Convert an expression
To rewrite ax² + bx + c, factor a from the variable terms: a[x² + (b/a)x] + c. Add and subtract the correction inside the brackets. Because it is inside, the outside correction is multiplied by a.
Solve an equation
To solve ax² + bx + c = 0, divide both sides by a, move the constant, and add the same correction to both sides. Then factor, take both square roots, and isolate x.
Vertex form identity
For any quadratic with a ≠ 0:
This is a(x − h)² + k, where h = −b/(2a) and k = c − b²/(4a). The vertex is (h, k), the axis is x = h, and the vertex is a minimum when a > 0 or a maximum when a < 0.
One non-monic example, both ways
Rewrite the expression
2x² − 8x + 5 = 2(x² − 4x) + 5 = 2[(x − 2)² − 4] + 5 = 2(x − 2)² − 3. The correction inside the brackets is −4, but after multiplication by 2 its effect is −8.
Solve the equation
2x² − 8x + 5 = 0. Divide both sides by 2: x² − 4x = −5/2. Add 4 to both sides: (x − 2)² = 3/2. Therefore x = 2 ± √6/2.
Common error: when converting an expression, do not forget that a correction made inside parentheses is multiplied by the outside coefficient a.
Reviewed method, privacy, and accuracy
Mathematical review: Starlight Tools Mathematics Review Team, experienced in exact-arithmetic calculator implementation and algebra-content quality assurance. Reviewed 31 August 2026. Our editorial process checks formulas against symbolic identities, tests representative edge cases, and accepts corrections through the site contact channel.
Integers, fractions, and finite decimals are converted to reduced fractions and processed with BigInt arithmetic. The displayed algebra is exact; decimal roots are rounded to 10 significant decimal places. Results are verified numerically by substituting each root into the original quadratic.
Technical calculation limits
Each numeric part is limited to 18 digits and normalized integer coefficients must not exceed 1012 in magnitude. Inputs outside that range receive an error. Radical extraction checks square factors up to 100,000 and preserves an exact radical if a very large radicand is not reduced further.
Completing the square FAQs
What does completing the square mean?
It rewrites a quadratic so part of it is a perfect-square binomial. The identity x²+px=(x+p/2)²−(p/2)² is the key step.
What number do I add when completing the square?
After making the x² coefficient 1, take half the x coefficient and square it. For x²+px, add (p/2)² to both sides.
Do I have to divide by a first?
Only when solving an equation. For expression conversion, factor a from the x² and x terms; for equation solving, divide both sides by a before forming the perfect square.
How does completing the square give vertex form?
ax²+bx+c becomes a(x−h)²+k, where h=−b/(2a) and k=c−b²/(4a).
Can completing the square produce complex roots?
Yes. If the completed square equals a negative number, taking square roots introduces i, the imaginary unit, and gives a complex-conjugate pair.
Does the calculator accept full expressions, fractions, and decimals?
Yes. Paste a quadratic such as 2x² − 8x + 5 = 0, or enter integers, finite decimals, and fractions such as 3/4 in the coefficient fields.
When is completing the square preferable?
Use it when you need the vertex, axis of symmetry, minimum or maximum, or a derivation of the quadratic formula. Factoring is usually faster when integer factors are obvious; the quadratic formula is often shorter when you only need roots.
How do I read the vertex, axis, minimum, or maximum?
In a(x − h)² + k, the vertex is (h, k) and the axis is x = h. If a is positive, k is the minimum value; if a is negative, k is the maximum.
What happens when b is zero or a is negative?
When b = 0, the quadratic is already centered on x = 0, so no correction term is needed. When a is negative, the parabola opens downward and its vertex is a maximum.
Why is half the linear coefficient squared?
Expanding (x + q)² gives x² + 2qx + q². To match a linear coefficient p, choose q = p/2; the needed constant is therefore (p/2)².
How does completing the square derive the quadratic formula?
Starting from ax² + bx + c = 0, divide by a, complete the square, and obtain (x + b/2a)² = (b² − 4ac)/(4a²). Taking both square roots and isolating x gives x = (−b ± √(b² − 4ac))/(2a).