Advertisement

Completing the square practice calculator

Choose coefficients for ax²+bx+c. Enter your proposed h and k in a(x-h)²+k to check your work, or reveal the worked solution directly.

Calculator

Correct h
-3.00000000
Correct k
-4.00000000
Completed vertex form
1 (x + 3)² - 4
Answer check
Correct
Roots of ax²+bx+c=0
-5, -1
Square completion steps
StepValue
Divide the linear coefficient by a: b/a6.00000000
Halve it: b/(2a)3.00000000
Add this square inside the bracket9.00000000
Correct the outside constant: c-a(b/2a)²-4.00000000

Advertisement

How this calculator works

Factor the squared coefficient from the quadratic and linear terms. Half the remaining linear coefficient is the shift inside the square. Adding its square inside requires subtracting a times that amount outside. This produces a(x-h)²+k. Practice mode checks your proposed h and k independently, using a relative tolerance of 10^-9 with an absolute tolerance of 10^-9 near zero. Worked results remain visible as immediate feedback. Solving the completed expression equal to zero also reveals real or complex roots.

Formula

h=-b/(2a); k=c-b²/(4a); ax²+bx+c=a(x-h)²+k. Roots: x=h±√(-k/a), with imaginary offsets when -k/a<0.

Worked example

For x²+6x+5, half of 6 is 3 and its square is 9. Thus x²+6x+5=(x+3)²-4, so h=-3, k=-4 and the roots are -5 and -1. For 2x²-8x+3, the result is 2(x-2)²-5.

Advertisement

Frequently asked questions

Why is my h the opposite sign of the bracket constant?

Vertex form uses x-h. A bracket x+3 therefore corresponds to h=-3, not h=3.

Does a negative a prevent square completion?

No. Any non-zero a works. Its sign affects the opening direction and the outside constant adjustment.

Can I practise an equation with no real roots?

Yes. Completing the square still works. A negative value of -k/a produces a conjugate pair of complex roots.

Sources

Advertisement