# How do you solve x^2 = 5x + 2 by completing the square?

Mar 31, 2018

${x}_{1} = \frac{5}{2} + \frac{\sqrt{33}}{2} \approx 5.372$
${x}_{2} = \frac{5}{2} - \frac{\sqrt{33}}{2} \approx - 0.372$

#### Explanation:

First, bring everything to one side...

${x}^{2} = 5 x + 2 | - 5 x - 2$
$\Rightarrow {x}^{2} - 5 x - 2 = 0$

Complete the square $\left({a}^{2} + 2 a b + {b}^{2} = {\left(a + b\right)}^{2}\right)$

${x}^{2} - 2 \cdot \frac{5}{2} x + \textcolor{b l u e}{{5}^{2} / {2}^{2} - {5}^{2} / {2}^{2}} - 2 = 0$
${\left(x - \frac{5}{2}\right)}^{2} - \frac{25}{4} - 2 = 0$

Solve for $x$

${\left(x - \frac{5}{2}\right)}^{2} - \frac{25}{4} - 2 = 0 | + \frac{33}{4} | \sqrt{} | + \frac{5}{2}$
${x}_{1 , 2} = \frac{5}{2} \pm \frac{\sqrt{33}}{2}$
${x}_{1} = \frac{5}{2} + \frac{\sqrt{33}}{2} \mathmr{and} {x}_{2} = \frac{5}{2} - \frac{\sqrt{33}}{2}$

Mar 31, 2018

$x = \frac{5}{2} \pm \frac{1}{2} \sqrt{33}$

#### Explanation:

$\text{rewrite in "color(blue)"standard form}$

$\Rightarrow {x}^{2} - 5 x - 2 = 0 \leftarrow \textcolor{b l u e}{\text{in standard form}}$

$\text{to solve by the method of "color(blue)"completing the square}$

• " the coefficient of the "x^2" term must be 1 which it is"

• " add/subtract "(1/2"coefficient of the x-term")^2" to"
${x}^{2} - 5 x$

$\Rightarrow {x}^{2} + 2 \left(- \frac{5}{2}\right) x \textcolor{red}{+ \frac{25}{4}} \textcolor{red}{- \frac{25}{4}} - 2 = 0$

$\Rightarrow {\left(x - \frac{5}{2}\right)}^{2} - \frac{33}{4} = 0$

$\Rightarrow {\left(x - \frac{5}{2}\right)}^{2} = \frac{33}{4}$

$\textcolor{b l u e}{\text{take the square root of both sides}}$

$\Rightarrow x - \frac{5}{2} = \pm \sqrt{\frac{33}{4}} \leftarrow \textcolor{b l u e}{\text{note plus or minus}}$

$\text{add "5/2" to both sides}$

$\Rightarrow x = \frac{5}{2} \pm \frac{1}{2} \sqrt{33} \leftarrow \textcolor{red}{\text{exact solutions}}$

Mar 31, 2018

$x = + \frac{5}{4} \pm \frac{\sqrt{33}}{2}$

Explained the concept of completing the square in a lot of detail.
Once you are used to these you can do them in a LOT LESS lines.

#### Explanation:

Given: ${x}^{2} = 5 x + 2$

Write as:

${x}^{2} - 5 x - 2 = y$

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$\textcolor{b l u e}{\text{What it is about}}$

We are mathematically allowed to change this in any way we chose as long as we incorporate something that takes it back to the original value. As an example suppose we had:

$2 = t$ this 'sets in stone' what the relationship is.

Let's totally 'lie' about the relationship by writing

$2 + 34 = t$ Now it is wrong. However if we instead write

$2 + 34 - 34 = t$ it becomes true again.

This concept is used in completing the square. We lie about something to force it into the format we wish to obtain. After obtaining that format we put back in something that turns it into a true statement.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We need to have y=x^2-5x+?+k-2 where the ? is the lie and the $k$ is the correction

Suppose we make ?=-5/2

$y = \left({x}^{2} - 5 x - \frac{5}{2}\right) + k - 2 \text{ } \ldots \ldots \ldots E q u a t i o n \left(1\right)$

We can factorise the brackets giving:

y=(x-5/2)^2 +color(mediumblue)(k)-2" "......Equation(2)color(green)( larr" our objective")

If you multiply out the brackets we get $E q n \left(1\right)$ (includes the lie)

$\textcolor{w h i t e}{\text{ddd")color(green)("We want }}$
$\textcolor{w h i t e}{\text{dddd")color(green)("this bit")color(red)(color(white)("ddd")"The lie}}$
$\textcolor{g r e e n}{\textcolor{w h i t e}{\text{dddddd")darr)color(red)(color(white)("ddddd.d}} \downarrow}$
$y = \overbrace{{x}^{2} - 5 x} + \underbrace{\overbrace{{\left(- \frac{5}{2}\right)}^{2}} + k} \textcolor{w h i t e}{\text{d}} - 2$
$\textcolor{g r e e n}{\textcolor{w h i t e}{\text{dddddddddddddddd}} \uparrow}$
color(green)(color(white)("ddddddddd")"The lie with correction")

So for this to work we set ${\left(- \frac{5}{2}\right)}^{2} + k = 0 \text{ }$ Add 0 and nothing changes so this action neutralises the lie.

Thus $\textcolor{m e \mathrm{di} u m b l u e}{k = - \frac{25}{4}}$

Substitute for $\textcolor{m e \mathrm{di} u m b l u e}{k}$ in $E q u a t i o n \left(2\right)$

color(green)(y=(x-5/2)^2+color(white)("dd")color(mediumblue)(k)-2

$\textcolor{g r e e n}{y = {\left(x - \frac{5}{2}\right)}^{2} + \underbrace{\textcolor{m e \mathrm{di} u m b l u e}{\left(- \frac{25}{4}\right)} - 2}}$

$y = {\left(x - \frac{5}{2}\right)}^{2} \textcolor{w h i t e}{\text{.d.dd}} - \frac{33}{4}$

YOU HAVE NOW COMPLETED THE SQUARE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set

$y = 0 = {\left(x - \frac{5}{2}\right)}^{2} - \frac{33}{4}$

${\left(x - \frac{5}{2}\right)}^{2} = + \frac{33}{4}$

$x - \frac{5}{4} = \pm \sqrt{\frac{33}{4}}$

$x = + \frac{5}{4} \pm \frac{\sqrt{33}}{2}$