Steply

Solve x^2 - 5x + 2 = 0 by completing the square

Step by step, with the reason for every step · Completing the square with fractions · Algebra 1

Step by step

The question

Question: solve x² − 5x + 2 = 0 by completing the square.

x2 − 5x + 2 = 0

1 Move the 2

We want only the x parts on the left.

The + 2 is in the way.

So we take away 2 on both sides.

x2 − 5x + 2 − 2 = 0 − 2

+ 2 and − 2 make zero.

Cross them out.

0 minus 2 is −2.

0 − 2 = −2

Now we have x² − 5x = −2.

x2 − 5x = −2

2 Complete the square

We want the left side to be one bracket, squared.

A picture shows what is missing.

So we add 25/4 to fill the corner.

We do it on both sides, so they stay equal.

x2 − 5x + 254 = −2 + 254

3 Write it as a square

The full square is x − 5/2 on each side.

So the left side is (x − 5/2)².

x2 − 5x + 254 = (x − 52)2

To add, both need the same bottom: 4.

−2 is −8/4.

Same bottom, so we add the tops: −8 plus 25 is 17.

−2 = −84
−84 + 254 = 174

Careful!

Many people add 25/4 only on the left.

Then the two sides are not equal any more.

Careful: add 254 on BOTH sides

Now we have (x − 5/2)² = 17/4.

(x − 52)2 = 174

4 Square root of both sides

Something squared is 17/4.

So that something is the square root of 17/4, or minus it.

Both work, because minus times minus is plus.

( )² = k → ( ) = √k or −√k

The square root of a fraction is the root of the top over the root of the bottom.

2 times 2 is 4.

17 is not a square number, so we keep √17.

√174 = √17√4 = √172

So x − 5/2 is plus or minus that.

x − 52 = √172 or x − 52 = −√172

5 Get x alone

To remove the − 5/2, we add 5/2 on both sides.

We do it in both equations.

x = √172 + 52 or x = −√172 + 52

We write the plain number first.

So x = 5/2 + √17/2 or x = 5/2 − √17/2.

x = 52 + √172 or x = 52 − √172

With a calculator, x is about 4.56 or about 0.44.

x ≈ 4.56 or x ≈ 0.44

Let's look back.

First: move the 2.

Then: complete the square.

Then: write it as a square.

Then: square root of both sides.

Last: get x alone.

Answer
x = 52 + √172 or x = 52 − √172

Your turn

Try this one yourself, then check:

Solve x2 − 7x + 8 = 0
Show the answer
x = 72 + √172 or x = 72 − √172

More from Completing the square with fractions

The whole lesson: Completing the square with fractions →