When a quadratic has both an x2 term and an x term, you can't just undo steps to get x alone, because x shows up in two places.
1
How completing the square works
Compare these two equations:
(x+3)2=16andx2+6x=7
The left equation solves right away because x appears only once inside the square. The right equation gets stuck because x2 and 6x aren't like terms. We want to turn x2+6x into a single square so x appears in one spot there too.
How completing the square works
(x+3)2(x+3)2=16,16,x=?
(x+3)2x2+6x=7,16,x=?
Adding the missing 32=9 to both sides turns x2+6x=7 into (x+3)2=16, so x+3=±4 and x=1 or x=−7.
For any positive b, split bx equally into two 2b-by-x strips and place them along the right and bottom edges of the x2 square. Now both outer sides are x+2b long, and there's an empty corner of area (2b)2.
The middle term splits into two equal strips, one along each of two sides of the square, so both sides come out the same length and the missing corner is always half of b, squared.
x2+bx+(2b)2=(x+2b)2
2
Solving equations by completing the square
Now we want to solve equations that don't factor with whole numbers, starting with
x2−8x+3=0
and then one with an odd middle coefficient, x2+5x=2.
Solving equations by completing the square
Text solution
Clear the constant out of the waySubtract 3 from both sides to leave an empty spot for the corner piece we actually need.
x2−8x=−3
Add the missing corner to both sidesHalf of −8 is −4, and squaring −4 gives +16. The corner piece is always positive, even when the middle term is negative.
x2−8x+16(x−4)2=−3+16=13
Take both square roots and solve for xRemember both +13 and −13, since both square to 13.
x−4x=±13=4±13
Now an odd middle coefficient: x2+5x=2. Keep half of 5 as the fraction 25 rather than switching to 2.5. Its square is 425, and that 4 in the denominator comes out of the square root cleanly:
Often we aren't solving an equation equal to 0 at all. Instead we have a parabola like y=x2−6x+14 or y=x2−6x+2 and want to rewrite it in vertex form while keeping y alone on the left.
Standard form to vertex form
y=x2−6x+14x2−6x+14
y=(x−?)2+?x2−6x+14
When the constant is at least 9, as in y=x2−6x+14, you can split 14 into 9+5 to get y=(x−3)2+5. Adding and subtracting the corner on the right side works for any constant, including the 2 in y=x2−6x+2.
Text solution
Add and subtract the missing corner on the right sideHalf of −6 is −3, so write +9 to complete the square and immediately write −9 beside it, so the right side changes by 0 overall.
y=(x2−6x+9)−9+2
Write the square and combine the leftover constantsGroup the first three terms into a square and combine the numbers outside.
y=vertex form(x−3)2−7
Set the square to 0 to read the vertexBecause (x−3)2 is never negative, its smallest value is 0, at x=3. That gives a minimum value of y=−7.
Vertex: (3,−7)
In the family y=x2−6x+c, the 9 always goes into building (x−3)2, so the vertex stays on the line x=3 while the leftover c−9 sets the minimum height. When c=9, the vertex touches the x-axis at (3,0).
Building (x − 3)² always takes 9, so the vertex never slides sideways, and the leftover, c − 9, is the height of the bottom.
4
Leading coefficients and negative signs
Our square starts from a plain 1x2, so we need a first step whenever x2 has a number or a minus sign in front, as in 2x2+12x−10=0,y=2x2+12x+23, or y=−2x2+16x−29.
Leading coefficients and negative signs
y=2x2+12x−10=010=0
y=2x2+12x+2310=0
In an equation equal to 0, just divide every term on both sides by the leading coefficient: 2x2+12x−10=0 becomes x2+6x−5=0 right away, because 20=0.
In a function y=2x2+12x+23, we want to keep y alone, so we factor 2 out of the x terms only and watch how 2 multiplies the corner we add inside:
y=2(x2+6x)+23=2(x2+6x+9)−18+23=2(x+3)2+5
(x+3)2 is 0 at x=−3, so the vertex is (−3,5).
Now with a negative leading coefficient: y=−2x2+16x−29. (If there's only a minus sign in front, like y=−x2+8x−5, factor out −1 the same way to get y=−(x2−8x)−5.)
Text solution
Factor −2 out of the x terms onlyPulling out a negative flips +16x to −8x inside the parentheses, while −29 stays outside.
y=−2(x2−8x)−29
Complete the square inside and balance −2×16 outsideHalf of −8 is −4, so the inside corner is still +16. Since −2(16)=−32, adding it inside actually subtracted 32 from the right side, so add 32 outside to cancel it.
y=−2(x2−8x+16)+32−29
Write the square and read the maximumBecause of the negative factor in front, the parabola opens downward and reaches a maximum value of 3 at x=4, giving vertex (4,3).
y=−2(x−4)2+3
5
Finding unknown constants
Test questions often run completing the square backwards: one of the numbers is a letter, and you have to find it. These range from the missing piece of a perfect square up to finding a positive constant k so that y=x2+kx+15 has a minimum value of −1.
Finding unknown constants
For a perfect square with no leftover constant outside, read the corner straight from the half:
In x2−14x+c, half of −14 is −7, so the missing corner is c=(−7)2=49.
In x2+bx+25, a corner of 25 has sides of 5 or −5, so the two side strips add up to 10x or −10x, giving b=10 or b=−10.
When an equation like x2−10x+c=(x−h)2+4 holds for all x, complete the square on the left, treating +c like any constant:
x2−10x+c=(x2−10x+25)−25+c=(x−5)2+(c−25)
Matching pieces with (x−h)2+4 gives h=5 and c−25=4, so c=29.
When the unknown constant is the coefficient of the x term, as in finding positive k so y=x2+kx+15 has minimum value −1, run the same steps with k. (If there's a number in front, like 2x2+kx+15, factor out 2 first to get 2(x2+2kx)+15.)
Text solution
Complete the square with k just like a numberHalf of k is 2k, so add and subtract its square, (2k)2=4k2, on the right side.
y=(x2+kx+4k2)−4k2+15=(x+2k)2−4k2+15
Set the leftover constant equal to the minimum valueThe squared term is 0 at x=−2k, leaving −4k2+15 as the function's minimum value.
−4k2+15=−1
Solve for k and check the sign conditionBoth 8 and −8 give a minimum of −1, and since the problem says k>0, we take the positive root.
−4k2k2k=−16=64=8(since k>0)
In y=x2+kx+15, the vertex is (−2k,15−4k2). As k moves away from 0 in either direction, the vertex slides sideways and drops lower at the same time, reaching the horizontal line y=−1 at two symmetric values: k=−8 with vertex (4,−1) and k=8 with vertex (−4,−1).
Changing k slides the bottom of the parabola sideways and pulls it lower at the same time, and the bottom lands right on the line at -1 for both k = 8 and k = -8.
Key concepts
Don't complete the square if x is already in one squared piece like (x+3)2=16, or if an equation equal to 0 factors cleanly by eye. Reach for it when an equation won't factor with whole numbers, when you need vertex form or a minimum or maximum, or when an unknown constant has to make a perfect square or give a certain vertex.
Everything rests on starting from 1x2, taking half the x-coefficient, and squaring that half to fill the corner, which is always positive:
x2+bx+(2b)2=(x+2b)2
When you're solving an equation (like 2x2+12x−10=0 or x2+5x=2), divide out any leading coefficient first, move the constant to the other side, and add (2b)2 to both sides. Keep odd halves as fractions like 25 so the denominator becomes 4. In a function y=… (like y=−2x2+16x−29), keep y alone: factor any leading coefficient a out of the x terms, add the positive corner inside, and cancel a times that corner outside. So +16 inside −2(x2−8x+16) needs +32 outside, giving y=−2(x−4)2+3 with maximum 3 at x=4. If a coefficient is an unknown letter (like y=x2+kx+15), complete the square with 2k and 4k2 the same way and match the vertex or leftover constant to the given clue.
6
Practice
1
What is the minimum value of the function f(x)=x2−12x+23?
Rewrite f(x) in vertex form (x−h)2+k, and check whether "minimum value" asks for the x-coordinate or the y-coordinate of the vertex.
Half of −12 is −6, so add and subtract (−6)2=36 on the right side. (Adding 36 outside instead of subtracting it gives 36+23=59, Choice D.)
f(x)=(x2−12x+36)−36+23=(x−6)2−13
The vertex is (6,−13). Be careful not to pick 6 (Choice B): 6 is the x-value where the minimum happens, while the minimum value of the function is the output, −13.
Desmos: Graph `y=x^2-12x+23`, zoom out if needed to see the bottom of the parabola, click the vertex `(6, -13)`, and read its y-coordinate, `-13`. Graphing is slightly faster on the test.
Answer: A) −13
2
What are the solutions to the equation x2−10x−6=0?
Move −6 to the right side first, then find the corner that completes x2−10x.
Add 6 to both sides to get x2−10x=6. (Moving −6 over without changing its sign gives −6+25=19, Choice C.) Half of −10 is −5, so add (−5)2=25 to both sides:
(x−5)2=6+25=31
Take both square roots to get x−5=±31, then add 5 to both sides: x=5±31. Subtracting 5 instead of adding it gives −5±31 (Choice A).
Desmos: Graph `y=x^2-10x-6` and read the x-intercepts, `-0.568` and `10.568`. Those are rounded decimals, not exact radicals, so you then have to type a choice such as `5+sqrt(31)` on its own line and see that it gives `10.568`. Completing the square is faster on the test.
Answer: D) 5±31
3
The expression x2+bx+36 can be written as (x+d)2, where b and d are constants and b<0. What is the value of b?SAT
Stopping at d=−6 forgets to double the strip, and writing +12 overlooks the condition b<0.Stopping at d=−6 forgets to double the strip, and writing +12 overlooks the condition b<0.
In a perfect square, the constant 36 is the corner (2b)2. Check both numbers that square to 36, and remember that the corner's side is half of b.
For x2+bx+36=(x+d)2, the corner 36 equals d2, so d=6 or d=−6. Because bx splits into two strips of dx,b=2d=±12. (Stopping at d=−6 forgets to double the strip, and writing +12 overlooks the condition b<0.) Since b<0,b=−12. Don't use Desmos here: doubling −6 in your head is much faster than setting up sliders.
Answer: −12
4
In the xy-plane, what is the vertex of the parabola y=3x2−12x+19?
Factor 3 out of 3x2−12x first, and watch how much adding the corner inside 3(…) really adds to the right side.
Factor 3 out of the x terms:
y=3(x2−4x)+19
Half of −4 is −2, so put (−2)2=+4 inside the parentheses. Because 3(4)=12 was added to the right side, subtract 12 outside. Subtracting 4 instead of 12 gives (2,15) (Choice C).
y=3(x2−4x+4)−12+19=3(x−2)2+7
(x−2)2 is 0 at x=2 (not −2, Choice A), leaving y=7, so the vertex is (2,7).
Desmos: Graph `y=3x^2-12x+19`, make sure the vertex above the x-axis is in view, and click it to read `(2, 7)`. Desmos is faster on the test.
Answer: B) (2,7)
5
One solution to the equation 2x2+6x+1=0 can be written in the form 2−3+k, where k is a constant. What is the value of k?
Divide every term on both sides by 2 first, then leave half of the odd middle coefficient as a fraction.
Divide every term by 2 first to get x2+3x+21=0. (Forgetting to divide 1 by 2 leaves +1 and leads to k=5, Choice A.) Subtract 21 from both sides (keeping it as +21 on the right leads to k=11, Choice C), then add (23)2=49 to both sides:
(x+23)2=−21+49=47
Taking square roots gives x+23=2±7, so x=2−3±7 and k=7.
Desmos: Graph `y=2x^2+6x+1` and read the greater x-intercept, rounded to `-0.177`. Then type `(-3+sqrt(5))/2`, `(-3+sqrt(7))/2`, and so on for each choice, and see that only `(-3+sqrt(7))/2` gives `-0.177`. Because you have to test the radical form separately, completing the square is just as fast on the test.
Answer: B) 7
6
Which equation is equivalent to y=−2x2+12x−11?
Factor −2 out of −2x2+12x, watching both the sign flip inside the parentheses and the sign of −2 times the corner when balancing outside.
Factor −2 out of the x terms, which flips +12x to −6x inside. (Missing that sign flip gives (x+3)2, Choice D.)
y=−2(x2−6x)−11
Half of −6 is −3, so put +9 inside. Because −2(9)=−18 subtracted 18 from the right side, add 18 outside. Subtracting 18 out of habit gives −18−11=−29 (Choice A).
y=−2(x2−6x+9)+18−11=−2(x−3)2+7
Desmos: Graph `y=-2x^2+12x-11` and each choice. Only `y=-2(x-3)^2+7` lies exactly on top of the original parabola for every x. (Or just click the vertex of `y=-2x^2+12x-11`, `(3, 7)`, which only Choice C matches.) Desmos is slightly faster on the test and protects you from the sign slip.
Answer: C) y=−2(x−3)2+7
7
In the equation x2+16x+c=(x+h)2−9,c and h are constants. If the equation is true for all values of x, what is the value of c?SAT
Stopping at 64 ignores the −9 on the right, and dropping the minus sign on −9 gives 73.Stopping at 64 ignores the −9 on the right, and dropping the minus sign on −9 gives 73.
Ignore the right side at first and complete the square on x2+16x+c, treating +c like an ordinary number.
Complete the square on the left side first: half of 16 is 8, so add and subtract 82=64:
x2+16x+c=(x2+16x+64)−64+c=(x+8)2+(c−64)
Match the constant outside the square with (x+h)2−9 to get c−64=−9. (Stopping at 64 ignores the −9 on the right, and dropping the minus sign on −9 gives 73.) Adding 64 to both sides gives c=55. Don't use Desmos here: an identity with two unknown constants is much faster by algebra than matching two sliders.
Answer: 55
8
The function f(x)=4x2+kx+5 has a minimum value of −4, where k is a positive constant. What is the value of k?
Factor 4 out of 4x2+kx first so the parentheses start with 1x2, then complete the square in terms of k.
Factor 4 out of the x terms first. (Completing the square without factoring out 4 treats the corner as 4k2 and gives k=6, Choice B.)
f(x)=4(x2+4kx)+5
Half of 4k is 8k, so add (8k)2=64k2 inside and subtract 4⋅64k2=16k2 outside. (Forgetting to multiply the outside adjustment by 4 gives k=24, Choice D.)
f(x)=4(x+8k)2−16k2+5
Set the minimum value equal to −4:−16k2+5=−4, so 16k2=9 and k2=144. Since k>0,k=12.
Desmos: Graph `y=4x^2+kx+5` and `y=-4` with a slider for `k` from `0` to `25`, step `1` (keeping `k` positive so you don't land on `k=-12`). As `k` increases, the parabola's vertex moves down and to the left; read the value of `k` when the vertex touches `y=-4`, which is `k=12`. Desmos is about as quick as the algebra on the test.