Completing the square can solve any quadratic equation, even when it cannot be factored using integers, but repeating all those steps from scratch gets slow when there is a number in front of x2 or an odd middle number brings in fractions.
1
Where the Quadratic Formula Comes From
To avoid doing the same algebra on every problem, we can complete the square once on a general quadratic equation using letters so we can go straight from the coefficients to the solutions.
On a specific equation like x2+6x−2=0, completing the square moves −2 to the right side and adds half of 6, squared, (26)2=9, to both sides so the left side factors into a single square:
(x+3)2=11⟹x=−3±11
Doing those exact same steps with b and c in place of the numbers turns x2+bx+c=0, and then ax2+bx+c=0, into a single formula for x.
Where the Quadratic Formula Comes From
x2+6x−2x=0=?
Here is how completing the square on x2+bx+c=0 builds the formula piece by piece. The square-root steps apply when b2−4c≥0. If b2−4c is negative, the completed square would equal a negative number, so there are no real solutions.
x2+bxx2+bx+4b2(x+2b)2x+2bx=−cSubtract c=4b2−cAdd (2b)2 to both sides=4b2−4cWrite as a single squareand get a commondenominator of 4=±2b2−4cTake the square root ofthe top and bottom=2−b±b2−4cSubtract 2b andcombine over 2
For a quadratic equation, a=0, so we can divide by a. Subtracting ac and adding 4a2b2 to both sides gives
(x+2ab)2=4a2b2−ac=4a2b2−4ac.
Multiplying both sides by 4a2 gives
(2ax+b)2=b2−4ac.
If b2−4ac≥0, take square roots, subtract b, and divide by 2a to get the formula below. If b2−4ac is negative, there are no real solutions.
For ax2+bx+cx=0:=2a−b±b2−4ac
2
The Discriminant and the Graph
Before we plug numbers into the Quadratic Formula, let's see what its pieces tell us about the graph of the parabola y=ax2+bx+c and how many x-intercepts it has.
The Discriminant and the Graph
Splitting the fraction over the common denominator 2a separates the formula into the x-coordinate of the center line and a term we add and subtract to find the real zeros.
The horizontal distance to each real zero is 2∣a∣b2−4ac. When a<0, the + case gives the left zero and the − case gives the right zero.
Because the expression inside the square root controls whether we can take a step from the center line, it tells the three kinds of parabolas apart:
discriminantb2−4ac⎩⎨⎧>0=0<0step left and right⟹2 real solutionsstep of 0⟹1 real solution(at the vertex)no real square root⟹0 real solutions
x=−2ab
b2−4ac>0
2 real solutions
x
−2∣a∣b2−4ac
+2∣a∣b2−4ac
b2−4ac=0
1 real solution
x
b2−4ac<0
0 real solutions
x
Moving the parabola left or right shifts the center line x=−2ab while the discriminant and the distances to any real zeros stay unchanged. Moving it up or down changes the discriminant b2−4ac and changes the step ±2ab2−4ac, giving two zeros, a single zero at the vertex, or no real zeros.
The first part of the quadratic formula finds the parabola's center line, and the part with the square root sets the equal steps left and right to the zeros.
3
Solving with the Quadratic Formula Step by Step
Now let's solve 2x2−5x=3 without losing track of negative signs inside the fraction.
Solving with the Quadratic Formula Step by Step
2x2−5xx=3=?
Text solution
Set the equation to 0 and list a,b, and c Move every term to the same side before reading off the coefficients, keeping each negative sign with its number.
2x2−5x−3=0(a=2,b=−5,c=−3)
Calculate the discriminant b2−4ac on the side first Keep parentheses around −5 so (−5)2 is +25 (typing `-5^2` into a calculator without parentheses gives `-25`), and notice that the two negatives in −4(2)(−3) multiply to make +24.
b2−4ac=(−5)2−4(2)(−3)=25+24=49
Put the discriminant into the rest of the formula Think of −b at the front as flipping the sign of b, turning −(−5) into +5, and take the square root of 49.
x=2(2)−(−5)±49=45±7
Split the ± into two cases Work out the addition case and the subtraction case separately to find the two zeros.
xx=45+7=3and=45−7=−21
4
Zero, Negative, and Nonsquare Discriminants
Finding the discriminant first also shows right away when the ± part is 0, when we can stop early because there are no real solutions, or when the square root stays in the answer. Let's look at each case in 4x2−12x+9=0,x2+4x+7=0, and x2−6x+4=0.
Zero, Negative, and Nonsquare Discriminants
4x2−12x+9x2+4x+7x2−6x+4x=0=0=0=?
First, when the discriminant comes out to zero in 4x2−12x+9=0:
Text solution
Find the discriminant for a=4,b=−12, and c=9 A discriminant of 0 means the vertex sits right on the x-axis, so there is only 1 real solution.
b2−4ac=(−12)2−4(4)(9)=144−144=0
Plug 0 into the formula Adding 0 and subtracting 0 give the exact same number, leaving the vertex's x-coordinate as the only solution.
x=2(4)−(−12)±0=812=23
Next, when the discriminant is negative in x2+4x+7=0:
Text solution
Find the discriminant for a=1,b=4, and c=7 When no number is written in front of x2, the coefficient a is 1.
b2−4ac=(4)2−4(1)(7)=16−28=−12
Stop as soon as the discriminant is negative Because no real number times itself equals −12, you do not need to write the rest of the formula.
No real solutions
Finally, when the discriminant is positive but not a perfect square in x2−6x+4=0, we can either simplify the square root for an exact answer or use a calculator for decimals:
Text solution
Find the discriminant and plug into the formula for a=1,b=−6, and c=4 Since 20 is positive but not a perfect square, the two solutions keep a square root.
b2−4ac⟹x=(−6)2−4(1)(4)=36−16=20=26±20
Simplify the square root for an exact answer Rewrite 20 as 25 and divide both terms in the numerator by 2.
x=26±25=3±5
Calculate the two cases in a calculator when decimals are needed For graphing or word problems, work out the plus and minus cases separately.
xx=26+20≈5.24and=26−20≈0.76
5
Choosing the Fastest Method
The Quadratic Formula works on any quadratic equation, but it is rarely the fastest way when the numbers are simple. Before plugging into the formula, check whether Square Roots, Factoring, or Completing the Square will finish the problem in a few seconds.
When an equation does not tell you which method to use, check for the fast shortcuts before using the Quadratic Formula:
Square Roots
If x only shows up in one place (because there is no x term, like 3x2−27=0, or the square is already built, like (x−4)2=10), do not expand or use the formula. Just isolate the squared part and take the square root.
Factoring
When a=1 and there is an x term, spend five seconds checking whether two integers multiply to c and add to b. In x2+5x+6=(x+2)(x+3)=0, factoring gives x=−2 and x=−3 right away.
Completing the Square
If it does not factor, check whether a=1 and b is even, as in x2+8x−3=0. Taking half of an even b avoids fractions, so completing the square to (x+4)2=19 and x=−4±19 is cleaner than the formula.
If none of those methods is quick, use the Quadratic Formula, as in 3x2+7x−5=0.
For ax2+bx+cx=0:=2a−b±b2−4ac
Always set the equation to 0 first and work out the discriminantb2−4ac on the side, keeping parentheses around b when you square it. In the split form x=−2ab±2ab2−4ac, the first piece −2ab gives the x-coordinate of the parabola's center line and the discriminant inside the root controls the step to the x-axis: a positive value gives 2 real solutions, 0 makes the step 0 for 1 real solution right at the vertex x=−2ab, and a negative value lets you stop right away with 0 real solutions.
6
Practice
1
Solve 3x2−7x=6.
Forgetting to flip the sign of b=−7 at the front gives 6−7±11, or 32 and −3.
Before reading off a,b, and c, what must the right side of the equation equal?
Subtract 6 from both sides to get 3x2−7x−6=0, giving a=3,b=−7, and c=−6 (using c=6 before moving it over gives a discriminant of 49−72=−23 and falsely says there are no real solutions). The discriminant is (−7)2−4(3)(−6)=49+72=121 (typing −72 without parentheses gives −49+72=23). Plugging into the formula gives x=2(3)−(−7)±121=67±11 (forgetting to flip the sign of b=−7 at the front gives 6−7±11, or 32 and −3), which splits into x=3 and x=−32.
2
Solve 9x2+12x+4=0, and describe how its parabola meets the x-axis.
Dividing by a=9 instead of 2a=18 gives the wrong answer x=−34.
Calculate b2−4ac first to see how far you step left and right from the center line.
With a=9,b=12, and c=4, the discriminant is 122−4(9)(4)=144−144=0. Plugging this in gives x=2(9)−12±0=18−12 (dividing by a=9 instead of 2a=18 gives the wrong answer x=−34). Because the discriminant is 0, there is 1 real solution and the vertex of the parabola sits right on the x-axis at x=−32.
3
Solve x2−5x+9=0.
Find the discriminant b2−4ac on the side before writing the full fraction.
With a=1,b=−5, and c=9, the discriminant is (−5)2−4(1)(9)=25−36=−11 (adding 36 instead of subtracting gives 61 and the wrong answer x=25±61). Because the discriminant is negative, there are no real solutions.
4
Solve x2+6x+2=0. Give both the simplified exact answer and the solutions rounded to two decimal places.
Dividing only −6 by 2 gives the wrong answer −3±27.
After finding the discriminant, factor out the largest perfect square inside the root so you can divide both parts of the numerator by 2.
With a=1,b=6, and c=2, the discriminant is 62−4(1)(2)=28, so x=2−6±28=2−6±27. Dividing both terms in the numerator by 2 (dividing only −6 by 2 gives the wrong answer −3±27) gives the exact solution x=−3±7, and calculating the two cases (in a calculator, leaving parentheses off the numerator in `(-6 + √28)/2` divides only 28 by 2 and gives −3.35) rounds to x≈−0.35 and x≈−5.65.
5
When you solve 2x2−8x+3=0 with the Quadratic Formula and split the fraction into two pieces, you get x=2±210. What does each piece tell you about the graph of y=2x2−8x+3?
Match the two pieces of x=2±210 to the two terms in x=−2ab±2ab2−4ac.
The two pieces are not the two x-intercepts themselves (treating 2 and 210 as the two zeros ignores the ± step). The first piece, x=2, is the axis of symmetry (center line) of the parabola, and the second piece, 210, is the distance you step left and right from that center line to reach the two zeros on the x-axis.
6
For each equation, name the fastest method to solve it (Square Roots, Factoring, Completing the Square, or the Quadratic Formula) and find the exact solutions: (a) 2x2−50=0, (b) x2−7x+10=0, (c) x2−10x+18=0, (d) 5x2+3x−1=0.
Forgetting the ± when taking the square root drops a solution and gives only x=5.
Check in order: does x appear in only one place, is it easy to factor right away, or is a=1 with an even middle number?
(a) Square Roots (no x term): isolate x2=25 (forgetting the ± when taking the square root drops a solution and gives only x=5) to get x=±5.
(b) Factoring(−2 and −5 multiply to 10 and add to −7): (x−2)(x−5)=0 (reading the numbers straight from the factors without flipping their signs gives −2 and −5), giving x=2 and x=5.
(c) Completing the Square(a=1 and b=−10 is even): move 18 and add (−5)2=25 to both sides to get (x−5)2=7 (moving 18 to the right side without changing its sign gives (x−5)2=43), giving x=5±7.
(d) Quadratic Formula (does not factor, a=5, and b=3 is odd): the discriminant is 32−4(5)(−1)=9+20=29 (missing the negative sign on c=−1 subtracts 20 to get −11 and falsely says no real solutions), giving x=10−3±29.