The Completing the Square Calculator provided by Hesapstan solves ax²+bx+c=0 by showing the algebraic steps: normalize the equation, move the constant, add the square of half the x-coefficient, rewrite the left side as a squared binomial, extract vertex form, compute the discriminant, and display numerical real or complex roots. It does not graph the parabola and does not simplify roots into exact radical form.
Completing the square turns a quadratic into a squared binomial
Completing the square is an algebraic method for rewriting a quadratic equation as a squared binomial. The goal is to transform the x² and x terms into an expression such as (x+h)².
The method is useful because it shows more than the roots. It also reveals the vertex form of the quadratic, which explains how the expression is shifted from a basic square.
Completing the square works by adding the square of half the normalized x-coefficient: x²+px becomes x²+px+(p/2)²=(x+p/2)².
This calculator shows the full ax²+bx+c=0 workflow
The calculator takes numerical coefficients a, b, and c. The coefficient a must be nonzero. It then shows the original equation, the normalized form when needed, the constant moved to the other side, the half-coefficient step, the completed square, vertex form, discriminant, root type, and roots.
- Read the equation as ax²+bx+c=0.
- If a is not ±1, divide by a so the x² coefficient becomes 1.
- Move the constant term to the right side.
- Take half of the normalized x-coefficient and square it.
- Add that square to both sides to form a perfect square trinomial.
- Display vertex form, the discriminant, the root type, and the roots.
Inputs must be numerical. Symbolic parameters, graph output, and exact radical simplification are outside the current runtime scope.
Enter a, b, and c as the coefficients of the quadratic
First put the equation in ax²+bx+c=0 form. Enter the coefficient of x² as a, the coefficient of x as b, and the constant term as c.
- Enter the x² coefficient in the a field; a=0 is rejected because the equation would not be quadratic.
- Enter the x coefficient in the b field, including its sign.
- Enter the constant term in the c field.
- Read the output in order: normalization, completing-the-square step, vertex form, discriminant, and roots.
The runtime displays roots numerically. Some quadratics have exact radical forms, but this calculator does not present a separate simplified radical answer.
The method depends on the half-coefficient step
After dividing by a, the equation has the form x²+px+q=0. Move the constant term to the other side: x²+px=-q. Then take p/2 and add (p/2)² to both sides.
The left side becomes a perfect square: x²+px+(p/2)²=(x+p/2)². From there, the equation can be solved by taking square roots, and the vertex form can also be read from the completed expression.
If a is not 1, using the original b directly as though the equation were x²+bx+c=0 gives the wrong completing-square step. Normalize first, then use the normalized x-coefficient.
Worked example: complete the square for 2x²+8x−10=0
This example follows the same sequence the calculator displays: normalize, move the constant, complete the square, solve, and interpret the discriminant.
- Start with 2x²+8x−10=0.
- Divide by 2: x²+4x−5=0.
- Move the constant: x²+4x=5.
- The normalized x-coefficient is p=4, so p/2=2 and (p/2)²=4.
- Add 4 to both sides: x²+4x+4=9.
- Rewrite the left side: (x+2)²=9.
- Solve: x+2=±3, so x=1 or x=−5.
- The vertex form is 2(x+2)²−18. The discriminant is D=144, so there are two distinct real roots.
Because a=2, the example includes the normalization step. That is the step many students forget when completing the square.
The discriminant explains the root type, not exact radical form
The calculator also shows D=b²−4ac. If D>0, the quadratic has two distinct real roots. If D=0, it has one repeated real root. If D<0, it has two complex conjugate roots.
This interpretation tells you what kind of roots the equation has. The displayed roots are numerical approximations; if D is positive but not a perfect square, you may see decimal roots rather than an exact expression involving √D.
For a quadratic graph, D>0 means two x-intercepts, D=0 means the graph touches the x-axis once, and D<0 means there is no real x-intercept. This calculator explains that relationship in text but does not draw the graph.
Completing the square is different from the quadratic formula and factoring
Quadratic equations can be solved in several ways. Completing the square shows the algebraic transformation. The quadratic formula gives the roots directly. Factoring can be faster when the trinomial splits cleanly.
- Use completing the square when you want to see the vertex form and the algebraic steps.
- Use the discriminant when you only need the number and type of roots.
- Use reverse FOIL or factoring when the quadratic has simple factor pairs.
- Use a square root calculator to check a separate √D step.
The calculator shows roots as part of the completing-the-square workflow. It is not a full graphing tool, symbolic-parameter solver, or exact radical simplifier.
Frequently Asked Questions
What does completing the square mean?
It means rewriting a quadratic so that the x² and x terms become a perfect square binomial, such as (x+h)².
Does this calculator give exact radical roots?
No. It displays numerical real or complex roots. It does not separately simplify roots into exact radical form.
Why is a=0 rejected?
If a=0, the equation is not quadratic, so completing the square for ax²+bx+c=0 does not apply.
What is vertex form?
Vertex form writes the quadratic as a(x−h)²+k or an equivalent sign convention. It helps identify the vertex algebraically, but this calculator does not graph it.
Is completing the square the same as the quadratic formula?
No. The quadratic formula gives the roots directly, while completing the square transforms the equation step by step before solving.
What happens when D<0?
There are no real roots, but there are two complex conjugate roots. The calculator displays them numerically as re ± im·i.
Why does the normalization step appear only sometimes?
The step appears when a is not ±1 and the equation must be divided by a before completing the square.