# How do I complete the square if the coefficient of x^2 is not 1?

Oct 7, 2014

Remember that

${\left(a x + b\right)}^{2} = {a}^{2} {x}^{2} + 2 a b x + {b}^{2}$

So the general idea to get ${b}^{2}$ is by getting $x$'s coefficient,
dividing by $2 a$, and squaring the result.

Example

$3 {x}^{2} + 12 x$

$a = 3$
$2 a b = 12$
$6 b = 12$
$b = 2$
$3 {x}^{2} + 12 x + 4 = {\left(3 x + 2\right)}^{2}$

You can also factor out ${x}^{2}$'s coefficient.. and proceed with completing the square.

Example:
$2 {X}^{2} + 4 X$

$2 \left({X}^{2} + 2 X\right)$

$2 {\left(X + 1\right)}^{2}$