Sub topic 13
From Standard Form to Vertex Form by Completing the Square
Assume you can expand and factor binomials, substitute values into an expression, and solve simple equations. You should also know that a quadratic in standard form is written as \(y=ax^2+bx+c\), where \(a\neq0\).
Vertex form is
\[ y=a(x-h)^2+k. \]
The values \(h\) and \(k\) show the vertex directly. To graph a quadratic in standard form, rewrite it in this form by completing the square.
Why completing the square works
A squared binomial has the pattern
\[ (x-p)^2=x^2-2px+p^2. \]
The first two terms tell you which number belongs in the square. The constant \(p^2\) must then be added to complete the pattern.
For example,
\[ x^2-6x \]
has \(-6=-2(3)\), so add \(3^2=9\):
\[ x^2-6x+9=(x-3)^2. \]
When you add a number to an expression, you must subtract the same number to keep its value unchanged.
Worked example: \(y=x^2-6x+5\)
Start with the quadratic:
\[ y=x^2-6x+5. \]
1. Group the \(x\)-terms
\[ y=(x^2-6x)+5. \]
2. Find the number to complete the square
Take half of the coefficient of \(x\), then square it:
\[ \left(\frac{-6}{2}\right)^2=9. \]
Add and subtract 9 inside the expression:
\[ y=(x^2-6x+9-9)+5. \]
3. Factor the perfect square
\[ y=(x-3)^2-9+5. \]
4. Combine constants
\[ \boxed{y=(x-3)^2-4}. \]
The vertex form gives the vertex \((3,-4)\) and the axis of symmetry \(x=3\).
When the coefficient of \(x^2\) is not 1
First factor \(a\) from the \(x^2\) and \(x\) terms. For example:
\[ y=2x^2+8x+1 \]
\[ y=2(x^2+4x)+1. \]
Half of 4 is 2, and \(2^2=4\). Add and subtract 4 inside the parentheses:
\[ y=2(x^2+4x+4-4)+1. \]
Factor and simplify:
\[ y=2(x+2)^2-8+1 \]
\[ \boxed{y=2(x+2)^2-7}. \]
The vertex is \((-2,-7)\). Notice that the expression \(x+2\) means \(x-(-2)\), so \(h=-2\).
| Standard form | Vertex form | Vertex |
|---|---|---|
| \(x^2-6x+5\) | \((x-3)^2-4\) | \((3,-4)\) |
| \(2x^2+8x+1\) | \(2(x+2)^2-7\) | \((-2,-7)\) |
A formula check
For \(y=ax^2+bx+c\), completing the square gives
\[ h=-\frac{b}{2a} \]
and
\[ k=c-\frac{b^2}{4a}. \]
These formulas are useful for checking your algebra. They do not replace the steps when you need to show your work.
A short Python function can also calculate \(a\), \(h\), and \(k\):
def standard_to_vertex(a, b, c):
"""Return a, h, and k for y = a(x - h)^2 + k."""
if a == 0:
raise ValueError("a must not be zero")
h = -b / (2 * a)
k = c - b**2 / (4 * a)
return a, h, k
print(standard_to_vertex(1, -6, 5))
# (1, 3.0, -4.0)Common errors
- Forgetting to factor out \(a\) before completing the square.
- Adding the square number without subtracting it.
- Taking half of the constant instead of half of the \(x\)-coefficient.
- Reading \(x+2\) as \(h=2\) instead of \(h=-2\).
- Changing the outside constant incorrectly after factoring.
Exercise
Rewrite y = x² + 10x + 7 in vertex form and state its vertex.
Show answer
y = (x + 5)² - 18, so the vertex is (-5, -18).