Free Completing the Square Calculator

ax² bx c = 0

Enter coefficients a, b, and c above, then click Calculate to see the completing the square solution

The Core of Completing the Square

Completing the square is an algebraic technique that reliably transforms any quadratic equation into an easily solvable form. Its primary application is solving quadratic equations—especially those that resist simple factoring—and it can also be used to rewrite quadratic expressions or derive the quadratic formula. By converting an expression of the type ax2+bx+cax^2 + bx + c into a perfect square plus a constant, the method reveals the roots directly without relying on memorized formulas.

Step-by-Step Process for a Standard Quadratic

Assume we start with the standard form x2+bx+c=0x^2 + bx + c = 0. The procedure proceeds through four clear stages:

  1. Isolate the variable terms:
    x2+bx=−cx^2 + bx = -c
    Move the constant to the right-hand side.

  2. Add the square of half the coefficient of xx:
    x2+bx+(b2)2=−c+(b2)2x^2 + bx + \left(\frac{b}{2}\right)^2 = -c + \left(\frac{b}{2}\right)^2
    The left side is now a perfect square trinomial because (b2)2\left(\frac{b}{2}\right)^2 completes the square.

  3. Factor left side as a binomial square:
    (x+b2)2=(b2)2−c\left(x + \frac{b}{2}\right)^2 = \left(\frac{b}{2}\right)^2 - c

  4. Examine the right-hand side value:

    • If d=(b2)2−c>0d = \left(\frac{b}{2}\right)^2 - c > 0, two real roots exist:
      x=−b2±dx = -\frac{b}{2} \pm \sqrt{d}.
    • If d=0d = 0, exactly one repeated root: x=−b2x = -\frac{b}{2}.
    • If d<0d < 0, no real solutions; the solutions are complex conjugates x=−b2±i∣d∣x = -\frac{b}{2} \pm i\sqrt{|d|}.

This algorithm works for every quadratic, provided the coefficient of x2x^2 is 1 — but that condition is easily arranged.

Adjusting for a Leading Coefficient Not Equal to 1

When the equation appears as ax2+bx+c=0ax^2 + bx + c = 0 with a≠1a \neq 1, normalize it first by dividing all terms by aa:

x2+bax+ca=0x^2 + \frac{b}{a}x + \frac{c}{a} = 0

Then apply the steps above, using ba\frac{b}{a} as the new linear coefficient and ca\frac{c}{a} as the new constant. For example, to solve 2x2+3x−7=02x^2 + 3x - 7 = 0, divide by 2 to get x2+1.5x−3.5=0x^2 + 1.5x - 3.5 = 0 and continue from there. The roots obtained will be identical to those from any other method.

Does Completing the Square Always Work?

Yes, this method succeeds for any quadratic, even when the discriminant is negative. Consider the equation x2−4x+13=0x^2 - 4x + 13 = 0:

x2−4x+13=0x2−4x=−13x2−4x+4=−13+4(x−2)2=−9x−2=±−9=±3ix=2±3i\begin{aligned} x^2 - 4x + 13 &= 0 \\ x^2 - 4x &= -13 \\ x^2 - 4x + 4 &= -13 + 4 \\ (x - 2)^2 &= -9 \\ x - 2 &= \pm \sqrt{-9} = \pm 3i \\ x &= 2 \pm 3i \end{aligned}

The right side became −9-9; taking the square root introduces the imaginary unit ii, producing a pair of complex solutions. No real quadratic is beyond the reach of this technique.

Why This Method Works

The logical foundation of completing the square is the binomial expansion

(x+d)2=x2+2dx+d2.(x + d)^2 = x^2 + 2dx + d^2.

By setting 2d=b2d = b, or d=b/2d = b/2, we see that adding d2=(b/2)2d^2 = (b/2)^2 to both sides of the equation creates a perfect square on the left. This manipulation is always possible because we can adjust the constant term by performing the same addition on both sides.

Practical Benefits of the Method

Understanding completing the square goes beyond the ability to solve equations:

  • Conceptual clarity: It shows exactly where the solutions come from, rather than just plugging numbers into a formula.
  • Derivation of the quadratic formula: By applying the method to the general form ax2+bx+c=0ax^2 + bx + c = 0, one can derive the familiar x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} from first principles.
  • Calculus applications: The technique is a prerequisite for integrating rational functions that contain irreducible quadratic denominators. It also appears in evaluating certain limits and series.

When the Quadratic Formula Might Be Preferable

Despite its conceptual richness, completing the square often requires more steps than using the quadratic formula. When speed is important—especially in timed tests or when the coefficients are messy—the formula usually provides the answer more quickly. Furthermore, the formula is straightforward to code, making it ideal for a quadratic equation solver running on a computer or calculator.

Yet even if you rely on the formula for day‑to‑day calculations, mastering algebra completing the square strengthens your overall algebraic foundation and ensures you can solve quadratic equations with confidence, regardless of the tools at hand.

FAQ

1. What is the completing the square method?

It is an algebraic technique that rewrites a quadratic equation \(ax^2+bx+c=0\) into a form \((x+p)^2 = r\). By taking square roots, you can solve for \(x\) directly. It works for every quadratic, including those with complex solutions.

2. How do I complete the square when the coefficient of \(x^2\) is not 1?

If the leading coefficient is not 1, first divide the entire equation by that coefficient. For example, \(2x^2+3x-7=0\) becomes \(x^2+1.5x-3.5=0\). Then proceed with the standard steps: isolate the variable terms, add \((b/2)^2\), and factor.

3. Is completing the square always reliable?

Yes, it works for any quadratic equation. If the right side after completing the square is negative, the solutions are complex (involving \(i\)). If it is zero, there is exactly one repeated root.

4. What is the main advantage of learning completing the square?

It provides deep insight into the structure of quadratic equations and allows you to derive the quadratic formula yourself. It also appears later in calculus, especially when integrating rational functions with quadratic denominators.

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

The quadratic formula is faster when you need a quick numerical answer and requires fewer algebraic manipulations. It is also easier to implement in computer programs. However, completing the square offers greater conceptual understanding.

How to Use

  1. Enter the coefficients a, b, and c from your quadratic equation ax² + bx + c = 0.
  2. Adjust the precision setting and toggle complex solutions if needed.
  3. Click Solve Equation to see the step-by-step completing the square solution and final answer.