Completing the Square Calculator
Vertex Form · Roots · Parabola Graph · Step-by-Step
Convert ax²+bx+c to vertex form a(x−h)²+k, find vertex, roots, and axis of symmetry with full algebraic steps and interactive graph.
Quick Examples
Step-by-Step: Completing the Square
Parabola Graph
Comparison: Completing the Square vs Quadratic Formula
Both methods produce identical roots. The quadratic formula is actually derived by completing the square on the general form ax²+bx+c = 0.
What Is Completing the Square?
Completing the square is a fundamental algebraic technique used to rewrite a quadratic expression ax²+bx+c into the equivalent vertex form a(x−h)²+k. The name comes from the geometric idea of literally completing a square shape when you add the missing piece to a partial square pattern. This method is one of the most powerful tools in algebra because it reveals the parabola's vertex directly and underlies the proof of the quadratic formula.
Why Learn Completing the Square?
Despite the quadratic formula being faster for just finding roots, completing the square has unique advantages:
- Derives the quadratic formula: Applying completing the square to the general form ax²+bx+c = 0 directly produces x = (−b ± √(b²−4ac)) / (2a). Every proof of the quadratic formula uses this method.
- Vertex form for graphing: The vertex form a(x−h)²+k immediately tells you the turning point (h, k) and axis of symmetry x = h without extra computation.
- Optimization problems: In economics and physics, finding the maximum profit or minimum cost of a quadratic model requires the vertex, which completing the square gives directly.
- Integration in calculus: Many calculus integrals involving quadratics (especially ∫ dx/(ax²+bx+c)) are solved by completing the square to match standard arctangent or logarithm forms.
- Conic sections: Completing the square in two variables transforms the general second-degree equation Ax²+Bxy+Cy²+Dx+Ey+F = 0 into standard circle, ellipse, or hyperbola form.
Step-by-Step Algorithm
For ax²+bx+c with a ≠ 0:
- Step 1 — Factor out a: a(x² + (b/a)x) + c
- Step 2 — Find half the x-coefficient: half = b/(2a)
- Step 3 — Add and subtract half² inside the parentheses: a(x² + (b/a)x + half² − half²) + c
- Step 4 — Write as a perfect square trinomial: a(x + half)² − a·half² + c
- Step 5 — Collect constants: k = c − b²/(4a); vertex form = a(x − h)² + k where h = −b/(2a)
Solving the Equation ax²+bx+c = 0
Once in vertex form a(x−h)²+k = 0, isolate the squared term:
- (x−h)² = −k/a
- If −k/a ≥ 0: x = h ± √(−k/a) — two real roots (or one if −k/a = 0)
- If −k/a < 0: no real roots (complex conjugate pair x = h ± i·√(k/a))
Discriminant and Root Types
| Discriminant D = b²−4ac | Roots | Parabola position |
|---|---|---|
| D > 0 | 2 distinct real roots | Crosses x-axis at 2 points |
| D = 0 | 1 repeated real root | Vertex touches x-axis |
| D < 0 | 0 real roots (2 complex) | Entirely above (a>0) or below (a<0) x-axis |
Vertex Form Applications
The vertex form a(x−h)²+k is essential in many practical settings. In physics, the height of a projectile follows h(t) = −16t²+v₀t+h₀; completing the square immediately gives the peak height k at time h. In economics, a quadratic cost or revenue function has its minimum or maximum at x = h. In engineering, parabolic antennas and mirrors are designed using vertex properties. In computer graphics, bezier curves and trajectory simulations use vertex form for efficient evaluation.
Quick Reference: Example Calculations
| Expression | Vertex Form | Vertex (h, k) | Roots |
|---|---|---|---|
| x²+6x+5 | (x+3)²−4 | (−3, −4) | x=−1, x=−5 |
| 2x²−8x+3 | 2(x−2)²−5 | (2, −5) | x=2±√(5/2) |
| x²+4x+8 | (x+2)²+4 | (−2, 4) | no real roots |
| −x²+6x−9 | −(x−3)² | (3, 0) | x=3 (repeated) |
| 3x²+12x−15 | 3(x+2)²−27 | (−2, −27) | x=1, x=−5 |