This online completing the square calculator performs completing the square transformation for converting a quadratic polynomial of the form ax² + bx + c to the form a(x – p)² + q. Enter the coefficients a, b and c of the quadratic polynomial in the fields of the calculator and get the parameters p and q.
ax2 + bx + c = a(x – p)2 + q
Completing the square
As it was mentioned above, completing the square is a technique for converting a quadratic polynomial of the form \(ax^2+bx+c\) to the form \(a(x-p)^2+q\).
The transformations leading to the new form are straightforward:
$$a{ x }^{ 2 }+bx+c=a \left({ x }^{ 2 }+\frac { b }{ a } x+\frac { c }{ a } \right) =a{ \left(x+\frac { b }{ 2a } \right) }^{ 2 }+ c -\frac { { b }^{ 2 } }{ 4{ a } } .$$
As a result, we have the following formulas for coefficients \(p\) and \(q\), used in our completing the square calculator:
$$p=-\frac { b }{ 2a }, \quad q=c -\frac { { b }^{ 2 } }{ 4{ a } }.$$
Completing the square is used in
• solving quadratic equations,
• graphing quadratic functions,
• evaluating integrals in calculus, such as Gaussian integrals with a linear term in the exponent,
• finding Laplace transforms.
In mathematics, completing the square is often applied in any computation involving quadratic polynomials. It is also used in solving quadratic equations.
Related calculators
Check out our other algebra calculators such as Matrix Calculator or Quadratic Formula Calculator.