Skip to main content

Completing the Square Calculator

Our free algebra calculator solves completing square problems. Get worked examples, visual aids, and downloadable results.

Share this calculator

Formula

ax^2 + bx + c = a(x - h)^2 + k

Where h = -b/(2a) is the x-coordinate of the vertex, and k = c - b^2/(4a) is the y-coordinate. The vertex form reveals the parabola opens upward when a > 0 (minimum at k) and downward when a < 0 (maximum at k). The axis of symmetry is the vertical line x = h.

Worked Examples

Example 1: Completing the Square for x^2 - 6x + 5

Problem: Convert x^2 - 6x + 5 to vertex form by completing the square.

Solution: Step 1: Take half of -6: (-6)/2 = -3\nStep 2: Square it: (-3)^2 = 9\nStep 3: Add and subtract 9:\n x^2 - 6x + 9 - 9 + 5\n = (x - 3)^2 - 4\nVertex: (3, -4)\nRoots: x - 3 = +/-2 => x = 1, x = 5

Result: (x - 3)^2 - 4 | Vertex: (3, -4)

Example 2: Completing the Square for 2x^2 + 8x + 3

Problem: Convert 2x^2 + 8x + 3 to vertex form.

Solution: Step 1: Factor out 2: 2(x^2 + 4x) + 3\nStep 2: Half of 4 is 2, squared is 4\nStep 3: 2(x^2 + 4x + 4 - 4) + 3\n = 2(x + 2)^2 - 8 + 3\n = 2(x + 2)^2 - 5\nVertex: (-2, -5)

Result: 2(x + 2)^2 - 5 | Vertex: (-2, -5)

Frequently Asked Questions

What does completing the square mean and why is it useful?

Completing the square is an algebraic technique that transforms a quadratic expression ax^2 + bx + c into vertex form a(x - h)^2 + k. This transformation reveals the vertex of the parabola at point (h, k), making it easy to identify the minimum or maximum value and the axis of symmetry. The technique works by adding and subtracting a specific constant to create a perfect square trinomial within the expression. It is one of the most versatile methods in algebra because it not only solves quadratic equations but also helps derive the quadratic formula, analyze conic sections, and simplify certain integral calculations in calculus.

What are the step-by-step instructions for completing the square?

To complete the square for ax^2 + bx + c, first factor out the leading coefficient a from the x terms if a is not 1. Then take half the coefficient of x (which is b/(2a)), square it to get b^2/(4a^2), and both add and subtract this value inside the expression. This creates a perfect square trinomial that factors as (x + b/(2a))^2. After simplifying, you get a(x - h)^2 + k where h = -b/(2a) and k = c - b^2/(4a). For example, x^2 + 6x + 2 becomes (x^2 + 6x + 9) - 9 + 2 = (x + 3)^2 - 7. Always verify by expanding the result back to standard form.

How is completing the square related to the quadratic formula?

The quadratic formula x = (-b plus/minus sqrt(b^2 - 4ac)) / (2a) is actually derived by completing the square on the general quadratic equation ax^2 + bx + c = 0. Starting with the general form, 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 produces the quadratic formula. Understanding this derivation provides deeper insight into why the formula works and reveals the geometric meaning of its components: -b/(2a) is the x-coordinate of the vertex, and the discriminant b^2 - 4ac determines whether and where the parabola crosses the x-axis.

When should you use completing the square instead of factoring or the quadratic formula?

Completing the square is the best choice when you need the vertex form of a quadratic function, when solving optimization problems, or when working with circles and other conic sections. Factoring is faster when the quadratic has nice integer roots, and the quadratic formula is more direct when you only need the roots. However, completing the square is essential when the quadratic cannot be easily factored and you need more than just the roots. In calculus, completing the square is frequently used to evaluate integrals involving quadratic expressions in the denominator. It is also the standard approach for converting general conic section equations to standard form.

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

When the leading coefficient a is not 1, you must first factor it out from the x^2 and x terms before completing the square. For example, to complete the square for 2x^2 + 12x + 7, first factor out 2 from the first two terms: 2(x^2 + 6x) + 7. Then complete the square inside the parentheses: 2(x^2 + 6x + 9 - 9) + 7 = 2(x + 3)^2 - 18 + 7 = 2(x + 3)^2 - 11. Notice that when you subtract 9 inside the parentheses, it gets multiplied by the factored-out 2, contributing -18 to the constant term. This step is where most errors occur, so careful attention to the factor outside is critical.

What is the role of the discriminant in completing the square?

The discriminant b^2 - 4ac determines the nature of the solutions when you set the completed-square form equal to zero and solve. If the discriminant is positive, the squared term equals a positive number, yielding two distinct real roots symmetric about the axis of symmetry. If the discriminant is zero, the squared term equals zero, giving exactly one repeated real root at the vertex. If the discriminant is negative, the squared term would need to equal a negative number, which is impossible for real numbers, so there are no real roots (only complex conjugate roots). The discriminant also equals -4a times the k-value in vertex form.

References