# Completing the square

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

### This page exists due to the efforts of the following people:

#### Timur

Created: 2019-06-08 16:25:50, Last updated: 2021-03-20 19:52:43

This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/8255/. Also, please do not modify any references to the original work (if any) contained in this content.

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.

#### 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

• 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 a 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}$

URL copied to clipboard

#### Similar calculators

PLANETCALC, Completing the square