In the process of brushing up on my math skills, I came across an example where $\displaystyle \sqrt{x^2+x}+x$ has $\displaystyle x$ factored out, resulting in $\displaystyle x(\sqrt{1+\frac{1}{x}}+1)$.

I am confused as to how this is accomplished, and would greatly appreciate it if someone could enlighten me.

I tried looking over various texts on dealing with exponents, but none of them cover this type of issue.