This implies we can solve the equation \(x^2+10x=-21\) by the square root property. The challenge is how to convert \(x^2+10x=-21\) to \((x+5)^2=4\text{.}\) The skill of completing the square can help us do this conversion.
Say we start with \(x^2+10x\) and try to convert it to a perfect square in the form of \((x+a)^2\text{.}\) This is a two-step process.
Step One: Determine the value of \(a\) in \(x^2+10x+\ldots=(x+a)^2\text{.}\) By the formula \(x^2+2ax+a^2=(x+a)^2\text{,}\) \(a\)'s value is half of \(10\text{,}\) so we have:
Step Two: Determine the missing part in \(x^2+10x+\ldots=(x+5)^2\text{.}\) By the formula \(x^2+2ax+a^2=(x+a)^2\text{,}\) the missing part is \(a^2\text{,}\) or \(5^2=25\) for \((x+5)^2\text{.}\) Now we can complete the square for \(x^2+10x\text{:}\)
Let's go back to solving \(x^2+10x=-21\text{.}\) By \(x^2+10x+25=(x+5)^2\text{,}\) we will add \(25\) on both sides of the equation, and we have:
\begin{align*}
x^2+10x\amp=-21\\
x^2+10x\addright{25}\amp=-21\addright{25}\\
(x+5)^2\amp=4\\
\sqrt{(x+5)^2}\amp=\pm\sqrt{4}\\
x+5\amp=\pm2\\
x+5=2\amp\text{ or }x+5=-2\\
x=-3\amp\text{ or }x=-7
\end{align*}
So far, we only covered one of the perfect square formulas. Sometimes we need to use the other one, \(x^2-2ax+a^2=(x-a)^2\text{,}\) like in the next example.
Example12.2.2
Use the skill of completing the square to solve for \(y\) in \(y^2-20y-21=0\text{.}\)
Step One: By \(x^2-2ax+a^2=(x-a)^2\text{,}\) we have \(z^2-3y+\ldots=(z-\frac{3}{2})^2\text{.}\)
Step Two: By \(x^2-2ax+a^2=(x-a)^2\text{,}\) we have \(z^2-3z+\frac{9}{4}=(z-\frac{3}{2})^2\text{.}\)
To solve the equation, we need to add \(\frac{9}{4}\) on both sides of the equation:
\begin{align*}
z^2-3z\amp=10\\
z^2-3z\addright{\frac{9}{4}}\amp=10\addright{\frac{9}{4}}\\
(z-\frac{3}{2})^2\amp=\frac{40}{4}+\frac{9}{4}\\
(z-\frac{3}{2})^2\amp=\frac{49}{4}\\
\sqrt{(z-\frac{3}{2})^2}\amp=\pm\sqrt{\frac{49}{4}}\\
z-\frac{3}{2}\amp=\pm\frac{7}{2}\\
z-\frac{3}{2}=\frac{7}{2}\amp\text{ or }z-\frac{3}{2}=-\frac{7}{2}\\
z=\frac{7}{2}+\frac{3}{2}\amp\text{ or }z=-\frac{7}{2}+\frac{3}{2}\\
z=5\amp\text{ or }z=-2
\end{align*}
When there is a coefficient for \(x^2\text{,}\) like \(2x^2+6x\text{,}\) we need to remove it before completing the square. Let's look at the next example.
Example12.2.4
Use the skill of completing the square to solve for \(r\) in \(2r^2+2r=1\text{.}\)
Step One: By \(x^2+2ax+a^2=(x+a)^2\text{,}\) we have \(r^2+r+\ldots=(r+\frac{1}{2})^2\text{.}\)
Step Two: By \(x^2+2ax+a^2=(x+a)^2\text{,}\) we have \(r^2+r+\frac{1}{4}=(r+\frac{1}{2})^2\text{.}\)
To solve the equation, we need to add \(\frac{1}{4}\) on both sides of the equation:
\begin{align*}
r^2+r\amp=\frac{1}{2}\\
r^2+r\addright{\frac{1}{4}}\amp=\frac{1}{2}\addright{\frac{1}{4}}\\
(r+\frac{1}{2})^2\amp=\frac{2}{4}+\frac{1}{4}\\
(r+\frac{1}{2})^2\amp=\frac{3}{4}\\
\sqrt{(r+\frac{1}{2})^2}\amp=\pm\sqrt{\frac{3}{4}}\\
r+\frac{1}{2}\amp=\pm\frac{\sqrt{3}}{2}\\
r+\frac{1}{2}=\frac{\sqrt{3}}{2}\amp\text{ or }r+\frac{1}{2}=-\frac{\sqrt{3}}{2}\\
r=\frac{\sqrt{3}}{2}-\frac{1}{2}\amp\text{ or }r=-\frac{\sqrt{3}}{2}-\frac{1}{2}\\
r=\frac{\sqrt{3}-1}{2}\amp\text{ or }r=\frac{-\sqrt{3}-1}{2}
\end{align*}
Subsection12.2.2Quadratic Function in Vertex Form
We have learned the standard form of quadratic functions:
\begin{equation*}
f(x)=ax^2+bx+c
\end{equation*}
In this subsection, we will learn the vertex form:
\begin{equation*}
f(x)=a(x-h)^2+k
\end{equation*}
Figure12.2.5Alternative Video Lesson
A quadratic function's vertex represents the function's maximum or minimum value, which is often of interest. The next example reviews how to locate the vertex.
Example12.2.6
In Example 6.3.24, we learned artist Michael's annual income from paintings can be modeled by \(f(x)=-10x^2+150x+1000\text{,}\) where \(x\) is the number of times he will raise the price per painting by $\(2.00\text{.}\) To maximize his income, how should Michael set his price per painting?
Since a parabola's vertex is on its axis, the vertex is at \((7.5,y)\text{.}\) To find the missing \(y\) value, we substitute \(x=7.5\) into \(f(x)\text{,}\) and we have:
The parabola's vertex is at \((7.5,1562.5)\text{.}\) This implies Michael should raise the price per painting \(7.5\) times, or by \(7.5\cdot2=15\) dollars. This would make the price per painting \(10+15=25\) dollars, and his annual income from paintings would become $\(1562.50\) by this math model.
With graphing technology, we can double check the maximum value of the function \(f(x)=-10x^2+150x+1000\text{.}\)
Figure12.2.7Graph of \(f(x)=-10x^2+150x+1000\)
It would be great if we can convert the function \(f(x)=-10x^2+150x+1000\) to a form such that we can easily tell the parabola's vertex. We will use the skill of completing the square to convert the function from standard form to vertex form.
There is a leading coefficient, \(-10\text{.}\) When we solve the equation in Example 12.2.4, we removed the leading coefficient. Let's try to use the same skill:
When we write the function \(f(x)\text{,}\) we cannot write the left side as \(-\frac{1}{10}f(x)\text{.}\) This skill doesn't help us here, but it worked for the equation in Example 12.2.4 because the other side of the equation is \(0\text{.}\)
To complete the square for \(f(x)=-10x^2+150x+1000\text{,}\) we cannot remove \(-10\text{;}\) instead, we have to factor it out:
This is again different from what we did earlier. When we solved the equation in Example 12.2.2, we added a number on both sides of the equation. Here, we cannot do that since \(x^2-15x\) is inside a pair of parentheses. We have to add \(56.25\) because we need it to complete the square, but we must immediately subtract it to keep the function's value unchanged. In other words, we cannot "throw in" a number into a function simply because we need it.
The full process of completing the square for \(f(x)\) is:
This is why it's easy to tell the vertex of \(f(x)=-10(x-7.5)^2+1562.5\) is \((7.5,1562.5)\text{.}\) We call this form the vertex form of a quadratic function. In general, it looks like
\begin{equation*}
f(x)=a(x-h)^2+k
\end{equation*}
and the parabola's vertex is at \((h,k)\text{.}\)
You might wonder why \((7.5,1562.5)\) must be the parabola's vertex, instead of a different point on the parabola. This can be explained by the function's range. We know the square of a number must be positive or zero, so we have:
For \(f(x)=a(x-h)^2+k\text{,}\) the vertex is \((h,k)\text{.}\)
For \(p(x)=-(x+2)^2+3\text{,}\) the vertex is \((-2,3)\text{.}\) We can quickly verify this by substituting \(x=-2\) into \(p(x)\text{,}\) and we have:
If we made a mistake and said the vertex is \((2,3)\text{,}\) we can easily detect it once we substitute \(x=2\) into \(p(x)\text{,}\) as we would not get \(p(2)=3\text{.}\)
Once we find the vertex, we need at least one more point to sketch the parabola. An easy point to find is its \(y\)-intercept. We will substitute \(x=0\) into the function, and we have:
According to the graph, the parabola's vertex is at \((3,-1)\text{.}\) The function's formula must be \(f(x)=a(x-3)^2-1\text{.}\)
According to the graph, the parabola passes the point \((2,0)\) (we could have chosen a different point, and would get the same solution). To find \(a\)'s value, we substitute \(x=2,y=0\) into \(f(x)=a(x-3)^2-1\text{,}\) and we have:
The parabola's vertex is at \((3,-1)\text{.}\) The parabola faces down because its leading coefficient is negative, making its vertex's \(y\)-value the function's maximum value. As a result, the function's domain is \((-\infty,\infty)\text{,}\) and its range \((-\infty,-1]\text{.}\)
Subsection12.2.4A Second Method to Convert to Vertex Form
There is a second method to convert a quadratic function from standard form to vertex form. In <<Unresolved xref, reference "section-parabola-axis-vertex-and-intercepts"; check spelling or use "provisional" attribute>>, we learned a parabola's vertex formula:
We can use this formula to find a parabola's vertex, which will give us the values of \(h\) and \(k\) in the vertex form \(f(x)=a(x-h)^2+k\text{.}\) Let's look at the next example.
Example12.2.17
Scenario: At the height of \(90.2\) feet above sea level, an object is launched at a vertical velocity of \(14.4\) feet per second. The object's height can be modeled by the function \(h(t)=-16t^2+14.4t+90.2\text{,}\) where \(h(t)\) represents the object's height in feet, and \(t\) represents time passed since the launch in seconds. When will the object reach its maximum height?
To find the object's maximum height, we need to locate the parabola's vertex. We will change the function from standard form to vertex form. In this example, it would be difficult to use the method of completing the square. We will use the vertex formula instead.
For \(h(t)=-16t^2+14.4t+90.2\text{,}\) identify that \(a=-16\text{,}\) \(b=14.4\) and \(c=90.2\text{.}\) The parabola's axis is:
Since the vertex is located on the axis, the vertex's \(x\) value must be \(0.45\text{.}\) Next, to find the vertex's \(y\)-value, we substitute \(x=0.45\) into \(h(t)\text{,}\) and we have:
The parabola's vertex is \((0.45,93.44)\text{.}\) The leading coefficient in \(h(t)=-16t^2+14.4t+90.2\) is \(-16\text{,}\) which is \(a\)'s value in the vertex form \(f(x)=a(x-h)^2+k\text{.}\) Now we can write \(h(t)\) in vertex form:
Since the vertex is located on the axis, the vertex's \(x\)-value is \(-\frac{1}{2}\text{.}\) Next, to find the vertex's \(y\)-value, we substitute \(x=-\frac{1}{2}\) into \(g(x)\text{,}\) and we have:
Subsection12.2.5Three Forms of Quadratic Functions
A quadratic function can be written in one of three forms. We will use \(q(x)=2x^2+4x-6\) as an example. This function is in standard form now. Let's change it to vertex form:
There is a third form called the factored form, which looks like \(f(x)=a(x+b)(x+c)\text{.}\) Not all quadratic functions can be converted to the factored form. Let's try to factor the function \(q(x)=2x^2+4x-6\text{:}\)
We can easily see this parabola's \(x\)-intercepts in this form: \((-3,0)\) and \((1,0)\text{.}\)
Let's summarize a quadratic function's three forms:
Standard Form: \(f(x)=ax^2+bx+c\text{.}\) For example, \(q(x)=2x^2+4x-6\text{.}\)
Vertex Form: \(f(x)=a(x-h)^2+k\text{.}\) For example, the quadratic function \(q(x)=2(x+1)^2-8\) is in its vertex form, and we can easily see the parabola's vertex: \((-1,8)\text{.}\)
Factored Form: \(f(x)=a(x+b)(x+c)\text{.}\) For example, the quadratic function \(q(x)=2(x+3)(x-1)\) is in its factored form, and we can easily see the parabola's \(x\)-intercepts: \((-3,0)\) and \((1,0)\text{.}\)
Subsection12.2.6Shifting Parabolas
Figure12.2.19Alternative Video Lesson
Let's locate the vertices (plural form of "vertex") of \(f(x)=x^2\text{,}\) \(g(x)=x^2+1\) and \(h(x)=x^2-2\text{,}\) and then graph them. We will write them in the vertex form:
We can summarize some rules about shifting graphs:
To graph \(g(x)=x^2+a\text{,}\) where \(a\gt0\text{,}\) we shift the graph of \(f(x)=x^2\) up by \(a\) units.
To graph \(h(x)=x^2-a\text{,}\) where \(a\gt0\text{,}\) we shift the graph of \(f(x)=x^2\) down by \(a\) units.
To graph \(p(x)=(x+a)^2\text{,}\) where \(a\gt0\text{,}\) we shift the graph of \(f(x)=x^2\) to the left by \(a\) units.
To graph \(q(x)=(x-a)^2\text{,}\) where \(a\gt0\text{,}\) we shift the graph of \(f(x)=x^2\) to the right by \(a\) units.
Subsection12.2.7Exploring Quadratic Functions with Graphing Device
In real life, engineers don't use paper pencil to solve math application problems. Let's see how to explore quadratic functions with graphing technology.
Example12.2.22
A missile was detected flying toward a target. It's height, in meters, can be modeled by the quadratic equation \(h(t)=-0.8t^2+132t+2718.2\text{,}\) where \(t\) is the number of seconds since the missile was detected. Use graphing technology to answer the following questions. Make sure to use function notation when needed.
When the missile was detected, how high was it flying?
Use a table to list the missile's height within the first \(10\) seconds since it was detected.
What was the missile's height \(60\) seconds since it was detected?
What's the maximum height the missile will reach?
After how many seconds will the missile hit its target on the ground?
When was the missile \(8,000\) meters high?
By the time the missile hit its target, how long has it traveled since being launched?
With graphing technology, and after adjusting the window settings, we can see the graph of the function \(h(t)=-0.8t^2+132t+2718.2\) and some critical points.
Figure12.2.23Graph of \(h(t)=-0.8t^2+132t+2718.2\)
Now we can answer questions based on information in the graph.
When the missile was detected, how high was it flying?
By the given information, \(t=0\) when the missile was detected. The \(y\)-intercept in the graph is \((0,2718.2)\text{,}\) so the missile was \(2718.2\) meters high at that moment.
Use a table to list the missile's height within the first \(10\) seconds since it was detected.
Graphing technology can show a table of values for the function. Once we change the starting value to \(0\) and the step increase to \(1\text{,}\) we should see the following table of values:
\(t\)
\(h(t)\)
\(0\)
\(2718.2\)
\(1\)
\(2849.4\)
\(2\)
\(2979\)
\(3\)
\(3107\)
\(4\)
\(3233.4\)
\(5\)
\(3358.2\)
\(6\)
\(3481.4\)
\(7\)
\(3603\)
\(8\)
\(3723\)
\(9\)
\(3841.4\)
\(10\)
\(3958.2\)
What was the missile's height \(60\) seconds since it was detected?
In the function \(h(t)=-0.8t^2+132t+2718.2\text{,}\) \(t\) stands for time in seconds since the missile was detected. We substitute \(t=60\) into the function, and the graphing calculator shows the point \((60,7758.2)\text{,}\) which implies the missile was \(7758.2\) meters high \(60\) seconds since it was detected.
What's the maximum height the missile will reach?
The parabola's vertex is at \((82.5,8163.2)\text{.}\) This implies, \(82.5\) seconds since the missile was detected, it would reach its maximum height of \(8163.2\) meters.
After how many seconds will the missile hit its target on the ground?
The parabola's right-side \(x\)-intercept is at \((183.515,0)\text{.}\) This implies the missile will fall back to the ground (hitting its target) \(183.515\) seconds since it was detected.
When was the missile \(8,000\) meters high?
To find when the missile was \(8,000\) meters high, we are asking: "What was \(t\)'s value when \(h(t)=8000\text{?}\)" We need to graph an additional horizontal line to find this information:
Figure12.2.25Graph of \(h(t)=-0.8t^2+132t+2718.2\) with \(y=8000\)
According to the graph, the missile was \(8000\) meters high twice during its flight: \(68.22\) seconds and \(96.78\) seconds since it was detected.
By the time the missile hit its target, how long has it traveled since being launched?
The right-side \(x\)-intercept, \((183.515,0)\text{,}\) represents the point when the missile hit its target; while the left-side \(x\)-intercept, \((-18.515,0)\text{,}\) represents the point when the missile was launched. The difference between their \(x\)-values is the time of the missile's complete flight. So the missile traveled a total of \(183.515-(-18.515)=202.3\) seconds.
Subsection12.2.8Exercises
Solving Quadratic Equations by Completing the Square