I am trying to factor $9x^2-6x+1$ after finding the roots, I am using the following formula $a(x-x_1)(x-x_2)$ in this case there is just one root ($\frac{1}{3}$)
How do I know that the answer is $(3x-1)^2$ and not just $(3x-1)$?
I am trying to factor $9x^2-6x+1$ after finding the roots, I am using the following formula $a(x-x_1)(x-x_2)$ in this case there is just one root ($\frac{1}{3}$)
How do I know that the answer is $(3x-1)^2$ and not just $(3x-1)$?
Multiplying out you get: $$(3x-1)^2=(3x-1)(3x-1)=9x^2-6x+1$$
so the $\frac{1}{3}$ is a double root. The fundamental theorem of algebra ensures that this double root is the only root.
Addendum:
You can verify that $\frac{1}{3}$ is a double root by checking that it is also a root of the derivative $f'(x) = 18x - 6$.
Using the quadratic formula for $ax^2+bx+c=0$ we get: $$x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.$$
In your case we have $x_1=\frac{1}{3}$ and $x_2=\frac{1}{3}$, hence we can write $$9x^2-6x+1=9(x-x_1)(x-x_2)=9\left(x-\frac{1}{3}\right)\cdot\left(x-\frac{1}{3}\right)=9\left(x-\frac{1}{3}\right)^2.$$
You know it first because of the identity $(a-b)^2=\dots$
Second it is $(3x-1)^{\color{red}2}$ for reasons of degree: $9x^2-6x+1$ has degree $2$, while $3x-1$ has degree $1$.
After factoring out 9 you get $f(x)=9\left( x^2-2\frac{1}{3}+\frac{1}{9}\right)=9\left( x-\frac{1}{3} \right)\cdot\left( x-\frac{1}{3} \right)=0$
A product is equal to zero, if at least one factor is equal to zero. Therefore there is only one root. You are right. Because of the quadratic attribute of the function this root is a double root. The function only touches the x-axis at one single point. It can be well seen by plotting the graph: