homechevron_rightStudychevron_rightMathchevron_rightAlgebra

Completing the square

This online calculator allows you to use completing the square technique to complete the square.

This online calculator applies completing the square technique to a quadratic polynomial, represented by its coefficients a, b and c. That is, it converts the quadratic polynomial of the form ax^2+bx+c to the form a(x-h)^2+k.

Theory and formulas can be found below the calculator.

PLANETCALC, Completing the square

Completing the square

Three quadratic polynomial coefficients, space separated, in order from higher term degree to lower

Completing the square
 

Completing the square.

As it was said above, completing a square is a technique for converting the form ax^2+bx+c of quadratic polynomial to the form a(x-h)^2+k.

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. Completing the square is also used to derive the quadratic formula.1

Formulas for h and k

Let's derive formulas for h and k coefficients. We know that the square of binomial is

(x+p)^{2}=x^{2}+2px+p^{2}

Now let's factor out the coefficient a to get monic quadratic polynomial

x^2+\frac{b}{a}x+\frac{c}{a}

We can write a square of binomial those two terms will be equal to the first two terms of quadratic polynomial:

(x+\frac{b}{2a})^2=x^2+\frac{b}{a}x+\frac{b^2}{4a^2}

It differs from quadratic polynomial only in the value of the constant term. Therefore

x^2+\frac{b}{a}x+\frac{c}{a}=(x+\frac{b}{2a})^2+\frac{c}{a}-\frac{b^2}{4a^2}

By adding constant we complete the square hence the name of the technique.

Now we can restore a by multiplying both parts of the equality to a and finally write the equality like this

ax^2+bx+c=a(x-h)^2+k

where
k=c-\frac{b^2}{4a} \\\\ h=-\frac{b}{2a}

Comments