I'm learning to factor equations right now and I'm kind of confused. I have the equation $x^2+2x+1$ and I was able to factorize it into $(x+1)^2$. I know my answer is correct but what is considered a factor of an equation? I tried searching on google and couldn't find any results.
When dealing with real numbers, a factor is considered any number that the dividend can be divided with perfectly without any remainders ($\frac{12}{3}=4$, therefore 3 is a factor). In the equation above, for example, how come $(x+2)(x+\frac{1}{x+2})$ aren't factors or how about $(x+3)(x-1+\frac{4}{x+3})$? Why is it only $(x+1)$ that is a factor? Are there remainders when factoring equations?
So with general algebraic expressions, one is usually interested in polynomial factors — linear factors, quadratic factors, cubic factors, and so on. The expression $x^2+2x+1$ has two linear factors of $x+1$, as you've discovered. However, an expression like $(x+\frac{1}{x+2})$ is not a polynomial factor; it's a rational factor instead. There are infinitely many rational factors for most given algebraic expressions and they don't really tell us anything useful; in contrast, there are finitely many polynomial factors for the same algebraic expression and they give us much more information; thus the rational factors are (usually) ignored.
In the question you actually hint at this idea, since you know that when factoring $15$ it makes sense to write $15 = 3 \times 5$ but if you allow rational factors you have infinitely many useless factorizations like $15 = 7 \times (15/7)$.