terican

Last verified · v1.0

Calculator · math

Completing The Square Calculator

Convert any quadratic ax^2 + bx + c to vertex form, find roots and discriminant by completing the square, with full step-by-step work.

FreeInstantNo signupOpen source

Inputs

Result

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

Result

The formula

How the
result is
computed.

What Is Completing the Square?

Completing the square is an algebraic technique that transforms a quadratic expression in standard form ax² + bx + c into vertex form a(x + h)² + k. This method reveals the parabola's vertex coordinates, simplifies root-finding, and provides the algebraic backbone for deriving the quadratic formula itself. According to West Texas A&M University College Algebra Tutorial 17, completing the square applies universally to every quadratic equation, including those whose trinomials do not factor over the integers — making it one of the most powerful and generalizable solution strategies in algebra.

The Completing the Square Formula

For the general quadratic equation ax² + bx + c = 0, the completed-square equivalent is:

a(x + b/(2a))² + (c − b²/(4a)) = 0

The quantity h = −b/(2a) gives the x-coordinate of the vertex (and the axis of symmetry), while k = c − b²/(4a) gives the y-coordinate. The expression Δ = b² − 4ac is the discriminant, which classifies the roots as real and distinct (Δ > 0), one repeated real root (Δ = 0), or complex conjugates (Δ < 0).

Step-by-Step Derivation

  1. Begin with ax² + bx + c = 0.
  2. Divide every term by a (valid since a ≠ 0): x² + (b/a)x + c/a = 0.
  3. Move the constant to the right side: x² + (b/a)x = −c/a.
  4. Add the square of half the linear coefficient, (b/(2a))², to both sides: x² + (b/a)x + b²/(4a²) = −c/a + b²/(4a²).
  5. Factor the left side as a perfect square: (x + b/(2a))² = b²/(4a²) − c/a.
  6. Multiply through by a to restore the original leading coefficient: a(x + b/(2a))² + (c − b²/(4a)) = 0.

Variable Definitions

  • a — Leading coefficient of the x² term. Must be non-zero; dividing by a is the first algebraic step.
  • b — Coefficient of the linear x term. Can be any real number, including zero.
  • c — Constant term. Can be any real number, including zero.
  • h = −b/(2a) — Horizontal shift; x-coordinate of the vertex and the equation's axis of symmetry.
  • k = c − b²/(4a) — Vertical shift; y-coordinate of the vertex. Equals the minimum when a > 0 or maximum when a < 0.
  • Δ = b² − 4ac — Discriminant; determines the number and type of solutions.

Worked Example

Solve 2x² + 8x + 6 = 0 (a = 2, b = 8, c = 6) by completing the square.

  1. Compute h = −8 / (2 × 2) = −2.
  2. Compute k = 6 − 64/8 = 6 − 8 = −2.
  3. Write vertex form: 2(x + 2)² − 2 = 0. The vertex is at (−2, −2).
  4. Solve: (x + 2)² = 1, so x + 2 = ±1, giving x = −1 or x = −3.
  5. Verify: 2(−1)² + 8(−1) + 6 = 2 − 8 + 6 = 0. Correct.
  6. Discriminant check: Δ = 64 − 48 = 16 > 0, confirming two distinct real roots.

Applications

  • Graphing parabolas: Vertex form directly supplies the vertex coordinates for accurate sketching without a table of values.
  • Deriving the quadratic formula: Completing the square on the general equation ax² + bx + c = 0 yields x = (−b ± √(b² − 4ac)) / (2a), the universal quadratic formula.
  • Physics and engineering: Projectile height h(t) = −4.9t² + v0t + h0 is optimized by completing the square to find the exact time of maximum height without calculus.
  • Circle equations: The general conic x² + y² + Dx + Ey + F = 0 converts to standard circle form (x − h)² + (y − k)² = r² by completing the square in both x and y.
  • Optimization: Quadratic cost, profit, or area functions achieve their extreme value at the vertex, read directly from vertex form.

Methodology and Sources

This calculator implements the algebraic procedure documented in West Texas A&M University College Algebra Tutorial 17 and cross-validated against the procedural standards in the University of Wisconsin-Whitewater Methods for Solving Quadratic Equations. Step-by-step output format conforms to the algebraic reasoning benchmarks published in the California Mathematics Standards for Algebra, ensuring compatibility with K–12 and undergraduate curricula nationwide.

Reference

Frequently asked questions

How does completing the square work to solve a quadratic equation?
Completing the square rewrites ax^2 + bx + c = 0 as a(x + b/(2a))^2 + (c - b^2/(4a)) = 0. This isolates the squared binomial so a square root can be taken on both sides. For example, x^2 + 4x + 1 = 0 becomes (x + 2)^2 = 3, giving x = -2 plus or minus sqrt(3), approximately -0.27 or -3.73.
What is vertex form and how does completing the square produce it?
Vertex form is a(x - h)^2 + k, where h = -b/(2a) and k = c - b^2/(4a). For the equation 3x^2 - 12x + 7, completing the square yields 3(x - 2)^2 - 5, placing the vertex at coordinates (2, -5). This form immediately reveals the minimum or maximum value of the quadratic and the axis of symmetry without additional calculation.
When should completing the square be used instead of the quadratic formula?
Completing the square is preferred when the goal is to find the vertex, convert to vertex form for graphing, or understand the geometric structure of the parabola. The quadratic formula is faster for pure root-finding on complex coefficients. When a equals 1 and b is an even integer, completing the square is typically the quickest hand-calculation approach with the fewest arithmetic steps.
What does the discriminant tell you when completing the square?
The discriminant b^2 - 4ac determines the nature and count of roots. A positive discriminant means two distinct real roots exist. A discriminant of zero means exactly one repeated real root. A negative discriminant means the roots are complex conjugates with no real solutions. For 2x^2 + 3x + 5 = 0, the discriminant equals 9 minus 40 = -31, indicating two complex roots with no real intersections.
Can this calculator complete the square when the leading coefficient is not 1?
Yes. When the leading coefficient a is not 1, the calculator divides through by a before completing the square, then scales back afterward. For example, 4x^2 + 16x + 12 = 0 divides to x^2 + 4x + 3 = 0, yielding (x + 2)^2 - 1 = 0 and solutions x = -1 or x = -3. The vertex form is then written as 4(x + 2)^2 - 4 = 0 in terms of the original equation.
What are the most common mistakes when completing the square by hand?
The most frequent errors are forgetting to divide by the leading coefficient a before completing the square, adding (b/(2a))^2 to only one side of the equation instead of both, and making sign errors when computing k = c - b^2/(4a). Always verify the result by expanding the vertex form: a(x + h)^2 + k must simplify back to the original ax^2 + bx + c, confirming no arithmetic mistakes were made.