Completing the Square Calculator
Completing the square rewrites ax² + bx + c as a(x − h)² + k, revealing the vertex (h, k). For x² + 6x + 5 the result is (x + 3)² − 4, so the vertex is (−3, −4) and the roots are x = −1 and x = −5.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
What Is Completing the Square?
Completing the square is an algebra technique that rewrites a quadratic from standard form, ax² + bx + c, into vertex form, a(x − h)² + k. The name describes what you do: you add and subtract a specific number to create a perfect square trinomial, such as x² + 6x + 9 = (x + 3)².
Vertex form is valuable because it shows the shape of the parabola at a glance. The point (h, k) is the vertex, the lowest point if a is positive and the highest if a is negative, and the vertical line x = h is the axis of symmetry. The same technique is also how the quadratic formula is derived.
Standard Form vs Vertex Form
| Standard form | Vertex form | |
|---|---|---|
| Shape | ax² + bx + c | a(x − h)² + k |
| Shows directly | The y-intercept c | The vertex (h, k) |
| For x² + 6x + 5 | x² + 6x + 5 | (x + 3)² − 4 |
| Vertex | Needs a calculation | (−3, −4) |
Completing the Square Formulas
a,bandcare the coefficients of the quadratic in standard form.his the x-coordinate of the vertex and the axis of symmetry.kis the minimum value (if a > 0) or maximum value (if a < 0) of the quadratic.- The roots, when real, are x = h ± √(−k ÷ a).
The method for a = 1: take half of b, square it, add and subtract it, and write the first three terms as a perfect square.
How Is It Calculated? Worked Examples
x² + 6x + 5
- Half of b: 6 ÷ 2 = 3. Square it: 9.
- Add and subtract 9: x² + 6x + 9 − 9 + 5.
- The first three terms are a perfect square: (x + 3)² − 4.
- Vertex form: (x + 3)² − 4, with vertex (−3, −4) and axis of symmetry x = −3.
- The minimum value is −4. Setting (x + 3)² = 4 gives x + 3 = ±2, so the roots are x = −1 and x = −5.
When a ≠ 1: 2x² + 8x + 3
- Factor out a from the x terms: 2(x² + 4x) + 3.
- Half of 4 is 2, and 2² = 4. Add and subtract inside the bracket: 2(x² + 4x + 4 − 4) + 3.
- Pull the −4 out, remembering the factor 2: 2(x + 2)² − 8 + 3.
- Vertex form: 2(x + 2)² − 5, vertex (−2, −5).
- Roots: (x + 2)² = 5/2, so x = −2 ± 1.5811, giving −0.4189 and −3.5811.
No Real Roots
x² + 2x + 5 becomes (x + 1)² + 4. The minimum value is +4, which is above the x-axis, so there are no real roots. The roots are complex: −1 ± 2i.
How to Use This Completing the Square Calculator
- Enter a, b and c from ax² + bx + c.
- Read the vertex form, the vertex, the axis of symmetry, the minimum or maximum value, the roots and the y-intercept.
- Open the steps to see the half-and-square process.
For the vertex alone, the vertex of a parabola calculator is a shortcut. To factor instead, use the factoring calculator.
Where Completing the Square Is Used
- Graphing parabolas: vertex form gives the turning point immediately.
- Optimisation: finding the maximum area, profit or height, which is the vertex value k.
- Deriving the quadratic formula: completing the square on ax² + bx + c = 0.
- Calculus and integration: rewriting quadratics inside integrals.
- Geometry: converting circle and conic equations to standard form.
What Are the Most Common Mistakes With the Completing the Square Calculator?
- Forgetting to factor out a. When a ≠ 1, take a out of the x² and x terms first.
- Not balancing the equation. What you add inside a bracket multiplied by a must be subtracted outside.
- Using b instead of half of b. The number to square is (b ÷ 2).
- Sign errors in the vertex. (x + 3)² has its vertex at x = −3, not +3.
- Expecting real roots. If k and a have the same sign, there are no real roots.
- Setting a = 0. The equation is then linear.
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
- OpenStax: algebra and calculus textbooks
- NIST Digital Library of Mathematical Functions
- Wolfram MathWorld
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
What does completing the square mean?
It means rewriting a quadratic ax² + bx + c as a(x − h)² + k by adding and subtracting the square of half the x-coefficient, to create a perfect square.
How do I find the vertex by completing the square?
Convert to a(x − h)² + k. The vertex is (h, k). For x² + 6x + 5 = (x + 3)² − 4, the vertex is (−3, −4).
How do I complete the square when a is not 1?
Factor a out of the first two terms, complete the square inside the bracket, then multiply the constant you added back out by a.
How does completing the square give the quadratic formula?
Applying the method to ax² + bx + c = 0 in general and solving for x produces x = (−b ± √(b² − 4ac)) ÷ 2a.
What are h and k in vertex form?
h = −b ÷ 2a is the x-coordinate of the vertex and k = c − b² ÷ 4a is the y-coordinate, the minimum or maximum value.
Can I find the roots from vertex form?
Yes. Set a(x − h)² + k = 0, so x = h ± √(−k ÷ a). Real roots exist only when −k ÷ a is non-negative.