Completing the square
A quadratic has the variable in two places. How do you get it down to one?
Where you are 12 in Quadratics
When you reach for it
You can solve x^2 = 49 in your head, because x appears once: undo the square and x = \pm 7. You cannot do the same with
because x turns up twice, once squared and once not, and there is no single operation that undoes both.
Completing the square is the rewrite that fixes exactly that. It turns the left side into one squared term, (x + \text{something})^2, so the variable appears once. After that the problem is one you could already do, by taking square roots.
Reach for it when factoring fails, or does not obviously work, and you want exact answers rather than decimals read off a graph. It never fails: every quadratic equation can be pushed into the form (x + k)^2 = d, which is exactly why the quadratic formula exists, and it is derived this way. Reach for it also when you need more than the solutions: the same rewrite turns any quadratic expression into a square plus a number, which is how you find the vertex of a parabola and how you put the equation of a circle into center and radius form.
The procedure
The whole method rests on one pattern, the square of a sum:
Read it right to left. An expression x^2 + 2kx + k^2 is a perfect square, and the number inside the square, k, is half the coefficient of x. The constant at the end, k^2, is that half, squared.
So given x^2 + bx, the piece that finishes the square is
because then b plays the part of 2k, and \displaystyle k = \frac{b}{2}. That is the only fact in the method. Everything below is either that fact, a way of using it without changing the problem, or what to do once it has been used.
Making a perfect square
A perfect square trinomial is a trinomial that equals the square of a binomial, one of the special patterns that factoring looks for. With leading coefficient 1 it has the form x^2 + bx + c = (x + m)^2 for some number m. Making a perfect square means taking the first two terms, x^2 + bx, and finding the number that has to follow them so that the three together form a perfect square trinomial. That number is said to complete the square.
The name is literal. Read x^2 + 10x as an area: x^2 is a square of side x, and 10x is a rectangle x long and 10 wide. Side by side they make a long rectangle, not a square. Now cut the 10x strip down the middle into two strips of width 5, and move one of them so it lies along the bottom of the square instead of the side.
The shape is now very nearly a square of side x + 5. One piece is missing: the corner, which is 5 wide and 5 tall. Its area is 5^2 = 25. Put it in and
The strip is halved because it has to be shared between two sides of the square. The half is squared because the missing corner is a square whose side is that half. Nothing about the number 10 mattered: a strip of width b becomes two strips of width \displaystyle \frac{b}{2}, and the missing corner is \displaystyle \left(\frac{b}{2}\right)^2.
Three facts come out of this, and every example below uses one of them.
The completing number. For any number b,
The number inside the brackets is half the coefficient of x, sign and all. The number added is that half, squared, so it is never negative.
The test for a perfect square. x^2 + bx + c is a perfect square trinomial exactly when
and then it equals \displaystyle \left(x + \frac{b}{2}\right)^2. For any other c it is not the square of any binomial x + m.
The leftover. Every x^2 + bx + c is a perfect square plus a constant:
The second bracket measures how far the expression is from being a perfect square, and it is 0 exactly when the test passes.
All three are proved by matching coefficients. If x^2 + bx + c = (x + m)^2 = x^2 + 2mx + m^2 for every x, the two sides have the same coefficients, so 2m = b and m^2 = c. The first leaves no choice, \displaystyle m = \frac{b}{2}, and the second then forces \displaystyle c = \frac{b^2}{4}. In the other direction, expanding \displaystyle \left(x + \frac{b}{2}\right)^2 gives \displaystyle x^2 + bx + \frac{b^2}{4}, so that trinomial is a perfect square. For the leftover, add \displaystyle \frac{b^2}{4} and take it away again, which changes nothing, and group the first three terms. The argument never used the picture, so it holds for negative and fractional b too, where a strip of negative width could not be drawn.
Solving by completing the square
To solve x^2 + 6x = 16:
Get the x terms alone on one side. The completing number finishes x^2 + bx with nothing else beside it, so any constant term moves to the other side first, and any x term on the other side is gathered onto this one. Here both are already done.
Add \displaystyle \left(\frac{b}{2}\right)^2 to both sides. Half of 6 is 3, and 3^2 = 9. It goes on both sides because this is an equation, and adding the same number to both sides keeps it true:
Write the left side as a square. The number inside the brackets is the half, 3, not the 9:
This is the shape the whole method aims for, (x + k)^2 = d, with the variable appearing once and a plain number d on the right. Here k = 3 and d = 25.
Read the sign of d before going on. A square is never negative, so d already tells you how many real solutions there are. Picture the left side as the graph of y = (x + k)^2, a U whose lowest point sits at height 0, and the right side as the flat line y = d. Each point where they meet is a solution.
If d > 0 the line crosses the U twice, so there are two real solutions. If d = 0 it touches only the lowest point, so there is one. If d < 0 it passes underneath and never meets the U, so there are no real solutions, though there are two complex ones. Here d = 25, so expect two.
Take square roots, keeping both signs. Two numbers square to 25, namely 5 and -5, so
Solve the two linear equations.
Check. 2^2 + 6(2) = 4 + 12 = 16, and (-8)^2 + 6(-8) = 64 - 48 = 16. Both work. Every step above can be undone, so no false solution can creep in; the check is there to catch arithmetic slips.
This particular equation also factors, as (x + 8)(x - 2) = 0, and factoring gives the same two answers. Completing the square does not care whether the quadratic factors, which is its point: Example 4 is one that does not.
When x^2 carries a coefficient. The completing number is only right when x^2 stands alone. In an equation such as 3x^2 - 12x - 3 = 0, divide both sides by 3 first: dividing both sides by the same non-zero number does not change which values of x make the equation true, and 0 \div 3 is still 0. That gives x^2 - 4x - 1 = 0, and the steps above take over, ending at (x - 2)^2 = 5 and \displaystyle x = 2 \pm \sqrt{5}. Example 7 works one through. This is a move for equations only; an expression has no second side, and the full treatment of a leading coefficient other than 1 is its own lesson.
Worked examples
Completing the square of an expression
Find the number that makes each expression a perfect square trinomial, then write the result as a binomial squared.
(a) x^2 - 26x \qquad (b) y^2 - 9y \qquad (c) \displaystyle n^2 + \frac{1}{2}n
SolutionIn each case take half the coefficient of the variable, then square it. The sign of the coefficient carries into the brackets, and squaring removes it from the constant.
(a) Half of -26 is -13, and (-13)^2 = 169.
(b) Half of -9 is \displaystyle -\frac{9}{2}, and \displaystyle \left(-\frac{9}{2}\right)^2 = \frac{81}{4}. An odd coefficient gives a fraction, which is normal. There is no reason to turn it into a decimal: the next step squares it, and fractions square cleanly.
(c) Half of \displaystyle \frac{1}{2} is \displaystyle \frac{1}{4}, and \displaystyle \left(\frac{1}{4}\right)^2 = \frac{1}{16}.
You can check any of these by multiplying out the right side. For (a), (x - 13)^2 = x^2 - 26x + 169.
Testing whether a trinomial is already a perfect square
Decide which of these are perfect square trinomials. Write each one that is as a binomial squared.
(a) x^2 + 20x + 100 \qquad (b) x^2 - 16x + 48 \qquad (c) \displaystyle y^2 + y + \frac{1}{4} \qquad (d) x^2 + 6x - 9
SolutionIn each case, work out what the constant would have to be, from the x term alone, and compare it with the constant that is actually there.
(a) Half of 20 is 10, and 10^2 = 100. The constant is 100, so this is a perfect square: x^2 + 20x + 100 = (x + 10)^2.
(b) Half of -16 is -8, and (-8)^2 = 64. The constant is 48, not 64, so this is not a perfect square. It does factor, as (x - 4)(x - 12), but into two different binomials, not one binomial twice.
(c) Half of 1 is \displaystyle \frac{1}{2}, and \displaystyle \left(\frac{1}{2}\right)^2 = \frac{1}{4}. The constant matches, so \displaystyle y^2 + y + \frac{1}{4} = \left(y + \frac{1}{2}\right)^2.
(d) Half of 6 is 3, and 3^2 = 9. The constant is -9. The size is right and the sign is wrong, and the sign is decisive: the completing number is a square, so it is never negative. This is not a perfect square.
Working backwards to the middle term
(a) Find every number k that makes x^2 + kx + 64 a perfect square trinomial.
(b) Find the number c that makes x^2 - 5x + c a perfect square trinomial.
Solution(a) If x^2 + kx + 64 equals (x + m)^2 = x^2 + 2mx + m^2, then matching constants gives m^2 = 64, so m = 8 or m = -8. Matching the x terms gives k = 2m:
Both work: x^2 + 16x + 64 = (x + 8)^2 and x^2 - 16x + 64 = (x - 8)^2. The constant is the square of the half, and a square has two square roots, so there are two middle terms that fit.
(b) Here the middle term is fixed, and the completing number depends only on it. Half of -5 is \displaystyle -\frac{5}{2}, so
There is exactly one answer this time, since squaring the half leaves no choice.
A constant to move first, and radical answers
Solve (a) y^2 - 10y - 35 = 0 \qquad (b) x^2 + 5x - 3 = 0
Solution(a) The constant is on the same side as the y terms, so move it across first. The method works on y^2 + by alone:
Half of -10 is -5, and (-5)^2 = 25:
Since 60 is not a perfect square, the solutions are irrational. This quadratic does not factor over the integers, and completing the square finds its solutions anyway.
(b) Move the constant across: x^2 + 5x = 3. Half of 5 is \displaystyle \frac{5}{2}, and \displaystyle \left(\frac{5}{2}\right)^2 = \frac{25}{4}. Add it to both sides, writing 3 as \displaystyle \frac{12}{4} so the right side can be added:
The square root of the fraction splits as \displaystyle \sqrt{37} over \displaystyle \sqrt{4} = 2, which is why the answer comes out over a common denominator.
When the square equals a negative number
Solve x^2 - 4x + 13 = 0.
SolutionNow read the sign: d = -9 is negative. No real number squares to a negative, so the equation has no real solutions. The graph of y = x^2 - 4x + 13 never reaches the x-axis, and in the picture of the three cases, the line y = -9 runs underneath the U.
Over the complex numbers it does have two, since (3i)^2 = -9 and (-3i)^2 = -9:
The method did not fail. It told you exactly why there is no real answer: a square cannot be negative.
Gathering and expanding first
Solve (a) x^2 + 2x - 5 = 6x + 7 \qquad (b) (x + 2)(x - 6) = 5
Solution(a) The x terms are split across the two sides. Subtract 6x from both sides to gather them on the left, and add 5 to both sides to send the number right:
Half of -4 is -2, and (-2)^2 = 4. Add 4 to both sides and write the left side as a square:
So x = 2 + 4 = 6 or x = 2 - 4 = -2. Check in the original equation, each side separately. For x = 6: 36 + 12 - 5 = 43 and 36 + 7 = 43. For x = -2: 4 - 4 - 5 = -5 and -12 + 7 = -5.
(b) The left side is a product, not x^2 + bx, so multiply it out first:
Expanding comes first because a product equal to 5 says nothing about either factor on its own. Only a product equal to 0 splits into one equation per factor.
A leading coefficient that makes fractions
Solve 4x^2 - 24x + 11 = 0.
SolutionDivide both sides by 4 so that x^2 stands alone. The 11 does not divide evenly, and that is fine; it becomes a fraction:
Half of -6 is -3, and (-3)^2 = 9. Write 9 as \displaystyle \frac{36}{4} so the right side can be added:
So \displaystyle x = 3 + \frac{5}{2} = \frac{11}{2} or \displaystyle x = 3 - \frac{5}{2} = \frac{1}{2}.
The fractions in the middle did not survive to the answer: \displaystyle d = \frac{25}{4} is a perfect square, so the roots are rational. Check \displaystyle x = \frac{1}{2}: \displaystyle 4 \cdot \frac{1}{4} - 12 + 11 = 0.
Choosing a constant so there is exactly one solution
For which value of c does x^2 - 10x + c = 0 have exactly one solution? What is that solution?
SolutionComplete the square with c left as a letter. Move it across, then add 25, since half of -10 is -5:
The right side is the d of the three cases, so the number of solutions is decided by the sign of 25 - c. Exactly one solution means d = 0, so c = 25, and then (x - 5)^2 = 0 gives the single solution x = 5.
The same line answers the rest of the question for free: two real solutions when c < 25, and none when c > 25. The method did more than solve one equation. It sorted a whole family of them.
A rectangle with a given area
A rectangular garden is 4 meters longer than it is wide, and its area is 30 square meters. Find its width and its length.
Call the width w meters. The length is then w + 4, and area is width times length:
This does not factor over the integers (no two whole numbers differing by 4 multiply to 30), so complete the square. Half of 4 is 2, and 2^2 = 4:
The algebra gives two numbers, and the garden decides between them. \displaystyle -2 - \sqrt{34} is negative, and a width cannot be. So the width is \displaystyle w = -2 + \sqrt{34} \approx 3.83 meters and the length is \displaystyle w + 4 = 2 + \sqrt{34} \approx 7.83 meters.
Check exactly, not with the decimals: \displaystyle (\sqrt{34} - 2)(\sqrt{34} + 2) = 34 - 4 = 30.
A square plus a number, and the smallest value
Write each expression as a perfect square plus a constant, and find its smallest possible value.
(a) x^2 - 6x + 11 \qquad (b) x^2 - 3x + 1
SolutionThese are expressions, not equations. There is no other side to add the completing number to, so add it and subtract it in the same line, which changes nothing.
(a) Half of -6 is -3, and its square is 9:
A square is never negative, so (x - 3)^2 \ge 0, and it equals 0 exactly when x = 3. The expression is therefore never less than 2, and it reaches 2 at x = 3. On the graph, (3, 2) is the vertex of the parabola y = x^2 - 6x + 11.
(b) Half of -3 is \displaystyle -\frac{3}{2}, and its square is \displaystyle \frac{9}{4}. The expression has only 1, so add \displaystyle \frac{9}{4} to complete the square and subtract it again:
This time the leftover is negative, so the expression dips below zero. Its smallest value is \displaystyle -\frac{5}{4}, reached at \displaystyle x = \frac{3}{2}. Reading these two numbers off is exactly what vertex form does with a parabola.
When the square term is not x^2
Find the number that makes 9x^2 + 12x a perfect square trinomial.
SolutionThe first term is 9x^2 = (3x)^2, so the binomial must start with 3x, not x. Squaring it, the middle term is twice the product of the two parts, 2 \cdot 3x \cdot m = 6mx:
Matching the middle terms, 6m = 12, so m = 2, and the completing number is m^2 = 4:
The area picture agrees. The square now has side 3x, and the 12x strip is split into two strips of area 6x, each 3x long and therefore 2 wide. The missing corner is 2 by 2.
Notice that halving 12 and squaring would have given 36, and 9x^2 + 12x + 36 is not a perfect square. The rule “half of b, squared” is the rule for x^2 + bx. The idea underneath it, match the middle term against twice the product of the two parts, is what works everywhere.
Using the idea to factor x^4 + 4
Factor x^4 + 4 into two quadratics with integer coefficients.
SolutionA sum of two squares looks unfactorable, but think of x^4 + 4 as (x^2)^2 + 2^2, the first and last terms of a perfect square with a = x^2 and b = 2. The middle term that pattern needs is 2ab = 2 \cdot x^2 \cdot 2 = 4x^2, and it is missing. So add it, and take it away again:
Now the expression is a difference of two squares, which does factor:
and with the terms of each factor put in the usual order,
Check. Multiply out: (x^2 + 2)^2 - (2x)^2 = x^4 + 4x^2 + 4 - 4x^2, which is x^4 + 4.
This time the missing piece of the square was the middle term rather than the corner. The idea is the same one: decide what a perfect square would need, and supply it without changing the value.
Boundaries
The coefficient of x^2 must be 1. x^2 + 6x is a square missing a corner; 2x^2 + 6x is not, and halving 6 then gives the wrong number. When the first term is itself a perfect square, such as 9x^2, match the pattern with 3x as the first part, as in Example 11. Otherwise, in an equation divide both sides by the coefficient, as in Example 7, and in an expression factor it out instead. If that coefficient is 0 the equation is linear and there is no square to complete.
Equation or expression changes what you may do. In an equation, add the completing number to both sides, and you may divide both sides by the leading coefficient. In an expression there is no other side, so add and subtract the number in the same line, as in Example 10; adding it once, or dividing through, changes the expression’s value.
The completing number is never negative. It is the square of a real number. A trinomial x^2 + bx + c with c < 0 is never a perfect square, whatever b is.
Working forwards there is one answer, working backwards there may be two. Given b, the completing number \displaystyle \frac{b^2}{4} is fixed. Given c > 0, both \displaystyle b = 2\sqrt{c} and \displaystyle b = -2\sqrt{c} work. Given c = 0, only b = 0 does, and what is left is x^2 itself.
Taking the square root needs the \pm. \displaystyle \sqrt{\;} gives only the non-negative root, so the negative one is yours to write. Both are solutions. And the square root property applies only once the square stands alone with a plain number d on the other side; if an x is still on the right, the collecting was not finished.
The sign of d is the answer to “how many”. Positive gives two real solutions, zero gives one, negative gives none that are real and two that are complex. (x - 2)^2 = -9 is an answer, not an error.
In context, the algebra is not the last word. It returns every number that satisfies the equation; a length, a time or a count may rule some of them out, as in Example 9.
The area picture needs positive lengths; the algebra does not. A strip of width -9 cannot be drawn, but the proof by matching coefficients covers every real b.
Where this goes next
Once the square is completed, the square root property finishes the job, and when the leading coefficient is not 1, one extra step comes first.
Do this move on ax^2 + bx + c = 0 with letters instead of numbers and you have derived the quadratic formula once and for all, which is why the formula has a \pm and a square root in it. The d of this lesson becomes \displaystyle \frac{b^2 - 4ac}{4a^2}, and its numerator is the discriminant, whose sign counts the solutions for exactly the reason the three cases show. The leftover \displaystyle c - \frac{b^2}{4} of a monic quadratic is the same quantity again: multiply it by -4 and you get b^2 - 4c. With fractions piling up the formula is often the faster route, and using the quadratic formula says when to prefer which.
What completing the square keeps over the formula is that it rewrites as well as solves. The leftover, read as a height, is the lowest point of a parabola, which is why converting to vertex form is this move done on y = x^2 + bx + c. The same rearrangement, done twice, turns x^2 + y^2 + 6x - 4y = 12 into the center and radius form of a circle: once in x, once in y. And in calculus it reshapes a quadratic under an integral sign into a standard form, the first step of trigonometric substitution.
Exercises
Complete the square
Find the number that completes the square, then write the result as a binomial squared.
- x^2 + 10x
- m^2 - 7m
- \displaystyle a^2 + \frac{2}{3}a
Perfect square or not
Decide whether each is a perfect square trinomial. If it is, write it as a binomial squared; if it is not, say what constant would make it one.
- x^2 + 14x + 49
- x^2 - 10x + 20
- x^2 + 8x - 16
Working backwards
- Find every k that makes x^2 + kx + 36 a perfect square trinomial.
- Find the c that makes x^2 - 9x + c a perfect square trinomial.
Solve by completing the square
- x^2 + 4x = 5
- x^2 - 6x + 7 = 0
- x^2 + 4x + 1 = 2x + 9
- x^2 = 6x + 3
- \displaystyle a^2 - a = \frac{3}{4}
- n^2 - 3n - 1 = 0
- (x - 3)(x + 7) = 2
- 2x^2 - 8x - 10 = 0
How many real solutions
Solve each equation. Say how many real solutions it has, and give any complex ones.
- x^2 - 2x + 5 = 0
- x^2 + 10x + 25 = 0
- For which value of k does x^2 + 8x + k = 0 have exactly one solution, and what is it?
- For which values of c does x^2 - 2x + c = 0 have two real solutions?
Rewrite the expression
Write each expression in the form (x - h)^2 + k.
- x^2 + 4x + 9
- x^2 - 12x + 30
- x^2 + x + 1
- What is the smallest value of x^2 - 8x + 20, and for which x does it occur?
Beyond x^2 + bx
- Find the c that makes 25x^2 - 30x + c a perfect square trinomial, and write the result as a binomial squared.
- Find the term that makes x^2 + 10xy + \underline{\quad} a perfect square trinomial, and write the result as a binomial squared.
- Factor x^4 + 64 into two quadratics with integer coefficients, by adding and subtracting the missing middle term.
Problems
- A rectangle is 6 cm longer than it is wide, and its area is 40 square centimeters. Find its width and length.
- A ball is thrown upward, and its height after t seconds is h = -5t^2 + 20t + 1 meters. At what times is it 16 meters above the ground?
Reasoning
- Use the area picture to explain why the number added to x^2 + bx is \displaystyle \left(\frac{b}{2}\right)^2 and not b^2.
- Explain why, when you complete the square in an equation, the number is added to both sides, but in an expression it is added and subtracted.
- Prove that x^2 + bx + c is a perfect square trinomial exactly when b^2 = 4c.
- Show that completing the square turns x^2 + bx + c = 0 into \displaystyle \left(x + \frac{b}{2}\right)^2 = \frac{b^2 - 4c}{4}, and use it to say when the equation has two, one or no real solutions.
- Factoring over the integers solves only some quadratic equations. Explain why completing the square solves every one.
Answers
- Add 25: x^2 + 10x + 25 = (x + 5)^2. Half of 10 is 5.
- Add \displaystyle \frac{49}{4}: \displaystyle m^2 - 7m + \frac{49}{4} = \left(m - \frac{7}{2}\right)^2. Half of -7 is \displaystyle -\frac{7}{2}.
- Add \displaystyle \frac{1}{9}: \displaystyle a^2 + \frac{2}{3}a + \frac{1}{9} = \left(a + \frac{1}{3}\right)^2. Half of \displaystyle \frac{2}{3} is \displaystyle \frac{1}{3}.
- Yes: x^2 + 14x + 49 = (x + 7)^2. Half of 14 is 7, and 7^2 = 49 matches the constant.
- No. Half of -10 is -5, so the constant would have to be 25, not 20.
- No. The constant would have to be 16, and the -16 has the wrong sign: a completing number is a square, so it is never negative.
- k = 12 or k = -12. From (x + m)^2, m^2 = 36 gives m = \pm 6, and k = 2m.
- \displaystyle c = \frac{81}{4}. Half of -9 is \displaystyle -\frac{9}{2}, and \displaystyle \left(-\frac{9}{2}\right)^2 = \frac{81}{4}.
- x = 1 or x = -5. Add 4: (x + 2)^2 = 9, so x + 2 = \pm 3.
- \displaystyle x = 3 \pm \sqrt{2}. Move the 7: x^2 - 6x = -7. Add 9: (x - 3)^2 = 2.
- x = 2 or x = -4. Collect: x^2 + 2x = 8. Add 1: (x + 1)^2 = 9, so x + 1 = \pm 3.
- \displaystyle x = 3 \pm 2\sqrt{3}. Rearrange: x^2 - 6x = 3. Add 9: (x - 3)^2 = 12, and \displaystyle \sqrt{12} = 2\sqrt{3}.
- \displaystyle a = \frac{3}{2} or \displaystyle a = -\frac{1}{2}. Add \displaystyle \frac{1}{4}: \displaystyle \left(a - \frac{1}{2}\right)^2 = 1, so \displaystyle a - \frac{1}{2} = \pm 1.
- \displaystyle n = \frac{3 \pm \sqrt{13}}{2}. Move the 1: n^2 - 3n = 1. Add \displaystyle \frac{9}{4}: \displaystyle \left(n - \frac{3}{2}\right)^2 = \frac{13}{4}, so \displaystyle n - \frac{3}{2} = \pm\frac{\sqrt{13}}{2}.
- \displaystyle x = -2 \pm 3\sqrt{3}. Expand: x^2 + 4x - 21 = 2, so x^2 + 4x = 23. Add 4: (x + 2)^2 = 27, and \displaystyle \sqrt{27} = 3\sqrt{3}.
- x = 5 or x = -1. Divide by 2: x^2 - 4x = 5. Add 4: (x - 2)^2 = 9, so x - 2 = \pm 3.
- No real solutions; over the complex numbers, x = 1 \pm 2i. x^2 - 2x = -5. Add 1: (x - 1)^2 = -4, and d < 0.
- One real solution, x = -5. The left side is already a perfect square: (x + 5)^2 = 0.
- k = 16, and the solution is x = -4. (x + 4)^2 = 16 - k, which is 0 exactly when k = 16.
- c < 1. x^2 - 2x = -c, so (x - 1)^2 = 1 - c, and there are two real solutions exactly when 1 - c > 0.
- (x + 2)^2 + 5. Add and subtract 4: (x^2 + 4x + 4) - 4 + 9.
- (x - 6)^2 - 6. Add and subtract 36: (x^2 - 12x + 36) - 36 + 30.
- \displaystyle \left(x + \frac{1}{2}\right)^2 + \frac{3}{4}. Half of 1 is \displaystyle \frac{1}{2}, so add and subtract \displaystyle \frac{1}{4}: \displaystyle \left(x^2 + x + \frac{1}{4}\right) - \frac{1}{4} + 1.
- The smallest value is 4, at x = 4. x^2 - 8x + 20 = (x - 4)^2 + 4, and (x - 4)^2 is never negative and is 0 only at x = 4.
- c = 9, and 25x^2 - 30x + 9 = (5x - 3)^2. The first part is 5x, so the middle term of (5x + m)^2 is 10mx; 10m = -30 gives m = -3.
- 25y^2, and x^2 + 10xy + 25y^2 = (x + 5y)^2. Treat 10y as the coefficient of x: half of it is 5y, and (5y)^2 = 25y^2.
- (x^2 - 4x + 8)(x^2 + 4x + 8). With a = x^2 and b = 8, the missing middle term is 2ab = 16x^2, so x^4 + 64 = (x^2 + 8)^2 - 16x^2. Since 16x^2 = (4x)^2, that is a difference of two squares.
- Width 4 cm, length 10 cm. w^2 + 6w = 40. Add 9: (w + 3)^2 = 49, so w = 4 or w = -10, and a width cannot be negative.
- At t = 1 and t = 3 seconds, once going up and once coming down. -5t^2 + 20t + 1 = 16 gives -5t^2 + 20t - 15 = 0. Divide by -5: t^2 - 4t = -3. Add 4: (t - 2)^2 = 1.
- To grow a square of side x into a bigger square, the extra area has to go along two sides, not one, or the shape stays a long rectangle. So the strip of width b is shared between the two sides, and each piece is \displaystyle \frac{b}{2} wide. The gap left in the corner is a square whose sides are those widths, so its area is \displaystyle \frac{b}{2} \cdot \frac{b}{2} = \left(\frac{b}{2}\right)^2. A b by b corner would need two strips of the full width b, twice the bx there is.
- An equation stays true when the same number is added to both of its sides. An expression has no second side, so adding a number would change its value; adding and subtracting the same number adds zero overall, which rewrites the expression without changing it.
- If x^2 + bx + c = (x + m)^2 = x^2 + 2mx + m^2, matching coefficients gives \displaystyle m = \frac{b}{2} and \displaystyle c = m^2 = \frac{b^2}{4}, so b^2 = 4c. Conversely, if b^2 = 4c, then \displaystyle \left(x + \frac{b}{2}\right)^2 = x^2 + bx + \frac{b^2}{4} = x^2 + bx + c.
- Move c: x^2 + bx = -c. Add \displaystyle \frac{b^2}{4}: \displaystyle \left(x + \frac{b}{2}\right)^2 = \frac{b^2}{4} - c = \frac{b^2 - 4c}{4}. The denominator 4 is positive, so the right side has the sign of b^2 - 4c: two real solutions when b^2 - 4c > 0, one when it is 0, none when it is negative.
- Every step of the method is allowed for any coefficients: dividing by the non-zero leading coefficient, moving the constant, and adding \displaystyle \left(\frac{b}{2}\right)^2 to both sides always produce (x + k)^2 = d for some numbers k and d. The square root property then solves that for any d, giving real roots when d \ge 0 and complex ones when d < 0. Factoring over the integers needs roots that are rational, which most quadratics do not have.