𝑓

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

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²−4acRootsParabola position
D > 02 distinct real rootsCrosses x-axis at 2 points
D = 01 repeated real rootVertex touches x-axis
D < 00 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

ExpressionVertex FormVertex (h, k)Roots
x²+6x+5(x+3)²−4(−3, −4)x=−1, x=−5
2x²−8x+32(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−153(x+2)²−27(−2, −27)x=1, x=−5

Frequently Asked Questions

What is completing the square?
Completing the square is an algebraic technique that rewrites ax²+bx+c into vertex form a(x−h)²+k by adding and subtracting the square of half the linear coefficient. This creates a perfect square trinomial, revealing the vertex (h, k) of the parabola and forming the foundation for deriving the quadratic formula.
What is the vertex form of a quadratic?
Vertex form is a(x−h)²+k, where (h, k) is the vertex of the parabola. When a > 0 the parabola opens upward and k is the minimum value; when a < 0 it opens downward and k is the maximum. The axis of symmetry is the vertical line x = h.
How do you complete the square when a ≠ 1?
First factor out a from the first two terms: a(x²+(b/a)x)+c. Then find (b/2a)², and add and subtract it inside the parentheses: a(x²+(b/a)x+(b/2a)²−(b/2a)²)+c. This simplifies to a(x+b/2a)²−b²/(4a)+c, giving h = −b/(2a) and k = c−b²/(4a).
What does the discriminant tell you about the roots?
The discriminant D = b²−4ac determines root count: D > 0 means two distinct real roots (parabola crosses x-axis twice); D = 0 means one repeated root (vertex touches x-axis); D < 0 means no real roots, two complex conjugate roots (parabola entirely above or below x-axis depending on the sign of a).
Can completing the square solve any quadratic equation?
Yes. Completing the square works for any quadratic ax²+bx+c = 0 with a ≠ 0, including cases with irrational or complex roots. When D < 0 the method reveals that you must take the square root of a negative number, giving complex roots x = h ± i·√(|D|)/(2|a|).
How does completing the square derive the quadratic formula?
Starting from ax²+bx+c = 0, complete the square to get a(x+b/2a)² = b²/(4a)−c = (b²−4ac)/(4a). Divide by a: (x+b/2a)² = (b²−4ac)/(4a²). Take the square root: x+b/2a = ±√(b²−4ac)/(2a). Subtract b/(2a): x = (−b ± √(b²−4ac))/(2a). This is the quadratic formula.
What are the practical uses of vertex form?
Vertex form is used in: (1) Optimization — the vertex (h, k) directly gives the maximum or minimum value at x = h; (2) Graphing — you immediately know the turning point and direction of opening; (3) Calculus integration of rational functions; (4) Converting conic section equations to standard form; (5) Physics and engineering for projectile motion, parabolic reflectors, and cost/revenue modeling.