Completing the Square Calculator
Our free algebra calculator solves completing square problems. Get worked examples, visual aids, and downloadable results.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Completing the Square Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: ax^2 + bx + c = a(x - h)^2 + k
Worked example โ (x - 3)^2 - 4 | Vertex: (3, -4)
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 Step 2: Square it: (-3)^2 = 9 Step 3: Add and subtract 9: x^2 - 6x + 9 - 9 + 5 = (x - 3)^2 - 4 Vertex: (3, -4) Roots: 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 Step 2: Half of 4 is 2, squared is 4 Step 3: 2(x^2 + 4x + 4 - 4) + 3 = 2(x + 2)^2 - 8 + 3 = 2(x + 2)^2 - 5 Vertex: (-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.
What information does vertex form reveal about a quadratic function?
Vertex form a(x - h)^2 + k immediately reveals several key properties of the quadratic function. The vertex (the highest or lowest point) is located at coordinates (h, k). If a is positive, the parabola opens upward and k is the minimum value; if a is negative, it opens downward and k is the maximum value. The axis of symmetry is the vertical line x = h. The value of a determines how wide or narrow the parabola is (larger absolute value means narrower). Vertex form also makes it trivial to perform horizontal and vertical shifts and to determine the range of the function.
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.
How is completing the square used with circles and ellipses?
Completing the square is essential for converting the general equation of a circle (x^2 + y^2 + Dx + Ey + F = 0) into standard form ((x-h)^2 + (y-k)^2 = r^2), which reveals the center (h,k) and radius r. You complete the square separately for the x terms and the y terms. For ellipses, the process is similar but you complete the square for each variable group independently and divide by the constant to get the standard form. This technique extends to all conic sections including parabolas and hyperbolas. Without completing the square, identifying the geometric properties of these curves from their general equations would be extremely difficult.
Can completing the square be used for higher-degree polynomials?
While completing the square in its standard form applies specifically to quadratic (degree-2) expressions, the underlying principle extends to certain higher-degree cases. For quartic (degree-4) expressions of the form ax^4 + bx^2 + c, you can substitute u = x^2 and complete the square in u. Some cubic and quartic solution methods (like Ferrari's method for quartic equations) use a generalized form of completing the square. In multivariable calculus, completing the square generalizes to diagonalizing quadratic forms, which involves transforming expressions with multiple variables and cross terms into sums of perfect squares. This is closely related to eigenvalue decomposition in linear algebra.
What are common mistakes when completing the square and how can you avoid them?
The most frequent mistake is forgetting to account for the leading coefficient when adding the completing term. If you factor out a from ax^2 + bx, the completing constant (b/(2a))^2 is added inside the factored group, so its actual contribution is a times that value. Another common error is computing half of b incorrectly when b is a fraction or negative number. Sign errors when moving the completing constant to the other side of the equation are also prevalent. Students sometimes forget to take the square root of both sides (giving only one solution instead of two). Always verify your answer by expanding the vertex form and confirming it matches the original standard form expression.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎPerfect Square Trinomial Calculator
Calculate perfect square trinomial with inputs, formulas, and instant results.
๐งฎSquare of a Binomial Calculator
Calculate square of abinomial with inputs, formulas, and instant results.
๐งฎMagic Square Calculator
Calculate magic square with inputs, formulas, and instant results.
๐งฎPerfect Square Calculator
Calculate perfect square with inputs, formulas, and instant results.
๐งฎRoot Mean Square Calculator
Calculate root mean square with inputs, formulas, and instant results.
๐งฎSquare Root Calculator
Calculate square root with inputs, formulas, and instant results.
๐งฎSquare in a Circle Calculator
Calculate square in acircle with inputs, formulas, and instant results.
๐งฎSquare Calc Find Apd
Calculate square calc find apd with inputs, formulas, and instant results.