I was attempting to factor
$$\frac{3x^3 + x^2}{x^3 + x^2 + x}$$
I gave up and looked up a solution which was
$$\frac{x(3x + 1)}{x^2 + x + 1}$$
which allowed me to solve for the limit as $x$ approaches $0$, which is $0$. However, at one point when factoring myself I ended up with
$$\frac{3x^2 + 1}{x^2 + x + 1}$$
If THIS were factored enough, the limit would be $1$, but it wasn't. So, I'm just curious how I'm supposed to know that I'm done factoring.
Think of the variables as numbers. The numerator's terms has a common factor of ___ (in your case $x^2$). The denominator's terms has a common factor of ___ (which is $x$). The common factor of $x$ and $x^2$ is $x$. So, pull out an $x$ and cancel to get: $$\frac{3x^2+x}{x^2+x+1}$$The solution you searched up is right since the numerator's terms still have a common factor of $x$. But yours isn't since multiplying by $x$ on the top and bottom gives: $$\frac{3x^3+x}{x^3+x^2+x}\ne\frac{3x^3+x^2}{x^3+x^2+x}$$since the coefficient-less terms in the numerator don't have the same exponent.