Factoring Polynomial using Quadratic Equation I'm trying to use the quadratic equation (QE) to factor a degree 2 polynomial into the format: $(x + a)^2$, where a is any real number.
This works great for equations like:
(1) $x^2 + 2x + 1$
The QE gives roots $x = \{-1, -1\}$, and $(x + 1)^2 = x^2 + 2x + 1$.
This approach fails for other polynomials such as:
(2) $9x^2 + 36x + 36$
The roots found with the QE are $x = \{-2, -2\}$. But $(x + 2)^2 \ne 9x + 36x + 36$.
9 is the GCF from the coefficients of (2), so (2) can be rewritten as:
$9 \times (x^2 + 4x + 4)$
and by using the QE on the second term, this equals:
$9 \times (x + 2)^2$. And $9 \times (x + 2)^2 = 9x + 36x + 36$ (2), so this seems to be a better approach.
So my question is: must the input to QF be a polynomial that has coefficients with GCF = $1$, for the result to give roots that can be used to reconstruct the original function?
 A: Look at the expansion
$$(x+a)^2=x^2+2ax+a^2.$$
Notice that the coefficient of $x^2$ is always $1$. Thus, if a quadratic polynomial can be written in this form, it must have a leading coefficient of $1$. In general, if you have a quadratic polynomial with leading coefficient $c$ and it has a double root at $-a$, then the polynomial can be written as $c(x+a)^2$. So, you don't want to be looking at the GCF, but rather at the leading coefficient. (Although these will be equal in any polynomial with positive leading coefficient and a double root)
More generally, if you have a polynomial $P(x)$ of degree $d$ with leading coefficient $c$ and roots (enumerated with multiplicity) $r_1,\,r_2,\ldots,r_d$, one gets
$$P(x)=c(x-r_1)(x-r_2)\cdots(x-r_d).$$
That is, the leading coefficient can always be pulled out of the factorized form. (Note that this doesn't work if you don't have $d$ roots - if you're working in the real numbers and not the complex numbers, some polynomials can't be factored)
A: Yes. As you have taken the format $(x+a)^2$ which have coefficient of $x$ as $1$ so this format will work only for coefficient as $1$ of a polynomial. As your other example has $9$ as coefficient so you will have to take $3$ as coefficient of $x$ in the format $(x-a)^2$. As x will be $3x$ so a must be $3a$. This corresponding change in format will give it new look as $(3x-3a)^2$. And if you put $(3x-3\times2)^2$ it will give answer $9x^2+36x+36$.
Hope you have understood clearly.
A: for 1) you will have $$x^2+2x+1=(x+1)^2$$
for 2) we have $$9x^2+36x+36=9(x^2+4x+4)=9(x+2)^2$$
