# How do you find the value of c that makes x^2-24x+c into a perfect square?

Jan 5, 2018

Divide the coefficient of $x$ (not ${x}^{2}$) by 2, and then square that.
$c = 144$.

#### Explanation:

Divide the coefficient of $x$ (not ${x}^{2}$) by 2, and then square that.

So for ${x}^{2} - 24 x$, dividing $- 24$ by $2$ gets us $- 12$.
Squaring $- 12$ gets us $144$,

So $c = 144$.

In general:

Consider the factoring identity

$\setminus q \quad {\left(x - a\right)}^{2} = {x}^{2} - 2 a x + {a}^{2}$

If we only have the middle term, $- 2 a x$, then dividing the middle term by $2 x$ gets us

$\setminus q \quad \setminus \frac{- 2 a x}{2 x} = - a$

(If we only take the coefficient on $x$, we do not have to divide by $x$.)

Then if we square that, we get

$\setminus q \quad {\left(- a\right)}^{2} = {a}^{2}$

So as you can see, taking the coefficient on $x$, dividing it by $2$, and then squaring it will get us the magic constant that lets us complete the square.