In elementary algebra, completing the square is a technique for converting a quadratic polynomial of the form ax2+bx+c to the form a(x−h)2+k for some values of h and k. In terms of a new quantity x−h, this expression is a quadratic polynomial with no linear term. By subsequently isolating (x−h)2 and taking the square root, a quadratic problem can be reduced to a linear problem. The name completing the square comes from a geometrical picture in which x represents an unknown length. Then the quantity x2 represents the area of a square of side x and the quantity bax represents the area of a pair of congruent rectangles with sides x and b2a. To this square and pair of rectangles, one more square is added, of side length b2a. This crucial step completes a larger square of side length x+b2a. Completing the square is the oldest method of solving general quadratic equations, used in Old Babylonian clay tablets dating from 1800 to 1600 BCE. It was formalised and popularised by mathematician Al-Khwarizmi in his work Al-Jabr, and is still taught in elementary algebra courses today. It is also used for graphing quadratic functions, deriving the quadratic formula, and more generally in computations involving quadratic polynomials, for example in calculus evaluating Gaussian integrals with a linear term in the exponent, and finding Laplace transforms.
History
The technique of completing the square was known in the Old Babylonian Empire. Muhammad ibn Musa Al-Khwarizmi, a famous polymath who wrote the early algebraic treatise Al-Jabr, used the technique of completing the square to solve quadratic equations.
Overview
Background The formula in elementary algebra for computing the square of a binomial is: (x+p)2=x2+2px+p2. For example: (x+3)2=x2+6x+9(p=3)(x−5)2=x2−10x+25(p=−5). In any perfect square, the coefficient of x is twice the number p, and the constant term is equal to p2.
Basic example Consider the following quadratic polynomial: x2+10x+28. This quadratic is not a perfect square, since 28 is not the square of 5: (x+5)2=x2+10x+25. However, it is possible to write the original quadratic as the sum of this square and a constant: x2+10x+28=(x+5)2+3. This is called completing the square.
General description Given any monic quadratic x2+bx+c, it is possible to form a square that has the same first two terms: (x+12b)2=x2+bx+14b2. This square differs from the original quadratic only in the value of the constant term. Therefore, we can write x2+bx+c=(x+12b)2+k, where k=c−b24. This operation is known as completing the square. For example: x2+6x+11=(x+3)2+2x2+14x+30=(x+7)2−19x2−2x+7=(x−1)2+6.
Non-monic case Given a quadratic polynomial of the form ax2+bx+c it is possible to factor out the coefficient a, and then complete the square for the resulting monic polynomial. Example: 3x2+12x+27=3[x2+4x+9]=3[(x+2)2+5]=3(x+2)2+3(5)=3(x+2)2+15 This process of factoring out the coefficient a can further be simplified by only factorising it out of the first 2 terms. The constant term at the end of the polynomial does not have to be included. Example: 3x2+12x+27=3[x2+4x]+27=3[(x+2)2−4]+27=3(x+2)2+3(−4)+27=3(x+2)2−12+27=3(x+2)2+15 This allows the writing of any quadratic polynomial in the form a(x−h)2+k.
Formula
Scalar case The result of completing the square may be written as a formula. In the general case, one has ax2+bx+c=a(x−h)2+k, with h=−b2aandk=c−ah2=c−b24a. In particular, when a = 1, one has x2+bx+c=(x−h)2+k, with h=−b2andk=c−h2=c−b24. By solving the equation a(x−h)2+k=0 in terms of x−h, and reorganizing the resulting expression, one gets the quadratic formula for the roots of the quadratic equation: x=−b±b2−4ac2a.
Matrix case The matrix case looks very similar: xTAx+xTb+c=(x−h)TA(x−h)+k where h=−12A−1b and k=c−14bTA−1b. Note that A has to be symmetric. If A is not symmetric the formulae for h and k have to be generalized to: h=−(A+AT)−1bandk=c−hTAh=c−bT(A+AT)−1A(A+AT)−1b
Relation to the graph
In analytic geometry, the graph of any quadratic function is a parabola in the xy-plane. Given a quadratic polynomial of the form a(x−h)2+k the numbers h and k may be interpreted as the Cartesian coordinates of the vertex (or stationary point) of the parabola. That is, h is the x-coordinate of the axis of symmetry (i.e. the axis of symmetry has equation x = h), and k is the minimum value (or maximum value, if a < 0) of the quadratic function. One way to see this is to note that the graph of the function f(x) = x2 is a parabola whose vertex is at the origin (0, 0). Therefore, the graph of the function f(x − h) = (x − h)2 is a parabola shifted to the right by h whose vertex is at (h, 0), as shown in the top figure. In contrast, the graph of the function f(x) + k = x2 + k is a parabola shifted upward by k whose vertex is at (0, k), as shown in the center figure. Combining both horizontal and vertical shifts yields f(x − h) + k = (x − h)2 + k is a parabola shifted to the right by h and upward by k whose vertex is at (h, k), as shown in the bottom figure.
Solving quadratic equations Completing the square may be used to solve any quadratic equation. For example: x2+6x+5=0. The first step is to complete the square: (x+3)2−4=0. Next we solve for the squared term: (x+3)2=4. Then either x+3=−2orx+3=2, and therefore x=−5orx=−1.This can be applied to any quadratic equation. When the x2 has a coefficient other than 1, the first step is to divide out the equation by this coefficient: for an example see the non-monic case below. [In non-monic quadratics, where a does not equal 1 for the expression ax2+bx+c, the following can be applied.] Solve for x: 5x2+x−3=0 The first step is to make a equal to 1, considering the form ax2+bx+c. We do this by dividing both sides of the equation by 5, the coefficient of x2: x2+x5−35=0 Then we complete the square. Notice that x5 is a fraction. Using the fact that (x+a)2=x2+2xa+a2, in the scenario where we do not want to change the second term 2xa, we will divide the term 2xa by two. This gives xa, which means that a=result[xa]x. Applying the same logic to this question, we can determine that the value of y within the expression (x+y)2 is equal to the second term, x5 , divided by 2x. This gives x52x=110. This also implies y2=(110)2=12102=1100. Now we can complete the square: (x+110)2−1100−35=0 (x+110)2−61100=0 Now we solve for the squared term: (x+110)2=61100 This means x+110=±61100, so: x=−1±6110 And therefore x=−1+6110 or x=−1−6110
… excerpt ends here. Continue reading the full article.




