Completing the square
From Wikipedia, the free encyclopedia
In elementary algebra, completing the square is a technique for converting a quadratic polynomial of the form
to the form
In this context, "constant" means not depending on x. The expression inside the parenthesis is of the form (x − constant). Thus one converts ax2 + bx + c to
and one must find h and k.
Completing the square is used in
- solving quadratic equations,
- graphing quadratic functions,
- evaluating integrals in calculus,
- finding Laplace transforms.
In mathematics, completing the square is considered a basic algebraic operation, and is often applied without remark in any computation involving quadratic polynomials.
Contents |
[edit] Overview
[edit] Background
There is a simple formula in elementary algebra for computing the square of a binomial:
For example:
In any perfect square, the number p is always half the coefficient of x, and then the constant term is equal to p2.
[edit] Basic example
Consider the following quadratic polynomial:
This quadratic is not a perfect square, since 28 is not the square of 5:
However, it is possible to write the original quadratic as the sum of this square and a constant:
This is called completing the square.
[edit] General description
Given any quadratic of the form
it is possible to form a square that has the same first two terms:
This square differs from the original quadratic only in the value of the constant term. Therefore, we can write
where k is a constant. This operation is known as completing the square. For example:
[edit] Non-monic case
Given a quadratic polynomial of the form
it possible to factor out the coefficient a, and then complete the square for the resulting monic polynomial. For example:
This allows us to write any quadratic polynomial in the form
[edit] Formula
The result of completing the square may be written as a formula. Specifically,
For the general case:
[edit] Relation to the graph
| This section requires expansion. |
In analytic geometry, the graph of any quadratic function is a parabola in the xy-plane. Given a quadratic polynomial of the form
the numbers h and k may be interpreted as the Cartesian coordinates of the vertex of the parabola. That is, h is the x-coordinate of the axis of symmetry, and k is the minimum value (or maximum value, if a < 0) of the quadratic function.
[edit] Solving quadratic equations
Completing the square may be used to solve any quadratic equation. Given a quadratic equation
the first step is to complete the square:
Next we solve for the squared term:
Then either
and therefore
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.) Indeed, this method can be used to derive the quadratic formula for the roots of a general quadratic polynomial (see Quadratic equation#Derivation).
[edit] Irrational roots
Unlike methods involving factoring the constant term, completing the square will find the roots of a quadratic equation even when those roots are irrational. For example, consider the equation
Completing the square gives
so
Then either
and therefore
[edit] Complex roots
Completing the square can also find roots of a quadratic equation that are complex numbers:
[edit] Non-monic case
For an equation involving a non-monic quadratic, simply start by dividing through by the coefficient of x2. For example:
[edit] Other applications
[edit] Integration
Completing the square may be used to evaluate any integral of the form
using the basic integrals
For example, consider the integral
Completing the square in the denominator gives:
This can now be evaluated by using the substitution u = x + 3, which yields
[edit] Complex numbers
Consider the expression
where z and b are complex numbers, z* and b* are the complex conjugates of z and b, respectively, and c is a real number. Using the identity |u|2 = uu* we can rewrite this as
which is clearly a real quantity. This is because
As another example, the expression
where a, b, c, x, and y are real numbers, with a > 0 and b > 0, may be expressed in terms of the square of the absolute value of a complex number. Define
Then
so
[edit] Geometric perspective
Consider completing the square for the equation
Since x2 represents the area of a square with side of length x, and bx represents the area of a rectangle with sides b and x, the process of completing the square can be viewed as visual manipulation of rectangles.
Simple attempts to combine the x2 and the bx rectangles into a larger square result in a missing corner. The term (b/2)2 added to each side of the above equation is precisely the area of the missing corner, whence derives the terminology "completing the square". [1]
[edit] A variation on the technique
As conventionally taught, completing the square consists of adding the third term, v 2 to
to get a square. There are also cases in which one can add the middle term, either 2uv or −2uv, to
to get a square.
[edit] Example: the sum of a positive number and its reciprocal
By writing
we show that the sum of a positive number x and its reciprocal is always greater than or equal to 2. The square of a real expression is always greater than or equal to zero, which gives the stated bound; and here we achieve 2 just when x is 1, causing the square to vanish.
[edit] Example: factoring a simple quartic polynomial
Consider the problem of factoring the polynomial
This is
so the middle term is 2(x2)(18) = 36x2. Thus we get
(the last line being added merely to follow the convention of decreasing degrees of terms).




![\begin{alignat}{2}
(x+3)^2 \,&=\, x^2 + 6x + 9 && (p=3)\\[3pt]
(x-5)^2 \,&=\, x^2 - 10x + 25\qquad && (p=-5).
\end{alignat}](http://upload.wikimedia.org/math/1/4/6/146b17914932579724035c471f364829.png)






![\begin{alignat}{1}
x^2 + 6x + 11 \,&=\, (x+3)^2 + 2 \\[3pt]
x^2 + 14x + 30 \,&=\, (x+7)^2 - 19 \\[3pt]
x^2 - 2x + 7 \,&=\, (x-1)^2 + 6.
\end{alignat}](http://upload.wikimedia.org/math/4/0/a/40ae53053680564f116c71828dc0461c.png)















![\begin{array}{c}
x^2 + 4x + 5 \,=\, 0 \\[6pt]
(x+2)^2 + 1 \,=\, 0 \\[6pt]
(x+2)^2 \,=\, -1 \\[6pt]
x+2 \,=\, \pm i \\[6pt]
x \,=\, -2 \pm i
\end{array}](http://upload.wikimedia.org/math/2/0/f/20f75a39f7d2160a09b18e646e330eda.png)
![\begin{array}{c}
2x^2 + 7x + 6 \,=\, 0 \\[6pt]
x^2 + \tfrac{7}{2}x + 3 \,=\, 0 \\[6pt]
\left(x+\tfrac{7}{4}\right)^2 - \tfrac{1}{16} \,=\, 0 \\[6pt]
\left(x+\tfrac{7}{4}\right)^2 \,=\, \tfrac{1}{16} \\[6pt]
x+\tfrac{7}{4} = \tfrac{1}{4} \quad\text{or}\quad x+\tfrac{7}{4} = -\tfrac{1}{4} \\[6pt]
x = -\tfrac{3}{2} \quad\text{or}\quad x = -2
\end{array}](http://upload.wikimedia.org/math/8/e/7/8e78fe97d6191dba8b59f113ecefb976.png)




















