Completing the Square Calculator — Show Steps

Vertex Form

--

Vertex (h, k)

--

Roots

--

Steps

--

How Completing the Square Works

Completing the square is an algebraic technique that transforms a quadratic expression from standard form (ax^2 + bx + c) into vertex form (a(x - h)^2 + k), revealing the vertex coordinates (h, k) of the corresponding parabola. This method is one of the foundational techniques in algebra, appearing in curricula aligned with the Common Core State Standards for Mathematics (standards HSA-SSE.B.3 and HSA-REI.B.4). It is tested on the SAT, ACT, GRE, and AP Calculus exams, and is essential for graphing parabolas, solving quadratic equations, and working with conic sections.

The technique works by manipulating the expression so that the x terms form a perfect square trinomial. Once in vertex form, you can immediately read the vertex (h, k), the axis of symmetry (x = h), and whether the parabola opens upward (a > 0) or downward (a < 0). The vertex form is also the most efficient way to find the minimum or maximum value of a quadratic function, which has applications in physics (projectile motion), economics (profit maximization), and engineering (optimization). The quadratic formula is itself derived by completing the square on the general quadratic equation.

The Completing the Square Formula

For a quadratic expression ax^2 + bx + c, the vertex form is obtained using these relationships:

h = -b / (2a) (x-coordinate of the vertex)

k = c - b^2 / (4a) (y-coordinate of the vertex)

Vertex Form: a(x - h)^2 + k

For example, given x^2 - 6x + 5 (where a = 1, b = -6, c = 5): h = -(-6) / (2 x 1) = 3, and k = 5 - (-6)^2 / (4 x 1) = 5 - 9 = -4. The vertex form is (x - 3)^2 - 4, with vertex at (3, -4). The axis of symmetry is x = 3, and the minimum value of the function is -4. Setting (x - 3)^2 - 4 = 0 gives x = 3 +/- 2, so x = 1 or x = 5 (the roots).

Key Terms You Should Know

Standard Form: A quadratic expression written as ax^2 + bx + c, where a, b, and c are constants and a is not equal to 0. This is the most common form encountered in textbooks and the starting point for completing the square.

Vertex Form: The equivalent expression a(x - h)^2 + k, where (h, k) is the vertex. This form is optimal for graphing because it immediately reveals the vertex, axis of symmetry, and direction of opening.

Discriminant: The value b^2 - 4ac, which determines the nature of the roots. A positive discriminant means two distinct real roots, zero means one repeated root (the vertex touches the x-axis), and negative means two complex conjugate roots (the parabola does not cross the x-axis).

Perfect Square Trinomial: An expression of the form x^2 + 2dx + d^2, which factors as (x + d)^2. Completing the square works by creating a perfect square trinomial from the x terms.

Axis of Symmetry: The vertical line x = h that divides the parabola into two mirror-image halves. Every parabola has exactly one axis of symmetry passing through its vertex.

Completing the Square vs Other Methods

Different methods for solving quadratics have distinct advantages. The following comparison, consistent with how these methods are taught in standard algebra textbooks such as those from the Mathematical Association of America, helps determine which approach to use.

Method Best For Gives Vertex? Works Always?
Factoring Simple integer roots No (requires extra step) No (only factorable expressions)
Completing the Square Finding vertex, graphing, conic sections Yes (directly) Yes (all quadratics)
Quadratic Formula Finding roots quickly No (requires extra step) Yes (all quadratics)
Graphing Visual understanding, estimating roots Approximate only Yes (but imprecise)

Practical Worked Examples

Example 1 — Simple case (a = 1): Complete the square for x^2 + 8x + 12. Step 1: h = -8/(2x1) = -4. Step 2: k = 12 - 64/4 = 12 - 16 = -4. Step 3: Vertex form is (x + 4)^2 - 4. The vertex is (-4, -4). The roots are x = -4 +/- 2 = -2 and -6. Check: (-2)^2 + 8(-2) + 12 = 4 - 16 + 12 = 0. Correct.

Example 2 — Leading coefficient not 1: Complete the square for 2x^2 - 12x + 7. Factor out 2: 2(x^2 - 6x) + 7. Half of -6 is -3, squared is 9. Add and subtract 9: 2(x^2 - 6x + 9 - 9) + 7 = 2(x - 3)^2 - 18 + 7 = 2(x - 3)^2 - 11. The vertex is (3, -11). The minimum value is -11. The graphing calculator can visualize this parabola.

