In this section, we will learn how to βcomplete the squareβ with a quadratic expression. This topic is useful for solving quadratic equations and putting quadratic functions in vertex form.
The βmissingβ square in the upper right corner of FigureΒ 2 is \(\frac{b}{2}\) on each side, so its area is \(\left(\frac{b}{2}\right)^2\text{.}\) This means that if we have \(x^2+bx\) and add \(\left(\frac{b}{2}\right)^2\text{,}\) we are βcompletingβ the larger square.
For a quadratic equation simplified to the form \(x^2+bx=c\text{,}\) to solve for \(x\) by completing the square,
Use FactΒ 3 to find the number to add to both sides of the equation to make the left hand side a perfect square. This number is always \(\highlight{\left(\frac{b}{2}\right)^2}\text{.}\)
The left hand side is now a perfect square that factors as \(x^2+bx+\left(\frac{b}{2}\right)^2=\left(x+\frac{b}{2}\right)^2\text{,}\) so the equation becomes
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.
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Β 3 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\)
To complete the square, first move the constant term to the right side of the equation. Then use FactΒ 3 to find \(\left(\frac{b}{2}\right)^2\) to add to both sides.
So far, the value of \(b\) has been even each time, which makes \(\frac{b}{2}\) a whole number. When \(b\) is odd, we end up adding a fraction to both sides. Here is an example.
Next, to complete the square, we need to find the right number to add to both sides. According to FactΒ 3, 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{:}\)
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Β (2.10.1).
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.
Subsection2.10.2Deriving the Quadratic Formula by Completing the Square
In SectionΒ 6, we learned the Quadratic Formula. You may have wondered where the formula comes from, and now that we know how to complete the square, we can derive it. We will solve the standard form equation \(ax^2+bx+c=0\) for \(x\text{.}\)
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 solve the equation using the square root property to find the Quadratic Formula.
Subsection2.10.3Putting Quadratic Functions in Vertex Form
In SectionΒ 9, 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.
The formula is in the form \(x^2+bx\text{,}\) so we need to add \(\left(\frac{b}{2}\right)^2\) to complete the square by FactΒ 3. 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 add and subtract the term from the right side in order to maintain equality. In this case,
To maintain equality, we 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.
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 factor \(a\) out of the first two terms. Letβs look at an example of that.
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.
Next, we 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:
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Β (2.10.7).
In ExampleΒ A.8.15, 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. 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:
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 $22,500 by this model.
Now we may complete the square to find the vertex. We 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.
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{.}\)
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 can 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.
If a ball is throw straight up with a speed of \(55\ {\textstyle\frac{\rm\mathstrut ft}{\rm\mathstrut s}}\text{,}\) its height at time \(t\) (in seconds) is given by
If a ball is throw straight up with a speed of \(57\ {\textstyle\frac{\rm\mathstrut ft}{\rm\mathstrut s}}\text{,}\) its height at time \(t\) (in seconds) is given by
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.