How can I divide $x \over x+1$ using long divison? $$x \over x+1 $$

I'm actually trying to integrate the above function, but I was told to first use long division to simplify it, which I'm not really sure how to do.
An easier way is to note that
$$\frac{x}{x+1} = \frac{x+1-1}{x+1}=\frac{x+1}{x+1}+\frac{-1}{x+1}=1-\frac{1}{x+1}.$$
if you are trying to integrate $\frac{x}{x+1},$  you don't need to do long division; can be done with a change of variable. change of variable is a useful technique, and in particular for functions of the from $f(ax+b).$  

here is it works in this case. $$u = x + 1, x = u-1$$ so $$\int \frac{x}{x+1}\, dx = \int\frac{u-1}{u}\, du = \int\left(1 - \frac 1u\right)\, du = u - \ln u+c = x - \ln|x-1| + c$$