Section 11.2 Completing the Square
In this section, we will learn how to âcomplete the squareâ with a quadratic expression. This topic is very useful for solving quadratic equations and putting quadratic functions in vertex form.
Subsection 11.2.1 Solving Quadratic Equations by Completing the Square
When we have an equation like \((x+5)^2=4\text{,}\) we can solve it quickly using the square root property:
The method of completing the square allows us to solve any quadratic equation using the square root property. The challenge is that most quadratic equations don't come with a perfect square already on one side. Let's explore how to do this by looking at some perfect square trinomials to see the pattern.
There is an important pattern here. Notice that with each middle coefficient on the right, you may cut it in half to get the constant term in the binomial on the left side. And then you may square that number to get the constant term back on the right side. Mathematically, this says:
We will use this fact to make perfect square trinomials.
Fact 11.2.1. The Term that Completes the Square.
For a polynomial \(x^2+bx\text{,}\) the constant term needed to make a perfect square trinomial is \(\left(\frac{b}{2}\right)^2\text{.}\)
Example 11.2.2.
Solve the quadratic equation \(x^2+6x=16\) by completing the square.
To solve the quadratic equation \(x^2+6x=16\text{,}\) on the left side we can complete the square by adding \(\left(\frac{b}{2}\right)^2\text{;}\) note that \(b=6\) in this case, which makes \(\left(\frac{b}{2}\right)^2=\left(\frac{6}{2}\right)^2=3^2=9\text{.}\) We add it to both sides to maintain equality.
Now that we have completed the square, we can solve the equation using the square root property.
The solution set is \(\{-8, 2\}\text{.}\)
Now let's see the process for completing the square when the quadratic equation is given in standard form.
Example 11.2.3.
Solve \(x^2-14x+11=0\) by completing the square.
We will solve \(x^2-14x+11=0\text{.}\) We see that the polynomial on the left side is not a perfect square trinomial, so we need to complete the square. We subtract \(11\) from both sides so we can add the missing term on the left.
Next comes the completing-the-square step. We need to add the correct number to both sides of the equation to make the left side a perfect square. Remember that Fact 11.2.1 states that we need to use \(\left(\frac{b}{2}\right)^2\) for this. In our case, \(b=-14\text{,}\) so \(\left(\frac{b}{2}\right)^2=\left(\frac{-14}{2}\right)^2=49\)
The solution set is \(\{7-\sqrt{38}, 7+\sqrt{38}\}\text{.}\)
Here are some more examples.
Example 11.2.4.
Complete the square to solve for \(y\) in \(y^2-20y-21=0\text{.}\)
To complete the square, we will first move the constant term to the right side of the equation. Then we will use Fact 11.2.1 to find \(\left(\frac{b}{2}\right)^2\) to add to both sides.
In our case, \(b=-20\text{,}\) so \(\left(\frac{b}{2}\right)^2=\left(\frac{-20}{2}\right)^2=100\)
The solution set is \(\{-1, 21\}\text{.}\)
So far, the value of \(b\) has been even each time, which makes \(\frac{b}{2}\) a whole number. When \(b\) is odd, we will end up adding a fraction to both sides. Here is an example.
Example 11.2.5.
Complete the square to solve for \(z\) in \(z^2-3z-10=0\text{.}\)
We will first move the constant term to the right side of the equation:
Next, to complete the square, we will need to find the right number to add to both sides. According to Fact 11.2.1, we need to divide the value of \(b\) by \(2\) and then square the result to find the right number. First, divide by \(2\text{:}\)
and then we square that result:
Now we can add the \(\frac{9}{4}\) from Equation (11.2.2) to both sides of the equation to complete the square.
Now, to factor the seemingly complicated expression on the left, just know that it should always factor using the number from the first step in the completing the square process, Equation (11.2.1).
The solution set is \(\{-2,5\}\text{.}\)
In each of the previous examples, the value of \(a\) was equal to \(1\text{.}\) This is necessary for our missing term formula to work. When \(a\) is not equal to \(1\) we will divide both sides by \(a\text{.}\) Let's look at an example of that.
Example 11.2.6.
Solve for \(r\) in \(2r^2+2r=3\) by completing the square.
Because there is a leading coefficient of \(2\text{,}\) we will divide both sides by \(2\text{.}\)
Next, we will complete the square. Since \(b=1\text{,}\) first,
and next, squaring that, we have
So we will add \(\frac{1}{4}\) from Equation (11.2.4) to both sides of the equation:
Here, remember that we always factor with the number found in the first step of completing the square, Equation (11.2.3).
The solution set is \(\left\{\frac{-1-\sqrt{7}}{2}, \frac{-1+\sqrt{7}}{2}\right\}\)
Subsection 11.2.2 Deriving the Vertex Formula and the Quadratic Formula by Completing the Square
In Section 9.6, we learned a formula to find the vertex. In Section 9.3, we learned the Quadratic Formula. You may have wondered where they came from, and now that we know how to complete the square, we can derive them. We will solve the standard form equation \(ax^2+bx+c=0\) for \(x\text{.}\)
First, we subtract \(c\) from both sides and divide both sides by \(a\text{.}\)
Next, we will complete the square by taking half of the middle coefficient and squaring it. First,
and then squaring that we have
We add the \(\frac{b^2}{4a^2}\) from Equation (11.2.6) to both sides of the equation:
Remember that the left side always factors with the value we found in the first step of the completing the square process from Equation (11.2.5). So we have:
To find a common denominator on the right, we multiply by \(4a\) in the numerator and denominator on the second term.
Now that we have completed the square, we can see that the \(x\)-value of the vertex is \(-\frac{b}{2a}\text{.}\) That is the vertex formula. Next, we will solve the equation using the square root property to find the Quadratic Formula.
This shows us that the solutions to the equation \(ax^2+bx+c=0\) are \(\frac{-b\pm\sqrt{b^2-4ac}}{2a}\text{.}\)
Subsection 11.2.3 Putting Quadratic Functions in Vertex Form
In Section 11.1, we learned about the vertex form of a parabola, which allows us to quickly read the coordinates of the vertex. We can now use the method of completing the square to put a quadratic function in vertex form. Completing the square with a function is a little different than with an equation so we will start with an example.
Example 11.2.7.
Write a formula in vertex form for the function \(q\) defined by \(q(x)=x^2+8x\)
The formula is in the form \(x^2+bx\text{,}\) so we will need to add \(\left(\frac{b}{2}\right)^2\) to complete the square by Fact 11.2.1. When we had an equation, we could add the same quantity to both sides. But now we do not wish to change the left side, since we are trying to end up with a formula that still says \(q(x)=\ldots\text{.}\) Instead, we will add and subtract the term from the right side in order to maintain equality. In this case,
To maintain equality, we will both add and subtract \(16\) on the same side of the equation. It is functionally the same as adding \(0\) on the right, but the \(16\) makes it possible to factor the expression in a particular way:
Now that we have completed the square, our function is in vertex form. The vertex is \((-4,-16)\text{.}\) One way to verify that our work is correct is to graph the original version of the function and check that the vertex is where it should be.
Let's look at a function that has a constant term and see how to complete the square.
Example 11.2.9.
Write a formula in vertex form for the function \(f\) defined by \(f(x)=x^2-12x+3\)
To complete the square, we need to add and subtract \(\left(-\frac{12}{2}\right)^2=(-6)^2=36\) on the right side.
The vertex is \((6,-33)\text{.}\)
In the first two examples, \(a\) was equal to \(1\text{.}\) When \(a\) is not equal to one, we have an additional step. Since we are working with an expression where we intend to preserve the left side as \(f(x)=\ldots\text{,}\) we cannot divide both sides by \(a\text{.}\) Instead we will factor \(a\) out of the first two terms. Let's look at an example of that.
Example 11.2.10.
Write a formula in vertex form for the function \(g\) defined by \(g(x)=5x^2+20x+25\)
Before we can complete the square, we will factor the \(\highlight{5}\) out of the first two terms.
Now we will complete the square inside the parentheses by adding and subtracting \(\left(\frac{4}{2}\right)^2=2^2=4\text{.}\)
Notice that the constant that we subtracted is inside the parentheses, but it will not be part of our perfect square trinomial. In order to bring it outside, we need to multiply it by \(5\text{.}\) We are distributing the \(5\) to that term so we can combine it with the outside term.
The vertex is \((-2,5)\text{.}\)
Here is an example that includes fractions.
Example 11.2.11.
Write a formula in vertex form for the function \(h\) defined by \(h(x)=-3x^2-4x-\frac{7}{4}\)
First, we will factor the leading coefficient out of the first two terms.
Next, we will complete the square for \(x^2+\frac{4}{3}x\) inside the grouping symbols by adding and subtracting the right number. To find that number, we divide the value of \(b\) by two and square the result. That looks like:
and then,
Adding and subtracting the value from Equation (11.2.8), we have:
Remember that when completing the square, the expression should always factor with the number found in the first step of the completing-the-square process, Equation (11.2.7).
\begin{align*} \amp=-3\highlight{\left(\unhighlight{x+\frac{2}{3}}\right)^2}+\frac{4}{3}-\frac{7}{4}\\ \amp=-3\left(x+\frac{2}{3}\right)^2+\frac{16}{12}-\frac{21}{12}\\ \amp=-3\left(x+\frac{2}{3}\right)^2-\frac{5}{12} \end{align*}The vertex is \(\left(-\frac{2}{3},-\frac{5}{12}\right)\text{.}\)
Completing the square can also be used to find a minimum or maximum in an application.
Example 11.2.12.
In Example 6.5.18, we learned that artist Tyrone's annual income from paintings can be modeled by \(I(x)=-100x^2+1000x+20000\text{,}\) where \(x\) is the number of times he will raise the price per painting by \(\$20.00\text{.}\) To maximize his income, how should Tyrone set his price per painting? Find the maximum by completing the square.
To find the maximum is essentially the same as finding the vertex, which we can find by completing the square. To complete the square for \(I(x)=-100x^2+1000x+20000\text{,}\) we start by factoring out the \(-100\) from the first two terms:
Next, we will complete the square for \(x^2-10x\) by adding and subtracting \(\left(-\frac{10}{2}\right)^2=(-5)^2=\highlight{25}\text{.}\)
\begin{align*} I(x)\amp=-100\left(x^2-10x\addright{25}\subtractright{25}\right)+20000\\ \amp=-100\left(\highlight{\left(\unhighlight{x^2-10x+25}\right)}-25\right)+20000\\ \amp=-100\highlight{\left(\unhighlight{x^2-10x+25}\right)}-\left(100\cdot-25\right)+20000\\ \amp=-100(x-5)^2+2500+20000\\ \amp=-100(x-5)^2+22500 \end{align*}The vertex is the point \((5,22500)\text{.}\) This implies Tyrone should raise the price per painting \(\substitute{5}\) times, which is \(\substitute{5}\cdot20=100\) dollars. He would sell \(100-5(\substitute{5})=75\) paintings. This would make the price per painting \(200+100=300\) dollars, and his annual income from paintings would become \(\$22500\) by this model.
Subsection 11.2.4 Graphing Quadratic Functions by Hand
Now that we know how to put a quadratic function in vertex form, let's review how to graph a parabola by hand.
Example 11.2.13.
Graph the function \(h\) defined by \(h(x)=2x^2+4x-6\) by determining its key features algebraically.
To start, we'll note that this function opens upward because the leading coefficient, \(2\text{,}\) is positive.
Now we will complete the square to find the vertex. We will factor the \(2\) out of the first two terms, and then add and subtract \(\left(\frac{2}{2}\right)^2=1^2=\highlight{1}\) on the right side.
The vertex is \((-1,-8)\) so the axis of symmetry is the line \(x=-1\text{.}\)
To find the \(y\)-intercept, we'll replace \(x\) with \(0\) or read the value of \(c\) from the function in standard form:
The \(y\)-intercept is \((0,-6)\) and we will find its symmetric point on the graph, which is \((-2,-6)\text{.}\)
Next, we'll find the horizontal intercepts. We see this function factors so we will write the factored form to get the horizontal intercepts.
The \(x\)-intercepts are \((1,0)\) and \((-3,0)\text{.}\)
Now we will plot all of the key points and draw the parabola.
Example 11.2.15.
Write a formula in vertex form for the function \(p\) defined by \(p(x)=-x^2-4x-1\text{,}\) and find the graph's key features algebraically. Then sketch the graph.
In this function, the leading coefficient is negative so it will open downward. To complete the square we first factor \(-1\) out of the first two terms.
Now, we add and subtract the correct number on the right side of the function: \(\left(\frac{b}{2}\right)^2=\left(\frac{4}{2}\right)^2=2^2=\highlight{4}\text{.}\)
The vertex is \((-2,3)\) so the axis of symmetry is the line \(x=-2\text{.}\)
We find the \(y\)-intercept by looking at the value of \(c\text{,}\) which is \(-1\text{.}\) So, the \(y\)-intercept is \((0,-1)\) and we will find its symmetric point on the graph, \((-4,-1)\text{.}\)
The original expression, \(-x^2-4x-1\text{,}\) does not factor so to find the \(x\)-intercepts we need to set \(p(x)=0\) and complete the square or use the quadratic formula. Since we just went through the process of completing the square above, we can use that result to save several repetitive steps.
The \(x\)-intercepts are approximately \((-3.7,0)\) and \((-0.3,0)\text{.}\) Now we can plot all of the points and draw the parabola.
Exercises 11.2.5 Exercises
Review and Warmup
1.
Use a square root to solve \({\left(x-5\right)^{2}}={36}\text{.}\)
2.
Use a square root to solve \({\left(y+7\right)^{2}}={81}\text{.}\)
3.
Use a square root to solve \({\left(6y-2\right)^{2}}={9}\text{.}\)
4.
Use a square root to solve \({\left(3r+6\right)^{2}}={81}\text{.}\)
5.
Use a square root to solve \({\left(r+6\right)^{2}}={5}\text{.}\)
6.
Use a square root to solve \({\left(t+3\right)^{2}}={7}\text{.}\)
7.
Use a square root to solve \({t^{2}-14t+49}={4}\text{.}\)
8.
Use a square root to solve \({t^{2}+12t+36}={25}\text{.}\)
9.
Use a square root to solve \({25x^{2}+80x+64}={36}\text{.}\)
10.
Use a square root to solve \({4x^{2}-12x+9}={9}\text{.}\)
11.
Use a square root to solve \({64y^{2}+80y+25}={19}\text{.}\)
12.
Use a square root to solve \({25y^{2}-70y+49}={14}\text{.}\)
Completing the Square to Solve Equations
13.
Solve the equation by completing the square.
\({r^{2}-2r}={8}\)
14.
Solve the equation by completing the square.
\({r^{2}+6r}={7}\)
15.
Solve the equation by completing the square.
\({t^{2}+5t}={-6}\)
16.
Solve the equation by completing the square.
\({t^{2}+3t}={54}\)
17.
Solve the equation by completing the square.
\({t^{2}+4t}={3}\)
18.
Solve the equation by completing the square.
\({x^{2}-10x}={2}\)
19.
Solve the equation by completing the square.
\({x^{2}-4x-5}={0}\)
20.
Solve the equation by completing the square.
\({y^{2}+8y+12}={0}\)
21.
Solve the equation by completing the square.
\({y^{2}+7y+6}={0}\)
22.
Solve the equation by completing the square.
\({r^{2}-5r-24}={0}\)
23.
Solve the equation by completing the square.
\({r^{2}+4r-2}={0}\)
24.
Solve the equation by completing the square.
\({t^{2}-6t-7}={0}\)
25.
Solve the equation by completing the square.
\({12t^{2}+28t+15}={0}\)
26.
Solve the equation by completing the square.
\({12t^{2}+44t+35}={0}\)
27.
Solve the equation by completing the square.
\({2x^{2}-6x-1}={0}\)
28.
Solve the equation by completing the square.
\({2x^{2}+7x+4}={0}\)
Converting to Vertex Form
29.
Consider \(h(y)={y^{2}-4y+5}\text{.}\)
-
Give the formula for \(h\) in vertex form.
Use function notation with your answer.
What is the vertex of the parabola graph of \(h\text{?}\)
30.
Consider \(h(x)={x^{2}+2x+2}\text{.}\)
-
Give the formula for \(h\) in vertex form.
Use function notation with your answer.
What is the vertex of the parabola graph of \(h\text{?}\)
31.
Consider \(F(t)={t^{2}-9t-1}\text{.}\)
-
Give the formula for \(F\) in vertex form.
Use function notation with your answer.
What is the vertex of the parabola graph of \(F\text{?}\)
32.
Consider \(G(y)={y^{2}-y-4}\text{.}\)
-
Give the formula for \(G\) in vertex form.
Use function notation with your answer.
What is the vertex of the parabola graph of \(G\text{?}\)
33.
Consider \(H(x)={9x^{2}+63x-2}\text{.}\)
-
Give the formula for \(H\) in vertex form.
Use function notation with your answer.
What is the vertex of the parabola graph of \(H\text{?}\)
34.
Consider \(K(t)={4t^{2}+8t-2}\text{.}\)
-
Give the formula for \(K\) in vertex form.
Use function notation with your answer.
What is the vertex of the parabola graph of \(K\text{?}\)
Domain and Range
35.
Complete the square to convert the quadratic function from standard form to vertex form, and use the result to find the functionâs domain and range.
\(f(x) = {x^{2}-20x+98}\)
The domain of \(f\) is
The range of \(f\) is
36.
Complete the square to convert the quadratic function from standard form to vertex form, and use the result to find the functionâs domain and range.
\(f(x) = {x^{2}+18x+72}\)
The domain of \(f\) is
The range of \(f\) is
37.
Complete the square to convert the quadratic function from standard form to vertex form, and use the result to find the functionâs domain and range.
\(f(x) = {-x^{2}-12x-32}\)
The domain of \(f\) is
The range of \(f\) is
38.
Complete the square to convert the quadratic function from standard form to vertex form, and use the result to find the functionâs domain and range.
\(f(x) = {-x^{2}-8x-19}\)
The domain of \(f\) is
The range of \(f\) is
39.
Complete the square to convert the quadratic function from standard form to vertex form, and use the result to find the functionâs domain and range.
\(f(x) = {3x^{2}+12x+2}\)
The domain of \(f\) is
The range of \(f\) is
40.
Complete the square to convert the quadratic function from standard form to vertex form, and use the result to find the functionâs domain and range.
\(f(x) = {5x^{2}-10x+9}\)
The domain of \(f\) is
The range of \(f\) is
41.
Complete the square to convert the quadratic function from standard form to vertex form, and use the result to find the functionâs domain and range.
\(f(x) = {-2x^{2}+12x-22}\)
The domain of \(f\) is
The range of \(f\) is
42.
Complete the square to convert the quadratic function from standard form to vertex form, and use the result to find the functionâs domain and range.
\(f(x) = {-4x^{2}+40x-90}\)
The domain of \(f\) is
The range of \(f\) is
Sketching Graphs of Quadratic Functions
Graph each function by algebraically determining its key features. Then state the domain and range of the function.
43.
\(f(x)=x^2-7x+12\)
44.
\(f(x)=x^2+5x-14\)
45.
\(f(x)=-x^2-x+20\)
46.
\(f(x)=-x^2+4x+21\)
47.
\(f(x)=x^2-8x+16\)
48.
\(f(x)=x^2+6x+9\)
49.
\(f(x)=x^2-4\)
50.
\(f(x)=x^2-9\)
51.
\(f(x)=x^2+6x\)
52.
\(f(x)=x^2-8x\)
53.
\(f(x)=-x^2+5x\)
54.
\(f(x)=-x^2+16\)
55.
\(f(x)=x^2+4x+7\)
56.
\(f(x)=x^2-2x+6\)
57.
\(f(x)=x^2+2x-5\)
58.
\(f(x)=x^2-6x+2\)
59.
\(f(x)=-x^2+4x-1\)
60.
\(f(x)=-x^2-x+3\)
61.
\(f(x)=2x^2-4x-30\)
62.
\(f(x)=3x^2+21x+36\)
Information from Vertex Form
63.
Find the minimum value of the function
64.
Find the minimum value of the function
65.
Find the maximum value of the function
66.
Find the maximum value of the function
67.
Find the range of the function
68.
Find the range of the function
69.
Find the range of the function
70.
Find the range of the function
71.
If a ball is throw straight up with a speed of \(65\ {\textstyle\frac{\rm\mathstrut ft}{\rm\mathstrut s}}\text{,}\) its height at time \(t\) (in seconds) is given by
Find the maximum height the ball reaches.
72.
If a ball is throw straight up with a speed of \(67\ {\textstyle\frac{\rm\mathstrut ft}{\rm\mathstrut s}}\text{,}\) its height at time \(t\) (in seconds) is given by
Find the maximum height the ball reaches.
Challenge
73.
Let \(f(x) = x^{2}+bx+c\text{.}\) Let \(b\) and \(c\) be real numbers. Complete the square to find the vertex of \(f(x) = x^{2}+bx+c\text{.}\) Write \(f(x)\) in vertex form and then state the vertex.