Example 3 — Negative leading coefficient: Complete the square for -3x^2 + 24x - 10. Factor out -3: -3(x^2 - 8x) - 10. Half of -8 is -4, squared is 16. We get -3(x^2 - 8x + 16 - 16) - 10 = -3(x - 4)^2 + 48 - 10 = -3(x - 4)^2 + 38. The vertex is (4, 38). Since a = -3 < 0, this is a maximum. The maximum value of the function is 38, occurring at x = 4.

Tips for Completing the Square Successfully

Applications Beyond Algebra

Completing the square extends far beyond solving simple quadratic equations. In physics, it determines the maximum height and range of projectile motion (h(t) = -16t^2 + v0t + h0 completed into vertex form gives maximum height and time of flight). In economics, it finds the quantity that maximizes profit or minimizes cost in quadratic revenue and cost models. In analytic geometry, completing the square on x and y terms separately converts the general second-degree equation Ax^2 + Bx + Cy^2 + Dy + E = 0 into the standard forms of circles ((x-h)^2 + (y-k)^2 = r^2), ellipses, and hyperbolas. In calculus, completing the square is a prerequisite technique for integration of expressions like 1/(x^2 + bx + c) using the arctangent formula.

Frequently Asked Questions

What is vertex form of a quadratic equation?

Vertex form is y = a(x - h)^2 + k, where (h, k) represents the vertex of the parabola. The vertex is the minimum point when a > 0 (parabola opens upward) or the maximum point when a < 0 (parabola opens downward). The value h gives the x-coordinate of the axis of symmetry, and k gives the minimum or maximum y-value. For example, y = 2(x - 3)^2 + 5 has its vertex at (3, 5) and opens upward since a = 2 is positive, meaning 5 is the minimum value the function can reach.

Why is completing the square useful in mathematics?

Completing the square is a foundational algebraic technique with applications across multiple areas of mathematics. It reveals the vertex of a quadratic function without graphing, enables solving quadratic equations that cannot be easily factored, and is the method used to derive the quadratic formula itself. Beyond quadratics, completing the square is essential for converting the general equations of circles, ellipses, and hyperbolas into standard form in analytic geometry. It also appears in calculus for integrating rational functions and in statistics for deriving the normal distribution formula.

How does completing the square relate to the quadratic formula?

The quadratic formula x = (-b +/- sqrt(b^2 - 4ac)) / (2a) is derived by applying the completing the square method to the general quadratic equation ax^2 + bx + c = 0. The derivation involves dividing by a, moving c/a to the other side, adding (b/2a)^2 to both sides, factoring the left side as a perfect square, and then solving for x. The discriminant b^2 - 4ac appears naturally during this process and determines whether the roots are real and distinct, real and equal, or complex conjugates.

What is the step-by-step process for completing the square?

The process involves five steps. First, if a is not equal to 1, factor it out from the x^2 and x terms. Second, take half of the coefficient of x (that is, b/2a) and square it to get (b/2a)^2. Third, add and subtract this value inside the expression. Fourth, factor the perfect square trinomial into (x + b/2a)^2. Fifth, simplify the remaining constant terms. For example, for 2x^2 + 12x + 7: factor out 2 to get 2(x^2 + 6x) + 7, add and subtract 9 inside to get 2(x^2 + 6x + 9 - 9) + 7, which simplifies to 2(x + 3)^2 - 18 + 7 = 2(x + 3)^2 - 11.

When should I use completing the square instead of the quadratic formula?

Use completing the square when you need the vertex form of the equation, such as for graphing parabolas, finding maximum or minimum values, or converting conic section equations to standard form. The quadratic formula is more efficient when you only need the roots (solutions) of the equation. In standardized tests like the SAT and ACT, completing the square is tested directly and is also the fastest method for certain problem types, particularly those asking for the vertex, axis of symmetry, or maximum/minimum value.

How do you handle completing the square when the leading coefficient is not 1?

When the leading coefficient a is not equal to 1, you must factor it out from the first two terms before completing the square. For example, with 3x^2 - 18x + 5, first factor out 3: 3(x^2 - 6x) + 5. Now complete the square inside the parentheses: half of -6 is -3, squared is 9. Add and subtract 9 inside: 3(x^2 - 6x + 9 - 9) + 5 = 3(x - 3)^2 - 27 + 5 = 3(x - 3)^2 - 22. The vertex is at (3, -22). A common mistake is forgetting to multiply the subtracted value by a when distributing, which would give an incorrect k value.

Related Calculators