Completing the square
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
In mathematics, completing the square is considered a basic algebraic operation, and is often applied without remark in any computation involving quadratic polynomials.
for computing the square of a binomial
:
For example:
In any perfect square, the number p is always half the coefficient
of x, and the constant term
is equal to p2.
:
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.
----
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:
it is possible to factor out the coefficient a, and then complete the square for the resulting monic polynomial.
Example:
This allows us to write any quadratic polynomial in the form
Specifically, when a=1:
, 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.
In other words, the graph of the function ƒ(x) = x2 is a parabola whose vertex is at the origin (0, 0). Therefore, the graph of the function ƒ(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 ƒ(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 ƒ(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.
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: for an example see the non-monic case below.
the equation, which is only reliable if the roots are rational
, completing the square will find the roots of a quadratic equation even when those roots are irrational
or complex
. For example, consider the equation
Completing the square gives
so
Then either
so
In terser language:
Equations with complex roots can be handled in the same way. For example:
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
where z and b are complex number
s, z* and b* are the complex conjugate
s 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
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". http://maze5.net/?page_id=467
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.
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.
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).
Elementary algebra
Elementary algebra is a fundamental and relatively basic form of algebra taught to students who are presumed to have little or no formal knowledge of mathematics beyond arithmetic. It is typically taught in secondary school under the term algebra. The major difference between algebra and...
, completing the square is a technique for converting a quadratic polynomial
Quadratic polynomial
In mathematics, a quadratic polynomial or quadratic is a polynomial of degree two, also called second-order polynomial. That means the exponents of the polynomial's variables are no larger than 2...
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 equationQuadratic equationIn mathematics, a quadratic equation is a univariate polynomial equation of the second degree. A general quadratic equation can be written in the formax^2+bx+c=0,\,...
s, - graphing quadratic functionQuadratic functionA quadratic function, in mathematics, is a polynomial function of the formf=ax^2+bx+c,\quad a \ne 0.The graph of a quadratic function is a parabola whose axis of symmetry is parallel to the y-axis....
s, - evaluating integralIntegralIntegration is an important concept in mathematics and, together with its inverse, differentiation, is one of the two main operations in calculus...
s 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.
Background
There is a simple formula in elementary algebraElementary algebra
Elementary algebra is a fundamental and relatively basic form of algebra taught to students who are presumed to have little or no formal knowledge of mathematics beyond arithmetic. It is typically taught in secondary school under the term algebra. The major difference between algebra and...
for computing the square of a binomial
Binomial
In algebra, a binomial is a polynomial with two terms —the sum of two monomials—often bound by parenthesis or brackets when operated upon...
:
For example:
In any perfect square, the number p is always half the coefficient
Coefficient
In mathematics, a coefficient is a multiplicative factor in some term of an expression ; it is usually a number, but in any case does not involve any variables of the expression...
of x, and the constant term
Constant term
In mathematics, a constant term is a term in an algebraic expression has a value that is constant or cannot change, because it does not contain any modifiable variables. For example, in the quadratic polynomialx^2 + 2x + 3,\ the 3 is a constant term....
is equal to p2.
Basic example
Consider the following quadratic polynomialPolynomial
In mathematics, a polynomial is an expression of finite length constructed from variables and constants, using only the operations of addition, subtraction, multiplication, and non-negative integer exponents...
:
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.
----
General description
Given any monic quadraticit 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:
Non-monic case
Given a quadratic polynomial of the formit is possible to factor out the coefficient a, and then complete the square for the resulting monic polynomial.
Example:
This allows us to write any quadratic polynomial in the form
Formula
The result of completing the square may be written as a formula. For the general case:Specifically, when a=1:
Relation to the graph
In analytic geometryAnalytic geometry
Analytic geometry, or analytical geometry has two different meanings in mathematics. The modern and advanced meaning refers to the geometry of analytic varieties...
, the graph of any quadratic function
Quadratic function
A quadratic function, in mathematics, is a polynomial function of the formf=ax^2+bx+c,\quad a \ne 0.The graph of a quadratic function is a parabola whose axis of symmetry is parallel to the y-axis....
is a parabola
Parabola
In mathematics, the parabola is a conic section, the intersection of a right circular conical surface and a plane parallel to a generating straight line of that surface...
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
Maxima and minima
In mathematics, the maximum and minimum of a function, known collectively as extrema , are the largest and smallest value that the function takes at a point either within a given neighborhood or on the function domain in its entirety .More generally, the...
(or maximum value, if a < 0) of the quadratic function.
In other words, the graph of the function ƒ(x) = x2 is a parabola whose vertex is at the origin (0, 0). Therefore, the graph of the function ƒ(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 ƒ(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 ƒ(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: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: for an example see the non-monic case below.
Irrational and complex roots
Unlike methods involving factoringFactorization
In mathematics, factorization or factoring is the decomposition of an object into a product of other objects, or factors, which when multiplied together give the original...
the equation, which is only reliable if the roots are rational
Rational number
In mathematics, a rational number is any number that can be expressed as the quotient or fraction a/b of two integers, with the denominator b not equal to zero. Since b may be equal to 1, every integer is a rational number...
, completing the square will find the roots of a quadratic equation even when those roots are irrational
Irrational number
In mathematics, an irrational number is any real number that cannot be expressed as a ratio a/b, where a and b are integers, with b non-zero, and is therefore not a rational number....
or complex
Complex number
A complex number is a number consisting of a real part and an imaginary part. Complex numbers extend the idea of the one-dimensional number line to the two-dimensional complex plane by using the number line for the real part and adding a vertical axis to plot the imaginary part...
. For example, consider the equation
Completing the square gives
so
Then either
so
In terser language:
Equations with complex roots can be handled in the same way. For example:
Non-monic case
For an equation involving a non-monic quadratic, the first step to solving them is to divide through by the coefficient of x2. For example:Integration
Completing the square may be used to evaluate any integral of the formusing the basic integrals
For example, consider the integral
Completing the square in the denominator gives:
This can now be evaluated by using the substitution
Integration by substitution
In calculus, integration by substitution is a method for finding antiderivatives and integrals. Using the fundamental theorem of calculus often requires finding an antiderivative. For this and other reasons, integration by substitution is an important tool for mathematicians...
u = x + 3, which yields
Complex numbers
Consider the expressionwhere z and b are complex number
Complex number
A complex number is a number consisting of a real part and an imaginary part. Complex numbers extend the idea of the one-dimensional number line to the two-dimensional complex plane by using the number line for the real part and adding a vertical axis to plot the imaginary part...
s, z* and b* are the complex conjugate
Complex conjugate
In mathematics, complex conjugates are a pair of complex numbers, both having the same real part, but with imaginary parts of equal magnitude and opposite signs...
s of z and b, respectively, and c is a real number
Real number
In mathematics, a real number is a value that represents a quantity along a continuum, such as -5 , 4/3 , 8.6 , √2 and π...
. 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
Absolute value
In mathematics, the absolute value |a| of a real number a is the numerical value of a without regard to its sign. So, for example, the absolute value of 3 is 3, and the absolute value of -3 is also 3...
of a complex number. Define
Then
so
Geometric perspective
Consider completing the square for the equationSince 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". http://maze5.net/?page_id=467
A variation on the technique
As conventionally taught, completing the square consists of adding the third term, v 2 toto get a square. There are also cases in which one can add the middle term, either 2uv or −2uv, to
to get a square.
Example: the sum of a positive number and its reciprocal
By writingwe 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.
Example: factoring a simple quartic polynomial
Consider the problem of factoring the polynomialThis 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).